diff options
author | Peter Mikus <peter.mikus@protonmail.ch> | 2024-12-11 14:11:19 +0100 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2024-12-12 09:50:18 +0100 |
commit | 977d1d208704b79d354979e389e0e6dc9db8c932 (patch) | |
tree | 1ce52079df73e0437b00d45bc848f4f76ebbf72f /fdio.infra/packer-aws-sut | |
parent | 3a93bc56889b50d824d87b802361aa69901ec807 (diff) |
fix(terraform): New AWS images
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch>
Change-Id: Iae08fe8bf3133d8006dc18613af81f36f04c26f9
Diffstat (limited to 'fdio.infra/packer-aws-sut')
-rw-r--r-- | fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl | 81 |
1 files changed, 42 insertions, 39 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 5eddfe7687..1b925e0404 100644 --- a/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl +++ b/fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl @@ -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" { |