Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ubuntu 24.04 LTS for Azure #1454

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion images/capi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ $(AZURE_BUILD_SIG_GEN2_TARGETS): deps-azure

.PHONY: $(AZURE_BUILD_SIG_CVM_TARGETS)
$(AZURE_BUILD_SIG_CVM_TARGETS): deps-azure
. $(abspath packer/azure/scripts/init-sig.sh) $(subst build-azure-sig-,,$@) && packer build $(if $(findstring windows,$@),$(PACKER_WINDOWS_NODE_FLAGS),$(PACKER_NODE_FLAGS)) -var-file="$(abspath packer/azure/azure-config.json)" -var-file="$(abspath packer/azure/azure-sig-cvm.json)" -var-file="$(abspath packer/azure/$(subst build-azure-sig-,,$@).json)" -only="$(subst build-azure-,,$@)" $(ABSOLUTE_PACKER_VAR_FILES) packer/azure/packer$(findstring -windows,$@).json
. $(abspath packer/azure/scripts/init-sig.sh) $(subst build-azure-sig-,,$@) && $(PACKER) build $(if $(findstring windows,$@),$(PACKER_WINDOWS_NODE_FLAGS),$(PACKER_NODE_FLAGS)) -var-file="$(abspath packer/azure/azure-config.json)" -var-file="$(abspath packer/azure/azure-sig-cvm.json)" -var-file="$(abspath packer/azure/$(subst build-azure-sig-,,$@).json)" -only="$(subst build-azure-,,$@)" $(ABSOLUTE_PACKER_VAR_FILES) packer/azure/packer$(findstring -windows,$@).json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! 👍


.PHONY: $(AZURE_VALIDATE_SIG_TARGETS)
$(AZURE_VALIDATE_SIG_TARGETS): deps-azure
Expand Down Expand Up @@ -627,6 +627,7 @@ build-ami-all: $(AMI_BUILD_TARGETS) ## Builds all AMIs

build-azure-sig-ubuntu-2004: ## Builds Ubuntu 20.04 Azure managed image in Shared Image Gallery
build-azure-sig-ubuntu-2204: ## Builds Ubuntu 22.04 Azure managed image in Shared Image Gallery
build-azure-sig-ubuntu-2404: ## Builds Ubuntu 24.04 Azure managed image in Shared Image Gallery
build-azure-sig-centos-7: ## Builds CentOS 7 Azure managed image in Shared Image Gallery
build-azure-sig-mariner-2: ## Builds Mariner 2 Azure managed image in Shared Image Gallery
build-azure-sig-rhel-8: ## Builds RHEL 8 Azure managed image in Shared Image Gallery
Expand All @@ -636,6 +637,7 @@ build-azure-sig-windows-2019-containerd-cvm: ## Builds Windows Server 2019 with
build-azure-sig-windows-2022-containerd-cvm: ## Builds Windows Server 2022 with containerd CVM Azure managed image in Shared Image Gallery
build-azure-vhd-ubuntu-2004: ## Builds Ubuntu 20.04 VHD image for Azure
build-azure-vhd-ubuntu-2204: ## Builds Ubuntu 22.04 VHD image for Azure
build-azure-vhd-ubuntu-2404: ## Builds Ubuntu 24.04 VHD image for Azure
build-azure-vhd-centos-7: ## Builds CentOS 7 VHD image for Azure
build-azure-vhd-mariner-2: ## Builds Mariner 2 VHD image for Azure
build-azure-vhd-rhel-8: ## Builds RHEL 8 VHD image for Azure
Expand All @@ -648,8 +650,10 @@ build-azure-sig-flatcar: ## Builds Flatcar Azure managed image in Shared Image G
build-azure-sig-flatcar-gen2: ## Builds Flatcar Azure Gen2 managed image in Shared Image Gallery
build-azure-sig-ubuntu-2004-gen2: ## Builds Ubuntu 20.04 Gen2 managed image in Shared Image Gallery
build-azure-sig-ubuntu-2204-gen2: ## Builds Ubuntu 22.04 Gen2 managed image in Shared Image Gallery
build-azure-sig-ubuntu-2404-gen2: ## Builds Ubuntu 24.04 Gen2 managed image in Shared Image Gallery
build-azure-sig-ubuntu-2004-cvm: ## Builds Ubuntu 20.04 CVM managed image in Shared Image Gallery
build-azure-sig-ubuntu-2204-cvm: ## Builds Ubuntu 22.04 CVM managed image in Shared Image Gallery
build-azure-sig-ubuntu-2404-cvm: ## Builds Ubuntu 24.04 CVM managed image in Shared Image Gallery
build-azure-vhds: $(AZURE_BUILD_VHD_TARGETS) ## Builds all Azure VHDs
build-azure-sigs: $(AZURE_BUILD_SIG_TARGETS) $(AZURE_BUILD_SIG_GEN2_TARGETS) $(AZURE_BUILD_SIG_CVM_TARGETS) ## Builds all Azure Shared Image Gallery images

Expand Down Expand Up @@ -822,6 +826,7 @@ validate-azure-sig-mariner-2: ## Validates Mariner 2 Azure managed image in Shar
validate-azure-sig-rhel-8: ## Validates RHEL 8 Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-ubuntu-2004: ## Validates Ubuntu 20.04 Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-ubuntu-2204: ## Validates Ubuntu 22.04 Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-ubuntu-2404: ## Validates Ubuntu 24.04 Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-windows-2019-containerd: ## Validate Windows Server 2019 with containerd Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-windows-2022-containerd: ## Validate Windows Server 2022 with containerd Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-windows-annual-containerd: ## Validate Windows Server Annual Channel with containerd Azure managed image in Shared Image Gallery Packer config
Expand All @@ -830,6 +835,7 @@ validate-azure-vhd-mariner-2: ## Validates Mariner 2 VHD image Azure Packer conf
validate-azure-vhd-rhel-8: ## Validates RHEL 8 VHD image Azure Packer config
validate-azure-vhd-ubuntu-2004: ## Validates Ubuntu 20.04 VHD image Azure Packer config
validate-azure-vhd-ubuntu-2204: ## Validates Ubuntu 22.04 VHD image Azure Packer config
validate-azure-vhd-ubuntu-2404: ## Validates Ubuntu 24.04 VHD image Azure Packer config
validate-azure-vhd-windows-2019-containerd: ## Validate Windows Server 2019 VHD with containerd image Azure Packer config
validate-azure-vhd-windows-2022-containerd: ## Validate Windows Server 2022 VHD with containerd image Azure Packer config
validate-azure-sig-centos-7-gen2: ## Validates CentOS 7 Azure managed image in Shared Image Gallery Packer config
Expand All @@ -838,6 +844,8 @@ validate-azure-sig-ubuntu-2004-gen2: ## Validates Ubuntu 20.04 Azure managed ima
validate-azure-sig-ubuntu-2004-cvm: ## Validates Ubuntu 20.04 CVM Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-ubuntu-2204-gen2: ## Validates Ubuntu 22.04 Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-ubuntu-2204-cvm: ## Validates Ubuntu 22.04 CVM Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-ubuntu-2404-gen2: ## Validates Ubuntu 24.04 Azure managed image in Shared Image Gallery Packer config
validate-azure-sig-ubuntu-2404-cvm: ## Validates Ubuntu 24.04 CVM Azure managed image in Shared Image Gallery Packer config
validate-azure-all: $(AZURE_VALIDATE_SIG_TARGETS) $(AZURE_VALIDATE_VHD_TARGETS) $(AZURE_VALIDATE_SIG_GEN2_TARGETS) $(AZURE_VALIDATE_SIG_CVM_TARGETS) ## Validates all images for Azure Packer config

validate-do-ubuntu-2004: ## Validates Ubuntu 20.04 DigitalOcean Snapshot Packer config
Expand Down
16 changes: 8 additions & 8 deletions images/capi/azure_targets.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VHD_TARGETS="ubuntu-2004 ubuntu-2204 centos-7 mariner-2 rhel-8 windows-2019-containerd windows-2022-containerd"
VHD_CI_TARGETS="ubuntu-2004 ubuntu-2204 mariner-2 windows-2019-containerd windows-2022-containerd"
SIG_TARGETS="ubuntu-2004 ubuntu-2204 centos-7 mariner-2 rhel-8 windows-2019-containerd windows-2022-containerd flatcar"
SIG_CI_TARGETS="ubuntu-2004 ubuntu-2204 mariner-2 windows-2019-containerd windows-2022-containerd flatcar"
SIG_GEN2_TARGETS="ubuntu-2004 ubuntu-2204 centos-7 mariner-2 flatcar"
SIG_GEN2_CI_TARGETS="ubuntu-2004 ubuntu-2204 mariner-2 flatcar"
SIG_CVM_TARGETS="ubuntu-2004 ubuntu-2204 windows-2019-containerd windows-2022-containerd"
SIG_CVM_CI_TARGETS="ubuntu-2204 windows-2022-containerd"
VHD_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 centos-7 mariner-2 rhel-8 windows-2019-containerd windows-2022-containerd"
VHD_CI_TARGETS="ubuntu-2204 ubuntu-2404 mariner-2 windows-2019-containerd windows-2022-containerd"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I traded Ubuntu 20.04 for 24.04 in CI, not wanting to expand our costs per PR run. But please let me know if this doesn't seem like a worthwhile tradeoff.

SIG_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 centos-7 mariner-2 rhel-8 windows-2019-containerd windows-2022-containerd flatcar"
SIG_CI_TARGETS="ubuntu-2204 ubuntu-2404 mariner-2 windows-2019-containerd windows-2022-containerd flatcar"
SIG_GEN2_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 centos-7 mariner-2 flatcar"
SIG_GEN2_CI_TARGETS="ubuntu-2204 ubuntu-2404 mariner-2 flatcar"
SIG_CVM_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 windows-2019-containerd windows-2022-containerd"
SIG_CVM_CI_TARGETS="ubuntu-2204 ubuntu-2404 windows-2022-containerd"
9 changes: 9 additions & 0 deletions images/capi/packer/azure/scripts/init-sig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ case ${SIG_TARGET} in
ubuntu-2204)
create_image_definition ${SIG_TARGET} "22_04-lts" "V1" "Linux"
;;
ubuntu-2404)
create_image_definition ${SIG_TARGET} "24_04-lts" "V1" "Linux"
;;
centos-7)
create_image_definition "centos-7" "centos-7" "V1" "Linux"
;;
Expand Down Expand Up @@ -100,6 +103,12 @@ case ${SIG_TARGET} in
ubuntu-2204-cvm)
create_image_definition ${SIG_TARGET} "22_04-lts-cvm" "V2" "Linux" ${SECURITY_TYPE_CVM_SUPPORTED_FEATURE}
;;
ubuntu-2404-gen2)
create_image_definition ${SIG_TARGET} "24_04-lts-gen2" "V2" "Linux"
;;
ubuntu-2404-cvm)
create_image_definition ${SIG_TARGET} "24_04-lts-cvm" "V2" "Linux" ${SECURITY_TYPE_CVM_SUPPORTED_FEATURE}
;;
centos-7-gen2)
create_image_definition "centos-7-gen2" "centos-7-gen2" "V2" "Linux"
;;
Expand Down
9 changes: 9 additions & 0 deletions images/capi/packer/azure/ubuntu-2404-cvm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"build_name": "ubuntu-2404-cvm",
"distribution": "ubuntu",
"distribution_release": "noble",
"distribution_version": "2404",
"image_offer": "ubuntu-24_04-lts",
"image_publisher": "Canonical",
"image_sku": "cvm"
}
9 changes: 9 additions & 0 deletions images/capi/packer/azure/ubuntu-2404-gen2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"build_name": "ubuntu-2404-gen2",
"distribution": "ubuntu",
"distribution_release": "noble",
"distribution_version": "2404",
"image_offer": "ubuntu-24_04-lts",
"image_publisher": "Canonical",
"image_sku": "server"
}
9 changes: 9 additions & 0 deletions images/capi/packer/azure/ubuntu-2404.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"build_name": "ubuntu-2404",
"distribution": "ubuntu",
"distribution_release": "noble",
"distribution_version": "2404",
"image_offer": "ubuntu-24_04-lts",
"image_publisher": "Canonical",
"image_sku": "server-gen1"
}