Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 1 | { |
| 2 | "variables": { |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 3 | "ansible_roles_path": ".galaxy", |
Anil Belur | d0295bd | 2022-04-23 09:05:01 +1000 | [diff] [blame] | 4 | "arch": "x86_64", |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 5 | "base_image": null, |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 6 | "distro": null, |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 7 | "cloud_auth_url": null, |
| 8 | "cloud_user": null, |
| 9 | "cloud_pass": null, |
| 10 | "cloud_network": null, |
| 11 | "cloud_tenant": null, |
| 12 | "cloud_user_data": null, |
Anil Belur | d0295bd | 2022-04-23 09:05:01 +1000 | [diff] [blame] | 13 | "flavor": "v3-standard-2", |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 14 | "ssh_user": null, |
| 15 | "ssh_proxy_host": "" |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 16 | }, |
| 17 | "builders": [ |
| 18 | { |
Anil Belur | a2d7fbb | 2021-03-18 15:17:00 +1000 | [diff] [blame] | 19 | "name": "openstack", |
Jessica Wagantall | 6d248e4 | 2018-10-25 15:43:41 -0700 | [diff] [blame] | 20 | "image_name": "{{user `distro`}} - memcached - {{user `arch`}} - {{isotime \"20180101-1003\"}}", |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 21 | "source_image_name": "{{user `base_image`}}", |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 22 | "type": "openstack", |
| 23 | "identity_endpoint": "{{user `cloud_auth_url`}}", |
| 24 | "username": "{{user `cloud_user`}}", |
| 25 | "password": "{{user `cloud_pass`}}", |
| 26 | "tenant_name": "{{user `cloud_tenant`}}", |
| 27 | "domain_name": "Default", |
| 28 | "region": "ca-ymq-1", |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 29 | "networks": [ |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 30 | "{{user `cloud_network`}}" |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 31 | ], |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 32 | "user_data_file": "{{user `cloud_user_data`}}", |
| 33 | "ssh_username": "{{user `ssh_user`}}", |
| 34 | "ssh_proxy_host": "{{user `ssh_proxy_host`}}", |
Anil Belur | d0295bd | 2022-04-23 09:05:01 +1000 | [diff] [blame] | 35 | "flavor": "{{user `flavor`}}", |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 36 | "metadata": { |
| 37 | "ci_managed": "yes" |
| 38 | } |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 39 | } |
| 40 | ], |
| 41 | "provisioners": [ |
| 42 | { |
| 43 | "type": "shell", |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 44 | "scripts": [ |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 45 | "common-packer/provision/install-python.sh" |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 46 | ], |
| 47 | "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" |
Jessica Wagantall | 79059b0 | 2018-07-20 20:30:09 -0700 | [diff] [blame] | 48 | }, |
| 49 | { |
| 50 | "type": "shell-local", |
| 51 | "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}" |
| 52 | }, |
| 53 | { |
| 54 | "type": "ansible", |
| 55 | "playbook_file": "provision/memcached.yaml", |
| 56 | "ansible_env_vars": [ |
| 57 | "ANSIBLE_NOCOWS=1", |
| 58 | "ANSIBLE_PIPELINING=True", |
| 59 | "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}", |
| 60 | "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", |
| 61 | "ANSIBLE_STDOUT_CALLBACK=debug" |
| 62 | ] |
Gary Wu | ab1a4c9 | 2017-08-25 06:46:17 -0700 | [diff] [blame] | 63 | } |
| 64 | ] |
| 65 | } |