Make flavor configurable for templates 52/12052/2
authorJeremy Phelps <jphelps@linuxfoundation.org>
Tue, 31 Jul 2018 20:18:33 +0000 (15:18 -0500)
committerJeremy Phelps <jphelps@linuxfoundation.org>
Tue, 31 Jul 2018 20:30:37 +0000 (15:30 -0500)
This is needed to support aarch64 images in vexx as they will
only run on v2 flavor types.

Change-Id: I6edb29431f14df8c3afea44b5d4f19f19c48f837
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
templates/builder-aws.json
templates/builder.json
templates/docker.json
templates/windows-builder.json
vars/centos-7-arm64.json
vars/ubuntu-18.04-arm64.json

index a7f1c29..02aea40 100644 (file)
@@ -2,20 +2,20 @@
   "description": "Build an AMI for use as a CI builder",
   "variables": {
     "ansible_roles_path": ".galaxy",
+    "arch": "x86_64",
+    "aws_instance_type": "t2.micro",
+    "aws_region": "us-west-2",
     "aws_access_key": null,
     "aws_secret_key": null,
+    "cloud_user_data": null,
+    "distro": null,
     "security_group_id": null,
     "source_ami_filter_name": null,
     "source_ami_filter_owner": null,
-    "aws_instance_type": "t2.micro",
-    "aws_region": "us-west-2",
-    "vpc_id": null,
     "subnet_id": null,
     "ssh_user": null,
-    "distro": null,
-    "cloud_user_data": null,
     "ssh_proxy_host": "",
-    "arch": "x86_64"
+    "vpc_id": null
   },
   "builders": [
     {
index be9e2db..f9cc918 100644 (file)
@@ -1,17 +1,18 @@
 {
   "variables": {
     "ansible_roles_path": ".galaxy",
+    "arch": "x86_64",
     "base_image": null,
-    "distro": null,
     "cloud_auth_url": null,
     "cloud_user": null,
     "cloud_pass": null,
     "cloud_network": null,
     "cloud_tenant": null,
     "cloud_user_data": null,
+    "distro": null,
+    "flavor": "v1-standard-1",
     "ssh_user": null,
-    "ssh_proxy_host": "",
-    "arch": "x86_64"
+    "ssh_proxy_host": ""
   },
   "builders": [
     {
@@ -33,7 +34,7 @@
       "user_data_file": "{{user `cloud_user_data`}}",
       "ssh_username": "{{user `ssh_user`}}",
       "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
-      "flavor": "v1-standard-1",
+      "flavor": "{{user `flavor`}}",
       "metadata": {
         "ci_managed": "yes"
       }
index dff4793..ced77bc 100644 (file)
@@ -1,17 +1,18 @@
 {
   "variables": {
     "ansible_roles_path": ".galaxy",
+    "arch": "x86_64",
     "base_image": null,
-    "distro": null,
     "cloud_auth_url": null,
     "cloud_user": null,
     "cloud_pass": null,
     "cloud_network": null,
     "cloud_tenant": null,
     "cloud_user_data": null,
+    "distro": null,
+    "flavor": "v1-standard-1",
     "ssh_user": null,
-    "ssh_proxy_host": "",
-    "arch": "x86_64"
+    "ssh_proxy_host": ""
   },
   "builders": [
     {
@@ -33,7 +34,7 @@
       "user_data_file": "{{user `cloud_user_data`}}",
       "ssh_username": "{{user `ssh_user`}}",
       "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
-      "flavor": "v1-standard-1",
+      "flavor": "{{user `flavor`}}",
       "metadata": {
         "ci_managed": "yes"
       }
index ebee254..577591d 100644 (file)
@@ -1,15 +1,16 @@
 {
   "variables": {
     "ansible_roles_path": ".galaxy",
+    "arch": "x86_64",
     "base_image": null,
-    "distro": null,
     "cloud_auth_url": null,
     "cloud_user": null,
     "cloud_pass": null,
     "cloud_network": null,
     "cloud_tenant": null,
     "cloud_user_data": null,
-    "arch": "x86_64"
+    "distro": null,
+    "flavor": "v1-standard-4"
   },
   "builders": [
     {
@@ -29,7 +30,7 @@
         "{{user `cloud_network`}}"
       ],
       "user_data_file": "{{user `cloud_user_data`}}",
-      "flavor": "v1-standard-4",
+      "flavor": "{{user `flavor`}}",
       "communicator": "winrm",
       "winrm_insecure": true,
       "winrm_use_ssl": true,
index b2593a5..0f0a421 100644 (file)
@@ -1,9 +1,10 @@
 {
-  "source_ami_filter_name": "*CentOS Linux 7*HVM*",
-  "source_ami_filter_owner": "679593333241",
+  "arch": "arm64",
   "base_image": "CentOS 7 aarch64 (2018-07-12) - LF upload",
-  "distro": "CentOS 7",
-  "ssh_user": "centos",
   "cloud_user_data": "common-packer/provision/rh-user_data.sh",
-  "arch": "arm64"
+  "distro": "CentOS 7",
+  "flavor": "v2-standard-1",
+  "source_ami_filter_name": "*CentOS Linux 7*HVM*",
+  "source_ami_filter_owner": "679593333241",
+  "ssh_user": "centos"
 }
index 0e0f578..e9bbdcb 100644 (file)
@@ -1,9 +1,10 @@
 {
-  "source_ami_filter_name": "*ubuntu*16.04*",
-  "source_ami_filter_owner": "099720109477",
+  "arch": "arm64",
   "base_image": "Ubuntu 18.04 LTS (arm64) [2018-04-29]",
-  "distro": "Ubuntu 18.04",
-  "ssh_user": "ubuntu",
   "cloud_user_data": "common-packer/provision/ubuntu-user_data.sh",
-  "arch": "arm64"
+  "distro": "Ubuntu 18.04",
+  "flavor": "v2-standard-1",
+  "source_ami_filter_name": "*ubuntu*16.04*",
+  "source_ami_filter_owner": "099720109477",
+  "ssh_user": "ubuntu"
 }