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