Automation adds 5g-mec-cloud-gaming.yaml
[ci-management.git] / packer / templates / helm.json
1 {
2   "variables": {
3     "ansible_roles_path": ".galaxy",
4     "arch": "x86_64",
5     "base_image": null,
6     "cloud_network": null,
7     "cloud_user_data": null,
8     "cloud_region": "ca-ymq-1",
9     "cloud_availability_zone": "ca-ymq-2",
10     "vm_use_block_storage": "true",
11     "vm_volume_size": "30",
12     "vm_image_disk_format": "",
13     "distro": null,
14     "flavor": "v1-standard-1",
15     "ssh_user": null,
16     "ssh_proxy_host": ""
17   },
18   "builders": [
19     {
20       "name": "vexxhost",
21       "image_name": "ZZCI - {{user `distro`}} - helm - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
22       "instance_name": "{{user `distro`}}-builder-{{uuid}}",
23       "source_image_name": "{{user `base_image`}}",
24       "type": "openstack",
25       "region": "{{user `cloud_region`}}",
26       "availability_zone": "{{user `cloud_availability_zone`}}",
27       "networks": ["{{user `cloud_network`}}"],
28       "user_data_file": "{{user `cloud_user_data`}}",
29       "ssh_username": "{{user `ssh_user`}}",
30       "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
31       "flavor": "{{user `flavor`}}",
32       "metadata": {
33         "ci_managed": "yes"
34       },
35       "use_blockstorage_volume": "{{user `vm_use_block_storage`}}",
36       "volume_size": "{{user `vm_volume_size`}}",
37       "image_disk_format": "{{user `vm_image_disk_format`}}"
38     }
39   ],
40   "provisioners": [
41     {
42       "type": "shell",
43       "scripts": ["common-packer/provision/install-python.sh"],
44       "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
45     },
46     {
47       "type": "shell-local",
48       "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
49     },
50     {
51       "type": "ansible",
52       "playbook_file": "provision/helm.yaml",
53       "ansible_env_vars": [
54         "ANSIBLE_NOCOWS=1",
55         "ANSIBLE_PIPELINING=True",
56         "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
57         "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
58         "ANSIBLE_STDOUT_CALLBACK=debug"
59       ]
60     }
61   ]
62 }