fix(terraform): New AWS images 91/41991/2
authorPeter Mikus <[email protected]>
Wed, 11 Dec 2024 13:11:19 +0000 (14:11 +0100)
committerPeter Mikus <[email protected]>
Thu, 12 Dec 2024 08:50:18 +0000 (09:50 +0100)
Signed-off-by: Peter Mikus <[email protected]>
Change-Id: Iae08fe8bf3133d8006dc18613af81f36f04c26f9

12 files changed:
fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2
fdio.infra.terraform/terraform-aws-1n-aws-c5n/topology-1n-aws-c5n.tftpl
fdio.infra.terraform/terraform-aws-1n-aws-c5n/variables.tf
fdio.infra.terraform/terraform-aws-1n-c6in/topology-1n-c6in.tftpl
fdio.infra.terraform/terraform-aws-1n-c6in/variables.tf
fdio.infra.terraform/terraform-aws-2n-aws-c5n/topology-2n-aws-c5n.tftpl
fdio.infra.terraform/terraform-aws-2n-aws-c5n/variables.tf
fdio.infra.terraform/terraform-aws-2n-c6in/topology-2n-c6in.tftpl
fdio.infra.terraform/terraform-aws-2n-c6in/variables.tf
fdio.infra.terraform/terraform-aws-2n-c7gn/topology-2n-c7gn.tftpl
fdio.infra.terraform/terraform-aws-2n-c7gn/variables.tf
fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl

index c73e34a..c4d53c9 100644 (file)
@@ -17,12 +17,14 @@ services:
     privileged: true
     restart: "always"
     shm_size: "4G"
+{% if docker_volumes is defined and docker_volumes|length > 0 %}
     volumes:
 {% for volume in docker_volumes %}
       - type: "bind"
         source: "{{ volume.source }}"
         target: "{{ volume.target }}"
 {% endfor %}
+{% endif %}
   tg-1:
     build:
       context: "tg/"
@@ -41,9 +43,11 @@ services:
     privileged: true
     restart: "always"
     shm_size: "4G"
+{% if docker_volumes is defined and docker_volumes|length > 0 %}
     volumes:
 {% for volume in docker_volumes %}
       - type: "bind"
         source: "{{ volume.source }}"
         target: "{{ volume.target }}"
-{% endfor %}
\ No newline at end of file
+{% endfor %}
+{% endif %}
\ No newline at end of file
index c99d1f5..9233b78 100644 (file)
@@ -12,7 +12,7 @@ nodes:
     subtype: TREX
     host: "${tg_public_ip}"
     arch: x86_64
-    port: 22
+    port: 6001
     username: testuser
     password: Csit1234
     interfaces:
index 24e767e..a7e858a 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-00ff6ec6a76b31665"
+  default     = "ami-09bee32179b4bf6bf"
 }
 
 variable "tg_associate_public_ip_address" {
index dc24577..148be5c 100644 (file)
@@ -12,7 +12,7 @@ nodes:
     subtype: TREX
     host: "${tg_public_ip}"
     arch: x86_64
-    port: 22
+    port: 6001
     username: testuser
     password: Csit1234
     interfaces:
index b14718f..2d21734 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-00ff6ec6a76b31665"
+  default     = "ami-09bee32179b4bf6bf"
 }
 
 variable "tg_associate_public_ip_address" {
index 313b4b3..ccd40d5 100644 (file)
@@ -12,7 +12,7 @@ nodes:
     subtype: TREX
     host: "${tg_public_ip}"
     arch: x86_64
-    port: 22
+    port: 6001
     username: testuser
     password: Csit1234
     interfaces:
index 30c6f0d..aa51e52 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-00ff6ec6a76b31665"
+  default     = "ami-09bee32179b4bf6bf"
 }
 
 variable "tg_associate_public_ip_address" {
index d012d33..c5d1d0c 100644 (file)
@@ -12,7 +12,7 @@ nodes:
     subtype: TREX
     host: "${tg_public_ip}"
     arch: x86_64
-    port: 22
+    port: 6001
     username: testuser
     password: Csit1234
     interfaces:
index 41dc4e6..7e8ca7d 100644 (file)
@@ -50,7 +50,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-00ff6ec6a76b31665"
+  default     = "ami-09bee32179b4bf6bf"
 }
 
 variable "tg_associate_public_ip_address" {
index a0fa5fc..986157d 100644 (file)
@@ -12,7 +12,7 @@ nodes:
     subtype: TREX
     host: "${tg_public_ip}"
     arch: x86_64
-    port: 22
+    port: 6001
     username: testuser
     password: Csit1234
     interfaces:
index 015d6e2..b150582 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-00ff6ec6a76b31665"
+  default     = "ami-09bee32179b4bf6bf"
 }
 
 variable "tg_associate_public_ip_address" {
index 5eddfe7..1b925e0 100644 (file)
@@ -47,22 +47,23 @@ variable "ansible_provision_pwd" {
   default     = "Csit1234"
 }
 
-#source "amazon-ebs" "csit_ubuntu_noble_x86_sut" {
-#  ami_name        = "csit_ubuntu_noble_x86_sut"
-#  ami_description = "CSIT SUT image based on Ubuntu noble"
-#  ena_support     = true
-#  instance_type   = "c5n.4xlarge"
-#  launch_block_device_mappings {
-#    device_name = "/dev/sda1"
-#    volume_size = 40
-#    volume_type = "gp2"
-#  }
-#  force_deregister = true
-#  region           = "eu-central-1"
-#  skip_create_ami  = false
-#  source_ami       = "ami-0084a47cc718c111a"
-#  ssh_username     = "ubuntu"
-#}
+source "amazon-ebs" "csit_ubuntu_noble_x86_sut" {
+  ami_name        = "csit_ubuntu_noble_x86_sut"
+  ami_description = "CSIT SUT image based on Ubuntu noble"
+  ena_support     = true
+  instance_type   = "c5n.4xlarge"
+  launch_block_device_mappings {
+    device_name = "/dev/sda1"
+    volume_size = 40
+    volume_type = "gp2"
+  }
+  force_deregister = true
+  region           = "eu-central-1"
+  skip_create_ami  = false
+  source_ami       = "ami-0084a47cc718c111a"
+  ssh_username     = "ubuntu"
+  ssh_timeout      = "30m"
+}
 
 source "amazon-ebs" "csit_ubuntu_noble_x86_tg" {
   ami_name        = "csit_ubuntu_noble_x86_tg"
@@ -79,30 +80,31 @@ source "amazon-ebs" "csit_ubuntu_noble_x86_tg" {
   skip_create_ami  = false
   source_ami       = "ami-0084a47cc718c111a"
   ssh_username     = "ubuntu"
+  ssh_timeout      = "30m"
 }
 
-#build {
-#  name = "csit_ubuntu_noble_x86_sut-packer"
-#  sources = [
-#    "source.amazon-ebs.csit_ubuntu_noble_x86_sut"
-#  ]
-#  provisioner "shell" {
-#    inline = var.first_run_commands
-#  }
-#  provisioner "ansible" {
-#    playbook_file = var.ansible_file_path
-#    user          = "ubuntu"
-#    use_proxy     = false
-#    groups        = ["sut_aws"]
-#    extra_arguments = [
-#      "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
-#      "--extra-vars", "aws=true"
-#    ]
-#  }
-#  provisioner "shell" {
-#    inline = var.last_run_commands
-#  }
-#}
+build {
+  name = "csit_ubuntu_noble_x86_sut-packer"
+  sources = [
+    "source.amazon-ebs.csit_ubuntu_noble_x86_sut"
+  ]
+  provisioner "shell" {
+    inline = var.first_run_commands
+  }
+  provisioner "ansible" {
+    playbook_file = var.ansible_file_path
+    user          = "ubuntu"
+    use_proxy     = false
+    groups        = ["sut_aws"]
+    extra_arguments = [
+      "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
+      "--extra-vars", "aws=true"
+    ]
+  }
+  provisioner "shell" {
+    inline = var.last_run_commands
+  }
+}
 
 build {
   name = "csit_ubuntu_noble_x86_tg-packer"
@@ -119,7 +121,8 @@ build {
     groups        = ["tg_aws"]
     extra_arguments = [
       "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
-      "--extra-vars", "aws=true"
+      "--extra-vars", "aws=true",
+      "--extra-vars", "docker_tg=true"
     ]
   }
   provisioner "shell" {