aboutsummaryrefslogtreecommitdiffstats
path: root/packer/templates/basebuild.json
blob: 13b640f561957491444871b49d139e53b99622f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  "variables": {
    "stack_tenant": null,
    "stack_user": null,
    "stack_pass": null,
    "stack_network": null,

    "base_image": null,
    "cloud_user": null,
    "distro": null,
    "cloud_user_data": null
  },
  "builders": [
    {
      "name": "vexxhost",
      "image_name": "{{user `distro`}} - basebuild - {{isotime \"20060102-1504\"}}",
      "source_image_name": "{{user `base_image`}}",
      "type": "openstack",
      "identity_endpoint": "https://auth.vexxhost.net/v3/",
      "username": "{{user `stack_user`}}",
      "password": "{{user `stack_pass`}}",
      "tenant_name": "{{user `stack_tenant`}}",
      "domain_name": "Default",
      "region": "ca-ymq-1",
      "networks": [
        "{{user `stack_network`}}"
      ],
      "user_data_file": "{{user `cloud_user_data`}}",
      "ssh_username": "{{user `cloud_user`}}",
      "flavor": "v3-standard-2",
      "metadata": {
        "ci_managed": "yes"
      }
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": ["mkdir -p /tmp/packer"]
    },
    {
      "type": "file",
      "source": "provision/basebuild/",
      "destination": "/tmp/packer"
    },
    {
      "type": "shell",
      "scripts": [
        "provision/baseline.sh",
        "provision/basebuild-no-tmpfs.sh",
        "provision/system_reseal.sh"
      ],
      "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
    }
  ]
}