diff --git a/Makefile b/Makefile index a43977a..55bae4f 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,16 @@ packer: unzip ./packer.zip rm ./packer.zip -release.auto.pkrvars.hcl: - echo "Missing configuration file: release.auto.pkrvars.hcl." +release-al1.auto.pkrvars.hcl: + echo "Missing configuration file: release-al1.auto.pkrvars.hcl." + exit 1 + +release-al2.auto.pkrvars.hcl: + echo "Missing configuration file: release-al2.auto.pkrvars.hcl." + exit 1 + +release-al2023.auto.pkrvars.hcl: + echo "Missing configuration file: release-al2023.auto.pkrvars.hcl." exit 1 .PHONY: check-region @@ -42,47 +50,47 @@ validate: check-region init ./packer validate -var "region=${REGION}" . .PHONY: al1 -al1: check-region init validate release.auto.pkrvars.hcl +al1: check-region init validate release-al1.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al1" -var "region=${REGION}" . .PHONY: al2 -al2: check-region init validate release.auto.pkrvars.hcl +al2: check-region init validate release-al2.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2" -var "region=${REGION}" . .PHONY: al2arm -al2arm: check-region init validate release.auto.pkrvars.hcl +al2arm: check-region init validate release-al2.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2arm" -var "region=${REGION}" . .PHONY: al2gpu -al2gpu: check-region init validate release.auto.pkrvars.hcl +al2gpu: check-region init validate release-al2.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2gpu" -var "region=${REGION}" . .PHONY: al2keplergpu -al2keplergpu: check-region init validate release.auto.pkrvars.hcl +al2keplergpu: check-region init validate release-al2.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2keplergpu" -var "region=${REGION}" . .PHONY: al2inf -al2inf: check-region init validate release.auto.pkrvars.hcl +al2inf: check-region init validate release-al2.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2inf" -var "region=${REGION}" . .PHONY: al2kernel5dot10 -al2kernel5dot10: check-region init validate release.auto.pkrvars.hcl +al2kernel5dot10: check-region init validate release-al2.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2kernel5dot10" -var "region=${REGION}" . .PHONY: al2kernel5dot10arm -al2kernel5dot10arm: check-region init validate release.auto.pkrvars.hcl +al2kernel5dot10arm: check-region init validate release-al2.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2kernel5dot10arm" -var "region=${REGION}" . .PHONY: al2023 -al2023: check-region init validate release.auto.pkrvars.hcl +al2023: check-region init validate release-al2023.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2023" -var "region=${REGION}" . .PHONY: al2023arm -al2023arm: check-region init validate release.auto.pkrvars.hcl +al2023arm: check-region init validate release-al2023.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2023arm" -var "region=${REGION}" . .PHONY: al2023neu -al2023neu: check-region init validate release.auto.pkrvars.hcl +al2023neu: check-region init validate release-al2023.auto.pkrvars.hcl ./packer build -only="amazon-ebs.al2023neu" -var "region=${REGION}" . shellcheck: diff --git a/release-al1.auto.pkrvars.hcl b/release-al1.auto.pkrvars.hcl new file mode 100644 index 0000000..fb4028a --- /dev/null +++ b/release-al1.auto.pkrvars.hcl @@ -0,0 +1,2 @@ +ami_version = "20231024" +source_ami_al1 = "amzn-ami-minimal-hvm-2018.03.0.20231002.0-x86_64-ebs" diff --git a/release-al2.auto.pkrvars.hcl b/release-al2.auto.pkrvars.hcl new file mode 100644 index 0000000..c264943 --- /dev/null +++ b/release-al2.auto.pkrvars.hcl @@ -0,0 +1,5 @@ +ami_version = "20231024" +source_ami_al2 = "amzn2-ami-minimal-hvm-2.0.20230926.0-x86_64-ebs" +source_ami_al2arm = "amzn2-ami-minimal-hvm-2.0.20230926.0-arm64-ebs" +source_ami_al2kernel5dot10 = "amzn2-ami-minimal-hvm-2.0.20230926.0-x86_64-ebs" +source_ami_al2kernel5dot10arm = "amzn2-ami-minimal-hvm-2.0.20230926.0-arm64-ebs" \ No newline at end of file diff --git a/release-al2023.auto.pkrvars.hcl b/release-al2023.auto.pkrvars.hcl new file mode 100644 index 0000000..5f861c5 --- /dev/null +++ b/release-al2023.auto.pkrvars.hcl @@ -0,0 +1,6 @@ +ami_version = "20231024" +source_ami_al2023 = "al2023-ami-minimal-2023.2.20230920.1-kernel-6.1-x86_64" +source_ami_al2023arm = "al2023-ami-minimal-2023.2.20230920.1-kernel-6.1-arm64" +kernel_version_al2023 = "-kernel-6.1" +kernel_version_al2023arm = "-kernel-6.1" +distribution_release_al2023 = "2023.2.20230920" diff --git a/release.auto.pkrvars.hcl b/release.auto.pkrvars.hcl deleted file mode 100644 index c5e2ba3..0000000 --- a/release.auto.pkrvars.hcl +++ /dev/null @@ -1,17 +0,0 @@ -ami_version = "20231024" -ecs_agent_version = "1.78.0" -ecs_init_rev = "1" -docker_version = "20.10.25" -docker_version_al2023 = "20.10.25" -containerd_version = "1.6.19" -containerd_version_al2023 = "1.6.19" -source_ami_al1 = "amzn-ami-minimal-hvm-2018.03.0.20231002.0-x86_64-ebs" -source_ami_al2 = "amzn2-ami-minimal-hvm-2.0.20230926.0-x86_64-ebs" -source_ami_al2arm = "amzn2-ami-minimal-hvm-2.0.20230926.0-arm64-ebs" -source_ami_al2kernel5dot10 = "amzn2-ami-minimal-hvm-2.0.20230926.0-x86_64-ebs" -source_ami_al2kernel5dot10arm = "amzn2-ami-minimal-hvm-2.0.20230926.0-arm64-ebs" -source_ami_al2023 = "al2023-ami-minimal-2023.2.20230920.1-kernel-6.1-x86_64" -source_ami_al2023arm = "al2023-ami-minimal-2023.2.20230920.1-kernel-6.1-arm64" -kernel_version_al2023 = "-kernel-6.1" -kernel_version_al2023arm = "-kernel-6.1" -distribution_release_al2023 = "2023.2.20230920" diff --git a/variables.pkr.hcl b/variables.pkr.hcl index 7e7f650..f0780e0 100644 --- a/variables.pkr.hcl +++ b/variables.pkr.hcl @@ -37,44 +37,50 @@ variable "region" { variable "block_device_size_gb" { type = number - default = 30 description = "Size of the root block device." + default = 30 } variable "ecs_agent_version" { type = string description = "ECS agent version to build AMI with." + default = "1.79.0" } variable "ecs_init_rev" { type = string description = "ecs-init package version rev" + default = "1" } variable "docker_version" { type = string description = "Docker version to build AMI with." + default = "20.10.25" } variable "containerd_version" { type = string description = "Containerd version to build AMI with." + default = "1.6.19" } variable "docker_version_al2023" { type = string description = "Docker version to build AL2023 AMI with." + default = "20.10.25" } variable "containerd_version_al2023" { type = string description = "Containerd version to build AL2023 AMI with." + default = "1.6.19" } variable "exec_ssm_version" { type = string - default = "3.2.1630.0" description = "SSM binary version to build ECS exec support with." + default = "3.2.1630.0" } variable "source_ami_al2" {