Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 1 | { |
| 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 Grimberg | ae4643e | 2017-02-07 10:31:11 -0800 | [diff] [blame^] | 22 | "image_name": "{{user `distro`}} - docker - {{isotime \"20060102-1504\"}}", |
Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 23 | "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 Grimberg | ae4643e | 2017-02-07 10:31:11 -0800 | [diff] [blame^] | 47 | "provision/docker.sh", |
Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 48 | "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 | } |