diff options
author | Peter Mikus <peter.mikus@protonmail.ch> | 2025-01-09 11:15:07 +0100 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2025-01-09 10:20:29 +0000 |
commit | 0a3b2703149d02b97915831d39b66d1d8b1feb6a (patch) | |
tree | 3fd3aa0c949b86b27df2b2b32f1d7c855d9e3d4d /fdio.infra/packer-aws-sut | |
parent | 3832604d7b656a2ef99ec5a19c2dfd911952ff68 (diff) |
fix(infra): New AWS images
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch>
Change-Id: Ib50df500ef28ceb40d9f9d8d05e31a16b484fa93
Diffstat (limited to 'fdio.infra/packer-aws-sut')
-rw-r--r-- | fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl | 65 |
1 files changed, 37 insertions, 28 deletions
diff --git a/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl b/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl index 93e6d08a8c..a9e0dc7dfb 100644 --- a/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl +++ b/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl @@ -15,7 +15,7 @@ variable "first_run_commands" { ] } -variable "last_run_commands" { +variable "last_run_commands_sut" { description = "Commands to run after deployment via remote-exec" type = list(string) default = [ @@ -23,6 +23,15 @@ variable "last_run_commands" { ] } +variable "last_run_commands_tg" { + 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", + "sudo systemctl start csit-initialize-docker-tg.service" + ] +} + variable "ansible_file_path" { description = "Path to Ansible playbook" type = string @@ -51,7 +60,7 @@ 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" + instance_type = "c6in.4xlarge" launch_block_device_mappings { device_name = "/dev/sda1" volume_size = 40 @@ -62,14 +71,14 @@ source "amazon-ebs" "csit_ubuntu_noble_x86_sut" { skip_create_ami = false source_ami = "ami-0084a47cc718c111a" ssh_username = "ubuntu" - ssh_timeout = "30m" + ssh_timeout = "60m" } 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" + instance_type = "c6in.4xlarge" launch_block_device_mappings { device_name = "/dev/sda1" volume_size = 40 @@ -80,31 +89,31 @@ source "amazon-ebs" "csit_ubuntu_noble_x86_tg" { skip_create_ami = false source_ami = "ami-0084a47cc718c111a" ssh_username = "ubuntu" - ssh_timeout = "30m" + ssh_timeout = "60m" } -#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_sut + } +} build { name = "csit_ubuntu_noble_x86_tg-packer" @@ -126,6 +135,6 @@ build { ] } provisioner "shell" { - inline = var.last_run_commands + inline = var.last_run_commands_tg } } |