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, |
Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 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`}} - basebuild - {{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", |
Andrew Grimberg | 4aca8a8 | 2017-05-03 16:16:30 -0400 | [diff] [blame] | 34 | "inline": [ |
| 35 | "mkdir -p /tmp/packer" |
| 36 | ] |
Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 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/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 | } |