blob: cdf752af05acb4b7e9626ecd98390c97f1476d0a [file] [log] [blame]
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05001{
2 "variables": {
3 "ansible_roles_path": ".galaxy",
Anil Belur0931f242022-04-23 09:02:23 +10004 "arch": "x86_64",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05005 "base_image": null,
6 "distro": null,
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 Belur0931f242022-04-23 09:02:23 +100013 "flavor": "v3-standard-2",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050014 "ssh_user": null,
15 "ssh_proxy_host": ""
16 },
17 "builders": [
18 {
Anil Belura2d7fbb2021-03-18 15:17:00 +100019 "name": "openstack",
Anil Belura108f102018-09-27 19:09:50 +053020 "image_name": "ZZCI - {{user `distro`}} - helm - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
21 "instance_name": "{{user `distro`}}-builder-{{uuid}}",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050022 "source_image_name": "{{user `base_image`}}",
23 "type": "openstack",
24 "identity_endpoint": "{{user `cloud_auth_url`}}",
25 "username": "{{user `cloud_user`}}",
26 "password": "{{user `cloud_pass`}}",
27 "tenant_name": "{{user `cloud_tenant`}}",
28 "domain_name": "Default",
29 "region": "ca-ymq-1",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050030 "networks": [
31 "{{user `cloud_network`}}"
32 ],
33 "user_data_file": "{{user `cloud_user_data`}}",
34 "ssh_username": "{{user `ssh_user`}}",
35 "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
Anil Belur0931f242022-04-23 09:02:23 +100036 "flavor": "{{user `flavor`}}",
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050037 "metadata": {
38 "ci_managed": "yes"
39 }
40 }
41 ],
42 "provisioners": [
43 {
44 "type": "shell",
45 "scripts": [
46 "common-packer/provision/install-python.sh"
47 ],
48 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
49 },
50 {
51 "type": "shell-local",
52 "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
53 },
54 {
55 "type": "ansible",
56 "playbook_file": "provision/helm.yaml",
57 "ansible_env_vars": [
58 "ANSIBLE_NOCOWS=1",
59 "ANSIBLE_PIPELINING=True",
60 "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
61 "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
62 "ANSIBLE_STDOUT_CALLBACK=debug"
63 ]
64 }
65 ]
66}