blob: 722785e626890612f3909fa9be608c09947534a1 [file] [log] [blame]
Gary Wuab1a4c92017-08-25 06:46:17 -07001{
2 "variables": {
3 "stack_tenant": null,
4 "stack_user": null,
5 "stack_pass": null,
6 "stack_network": null,
7 "base_image": null,
8 "cloud_user": null,
9 "distro": null,
10 "cloud_user_data": null
11 },
12 "builders": [
13 {
14 "type": "openstack",
15 "identity_endpoint": "https://auth.vexxhost.net/v2.0/",
16 "tenant_name": "{{user `stack_tenant`}}",
17 "username": "{{user `stack_user`}}",
18 "password": "{{user `stack_pass`}}",
19 "region": "ca-ymq-1",
20 "ssh_username": "{{user `cloud_user`}}",
21 "image_name": "{{user `distro`}} - memcached - {{isotime \"20060102-1504\"}}",
22 "source_image_name": "{{user `base_image`}}",
23 "flavor": "v1-standard-1",
24 "availability_zone": "ca-ymq-2",
25 "networks": [
26 "{{user `stack_network`}}"
27 ],
28 "user_data_file": "{{user `cloud_user_data`}}"
29 }
30 ],
31 "provisioners": [
32 {
33 "type": "shell",
34 "inline": [
35 "mkdir -p /tmp/packer"
36 ]
37 },
38 {
39 "type": "file",
40 "source": "provision/basebuild/",
41 "destination": "/tmp/packer"
42 },
43 {
44 "type": "shell",
45 "scripts": [
46 "provision/baseline.sh",
47 "provision/basebuild.sh",
48 "provision/memcached.sh",
49 "provision/system_reseal.sh"
50 ],
51 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
52 }
53 ]
54}