blob: ff84a72d6038adad2f4d6f47fc8a3b1fb9dc307d [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,
Andrew Grimbergebc710a2017-01-30 12:59:38 -08007 "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 Grimberg4aca8a82017-05-03 16:16:30 -040034 "inline": [
35 "mkdir -p /tmp/packer"
36 ]
Andrew Grimbergebc710a2017-01-30 12:59:38 -080037 },
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}