Skip to content

Commit bb93485

Browse files
authored
Merge pull request #1740 from hajowieland/ami-flatcar-arm64
feat(ami): add Flatcar arm64 support
2 parents d2e21e5 + 1590d5e commit bb93485

File tree

13 files changed

+60
-13
lines changed

13 files changed

+60
-13
lines changed

docs/book/src/capi/providers/aws.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@ In addition to the configuration found in `images/capi/packer/config`, the `ami`
3838
directory includes several JSON files that define the default configuration for
3939
the different operating systems.
4040

41-
| File | Description |
42-
|------|-------------|
43-
| `amazon-2.json` | The settings for the Amazon 2 Linux image |
44-
| `centos-7.json` | The settings for the CentOS 7 image |
45-
| `flatcar.json` | The settings for the Flatcar image |
46-
| `rhel-8.json` | The settings for the RHEL 8 image |
47-
| `rockylinux.json` | The settings for the Rocky Linux image |
48-
| `ubuntu-2004.json` | The settings for the Ubuntu 20.04 image |
49-
| `ubuntu-2204.json` | The settings for the Ubuntu 22.04 image |
50-
| `ubuntu-2404.json` | The settings for the Ubuntu 24.04 image |
51-
| `windows-2019.json` | The settings for the Windows 2019 image |
41+
| File | Description |
42+
|----------------------|-------------------------------------------|
43+
| `amazon-2.json` | The settings for the Amazon 2 Linux image |
44+
| `centos-7.json` | The settings for the CentOS 7 image |
45+
| `flatcar.json` | The settings for the Flatcar image |
46+
| `flatcar-arm64.json` | The settings for the Flatcar arm64 image |
47+
| `rhel-8.json` | The settings for the RHEL 8 image |
48+
| `rockylinux.json` | The settings for the Rocky Linux image |
49+
| `ubuntu-2004.json` | The settings for the Ubuntu 20.04 image |
50+
| `ubuntu-2204.json` | The settings for the Ubuntu 22.04 image |
51+
| `ubuntu-2404.json` | The settings for the Ubuntu 24.04 image |
52+
| `windows-2019.json` | The settings for the Windows 2019 image |
5253

5354

5455
#### Common AWS options

images/capi/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ NODE_OVA_VSPHERE_BUILD_NAMES := $(addprefix node-ova-vsphere-,$(PLATFORMS_AND_V
363363
NODE_OVA_VSPHERE_BASE_BUILD_NAMES := $(addprefix node-ova-vsphere-base-,$(PLATFORMS_AND_VERSIONS))
364364
NODE_OVA_VSPHERE_CLONE_BUILD_NAMES := $(addprefix node-ova-vsphere-clone-,$(PLATFORMS_AND_VERSIONS))
365365

366-
AMI_BUILD_NAMES ?= ami-centos-7 ami-ubuntu-2004 ami-ubuntu-2204 ami-ubuntu-2404 ami-amazon-2 ami-amazon-2023 ami-flatcar ami-windows-2019 ami-rockylinux-8 ami-rhel-8
366+
AMI_BUILD_NAMES ?= ami-centos-7 ami-ubuntu-2004 ami-ubuntu-2204 ami-ubuntu-2404 ami-amazon-2 ami-amazon-2023 ami-flatcar ami-flatcar-arm64 ami-windows-2019 ami-rockylinux-8 ami-rhel-8
367367
HUAWEICLOUD_BUILD_NAMES ?= huaweicloud-ubuntu-2204
368368
GCE_BUILD_NAMES ?= gce-ubuntu-2004 gce-ubuntu-2204 gce-ubuntu-2404 gce-rhel-8
369369

@@ -672,6 +672,7 @@ build-ami-ubuntu-2404: ## Builds Ubuntu 24.04 AMI
672672
build-ami-rockylinux-8: ## Builds RockyLinux 8 AMI
673673
build-ami-rhel-8: ## Builds RHEL-8 AMI
674674
build-ami-flatcar: ## Builds Flatcar
675+
build-ami-flatcar-arm64: ## Builds Flatcar arm64
675676
build-ami-windows-2019: ## Build Windows Server 2019 AMI Packer config
676677
build-ami-all: $(AMI_BUILD_TARGETS) ## Builds all AMIs
677678

@@ -912,6 +913,7 @@ validate-ami-centos-7: ## Validates CentOS 7 AMI Packer c`onfig
912913
validate-ami-rockylinux-8: ## Validates RockyLinux 8 AMI Packer config
913914
validate-ami-rhel-8: ## Validates RHEL-8 AMI Packer config
914915
validate-ami-flatcar: ## Validates Flatcar AMI Packer config
916+
validate-ami-flatcar-arm64: ## Validates Flatcar arm64 AMI Packer config
915917
validate-ami-ubuntu-2004: ## Validates Ubuntu 20.04 AMI Packer config
916918
validate-ami-ubuntu-2204: ## Validates Ubuntu 22.04 AMI Packer config
917919
validate-ami-ubuntu-2404: ## Validates Ubuntu 22.04 AMI Packer config

images/capi/packer/ami/amazon-2.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"ami_filter_arch": "x86_64",
23
"ami_filter_name": "amzn2-ami-hvm-2*",
34
"ami_filter_owners": "amazon",
5+
"arch": "amd64",
46
"build_name": "amazon-2",
57
"distribution": "Amazon Linux",
68
"distribution_release": "Amazon Linux 2",

images/capi/packer/ami/amazon-2023.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"ami_filter_arch": "x86_64",
23
"ami_filter_name": "al2023-ami-minimal-2023.*-kernel-6.1*",
34
"ami_filter_owners": "amazon",
5+
"arch": "amd64",
46
"build_name": "amazon-2023",
57
"distribution": "Amazon Linux",
68
"distribution_release": "Amazon Linux 2023",

images/capi/packer/ami/centos-7.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"ami_filter_arch": "x86_64",
23
"ami_filter_name": "CentOS Linux 7 x86_64 HVM EBS ENA*",
34
"ami_filter_owners": "461800378586",
5+
"arch": "amd64",
46
"build_name": "centos-7",
57
"distribution": "CentOS",
68
"distribution_release": "Core",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"ami_filter_arch": "arm64",
3+
"ami_filter_name": "Flatcar*{{env `FLATCAR_CHANNEL`}}*{{env `FLATCAR_VERSION`}}*",
4+
"ami_filter_owners": "075585003325",
5+
"ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python",
6+
"arch": "arm64",
7+
"build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}",
8+
"builder_instance_type": "t4g.small",
9+
"crictl_arch": "arm64",
10+
"crictl_source_type": "http",
11+
"distribution": "flatcar",
12+
"goss_arch": "arm64",
13+
"kubernetes_cni_http_checksum_arch": "arm64",
14+
"kubernetes_cni_source_type": "http",
15+
"kubernetes_goarch": "arm64",
16+
"kubernetes_source_type": "http",
17+
"python_path": "/opt/bin/builder-env/site-packages",
18+
"root_device_name": "/dev/xvda",
19+
"ssh_username": "core",
20+
"systemd_prefix": "/etc/systemd",
21+
"sysusr_prefix": "/opt",
22+
"sysusrlocal_prefix": "/opt",
23+
"user_data": "",
24+
"user_data_file": "packer/files/flatcar/ignition/bootstrap-cloud.json"
25+
}

images/capi/packer/ami/flatcar.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2+
"ami_filter_arch": "x86_64",
23
"ami_filter_name": "Flatcar*{{env `FLATCAR_CHANNEL`}}*{{env `FLATCAR_VERSION`}}*",
34
"ami_filter_owners": "075585003325",
45
"ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python",
6+
"arch": "amd64",
57
"build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}",
68
"crictl_source_type": "http",
79
"distribution": "flatcar",

images/capi/packer/ami/packer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"source_ami": "{{user `source_ami`}}",
3535
"source_ami_filter": {
3636
"filters": {
37-
"architecture": "x86_64",
37+
"architecture": "{{ user `ami_filter_arch` }}",
3838
"name": "{{user `ami_filter_name`}}",
3939
"root-device-type": "ebs",
4040
"virtualization-type": "hvm"
@@ -48,6 +48,7 @@
4848
"subnet_id": "{{ user `subnet_id` }}",
4949
"tags": {
5050
"Name": "{{user `build_name`}}",
51+
"arch": "{{ user `arch` }}",
5152
"build_date": "{{isotime}}",
5253
"build_timestamp": "{{user `build_timestamp`}}",
5354
"containerd_version": "{{user `containerd_version`}}",

images/capi/packer/ami/rhel-8.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"ami_filter_arch": "x86_64",
23
"ami_filter_name": "RHEL-8.6.0_HVM-*",
34
"ami_filter_owners": "309956199498",
5+
"arch": "amd64",
46
"build_name": "rhel-8",
57
"builder_instance_type": "m5.large",
68
"distribution": "rhel",

images/capi/packer/ami/rockylinux-8.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"ami_filter_arch": "x86_64",
23
"ami_filter_name": "Rocky-8-ec2-8.5-*",
34
"ami_filter_owners": "679593333241",
5+
"arch": "amd64",
46
"build_name": "rockylinux-8",
57
"distribution": "rockylinux",
68
"distribution_release": "Core",

0 commit comments

Comments
 (0)