Fix basebuild job by adding multiarch support (was trying to build on x86_64 with an arm64 image)
Change-Id: Ie9be1a1a7aac016139e17d3293e22e744d527eaa
diff --git a/packer/templates/basebuild.json b/packer/templates/basebuild.json
index 0189a02..92f5090 100644
--- a/packer/templates/basebuild.json
+++ b/packer/templates/basebuild.json
@@ -8,12 +8,13 @@
"subnet_id": null,
"ssh_user": null,
"distro": null,
- "cloud_user_data": null
+ "cloud_user_data": null,
+ "arch": "x86_64"
},
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
- "ami_name": "{{user `distro`}} - basebuild - {{isotime \"20060102-1504\"}}",
+ "ami_name": "{{user `distro`}} - basebuild - {{user `arch`}} - {{isotime \"20060102-1504\"}}",
"instance_type": "t2.micro",
"region": "us-west-2",
"secret_key": "{{user `aws_security_key`}}",
@@ -21,6 +22,7 @@
"source_ami_filter": {
"filters": {
"name": "{{user `source_ami_filter_name`}}",
+ "architecture": "{{user `arch`}}",
"root-device-type": "ebs",
"virtualization-type": "hvm"
},
diff --git a/packer/vars/centos-7.json b/packer/vars/centos-7.json
index 5e6d1c8..aa629a9 100644
--- a/packer/vars/centos-7.json
+++ b/packer/vars/centos-7.json
@@ -4,5 +4,6 @@
"ssh_user": "centos",
"distro": "CentOS 7",
+ "arch": "x86_64",
"cloud_user_data": "provision/rh-user_data.sh"
}
diff --git a/packer/vars/ubuntu-16.04.json b/packer/vars/ubuntu-16.04.json
index b0e9132..972ff75 100644
--- a/packer/vars/ubuntu-16.04.json
+++ b/packer/vars/ubuntu-16.04.json
@@ -1,8 +1,10 @@
{
"source_ami_filter_name": "*ubuntu*16.04*",
"source_ami_filter_owner": "099720109477",
+
"ssh_user": "ubuntu",
"distro": "Ubuntu 16.04",
+ "arch": "x86_64",
"cloud_user_data": "provision/null_data.sh"
}