aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra')
-rw-r--r--fdio.infra/packer-aws-sut/ubuntu_jammy_x86.pkr.hcl3
-rw-r--r--fdio.infra/packer-aws-sut/ubuntu_noble_arm.pkr.hcl88
-rw-r--r--fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl128
3 files changed, 219 insertions, 0 deletions
diff --git a/fdio.infra/packer-aws-sut/ubuntu_jammy_x86.pkr.hcl b/fdio.infra/packer-aws-sut/ubuntu_jammy_x86.pkr.hcl
index 625a3a1ea7..14caac8912 100644
--- a/fdio.infra/packer-aws-sut/ubuntu_jammy_x86.pkr.hcl
+++ b/fdio.infra/packer-aws-sut/ubuntu_jammy_x86.pkr.hcl
@@ -1,3 +1,4 @@
+<<<<<<< HEAD (7022a1 fix(bisect): Adjust bash script for Ubuntu 24.04)
packer {
required_plugins {
amazon = {
@@ -126,3 +127,5 @@ build {
inline = var.last_run_commands
}
}
+=======
+>>>>>>> CHANGE (c573ac feat(infra): AWS -> Noble)
diff --git a/fdio.infra/packer-aws-sut/ubuntu_noble_arm.pkr.hcl b/fdio.infra/packer-aws-sut/ubuntu_noble_arm.pkr.hcl
new file mode 100644
index 0000000000..a77db30344
--- /dev/null
+++ b/fdio.infra/packer-aws-sut/ubuntu_noble_arm.pkr.hcl
@@ -0,0 +1,88 @@
+packer {
+ required_plugins {
+ amazon = {
+ version = ">= 1.2.6"
+ source = "github.com/hashicorp/amazon"
+ }
+ }
+}
+
+variable "first_run_commands" {
+ description = "Commands to run before deployment via remote-exec"
+ type = list(string)
+ default = [
+ ""
+ ]
+}
+
+variable "last_run_commands" {
+ description = "Commands to run after deployment via remote-exec"
+ type = list(string)
+ default = [
+ "sudo sed -i 's/Unattended-Upgrade \"1\"/Unattended-Upgrade \"0\"/g' /etc/apt/apt.conf.d/20auto-upgrades"
+ ]
+}
+
+variable "ansible_file_path" {
+ description = "Path to Ansible playbook"
+ type = string
+ default = "../../fdio.infra.ansible/site.yaml"
+}
+
+variable "ansible_python_executable" {
+ description = "Path to Python interpreter"
+ type = string
+ default = "/usr/bin/python3"
+}
+
+variable "ansible_topology_path" {
+ description = "Path to Ansible playbook which creates a topology file"
+ type = string
+ default = "../../fdio.infra.ansible/cloud_topology.yaml"
+}
+
+variable "ansible_provision_pwd" {
+ description = "Password used for ansible provisioning (ansible_ssh_pass)"
+ type = string
+ default = "Csit1234"
+}
+
+source "amazon-ebs" "csit_ubuntu_noble_arm_sut" {
+ ami_name = "csit_ubuntu_noble_arm_sut"
+ ami_description = "CSIT SUT image based on Ubuntu noble"
+ ena_support = true
+ instance_type = "c7gn.4xlarge"
+ launch_block_device_mappings {
+ device_name = "/dev/sda1"
+ volume_size = 40
+ volume_type = "gp2"
+ }
+ force_deregister = true
+ region = "eu-west-1"
+ skip_create_ami = false
+ source_ami = "ami-099a546c02844706e"
+ ssh_username = "ubuntu"
+}
+
+build {
+ name = "csit_ubuntu_noble_arm_sut-packer"
+ sources = [
+ "source.amazon-ebs.csit_ubuntu_noble_arm_sut"
+ ]
+ provisioner "shell" {
+ inline = var.first_run_commands
+ }
+ provisioner "ansible" {
+ playbook_file = var.ansible_file_path
+ user = "ubuntu"
+ groups = ["sut_aws"]
+ extra_arguments = [
+ "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
+ "--extra-vars", "ansible_python_interpreter=${var.ansible_python_executable}",
+ "--extra-vars", "aws=true"
+ ]
+ }
+ provisioner "shell" {
+ inline = var.last_run_commands
+ }
+}
diff --git a/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl b/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl
new file mode 100644
index 0000000000..5eddfe7687
--- /dev/null
+++ b/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl
@@ -0,0 +1,128 @@
+packer {
+ required_plugins {
+ amazon = {
+ version = ">= 1.2.6"
+ source = "github.com/hashicorp/amazon"
+ }
+ }
+}
+
+variable "first_run_commands" {
+ description = "Commands to run before deployment via remote-exec"
+ type = list(string)
+ default = [
+ ""
+ ]
+}
+
+variable "last_run_commands" {
+ description = "Commands to run after deployment via remote-exec"
+ type = list(string)
+ default = [
+ "sudo sed -i 's/Unattended-Upgrade \"1\"/Unattended-Upgrade \"0\"/g' /etc/apt/apt.conf.d/20auto-upgrades"
+ ]
+}
+
+variable "ansible_file_path" {
+ description = "Path to Ansible playbook"
+ type = string
+ default = "../../fdio.infra.ansible/site.yaml"
+}
+
+variable "ansible_python_executable" {
+ description = "Path to Python interpreter"
+ type = string
+ default = "/usr/bin/python3"
+}
+
+variable "ansible_topology_path" {
+ description = "Path to Ansible playbook which creates a topology file"
+ type = string
+ default = "../../fdio.infra.ansible/cloud_topology.yaml"
+}
+
+variable "ansible_provision_pwd" {
+ description = "Password used for ansible provisioning (ansible_ssh_pass)"
+ type = string
+ 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_tg" {
+ ami_name = "csit_ubuntu_noble_x86_tg"
+ ami_description = "CSIT TG 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"
+}
+
+#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"
+ sources = [
+ "source.amazon-ebs.csit_ubuntu_noble_x86_tg"
+ ]
+ provisioner "shell" {
+ inline = var.first_run_commands
+ }
+ provisioner "ansible" {
+ playbook_file = var.ansible_file_path
+ user = "ubuntu"
+ use_proxy = false
+ groups = ["tg_aws"]
+ extra_arguments = [
+ "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
+ "--extra-vars", "aws=true"
+ ]
+ }
+ provisioner "shell" {
+ inline = var.last_run_commands
+ }
+}