forked from hashicorp/nomad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker.json
58 lines (58 loc) · 1.48 KB
/
packer.json
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
57
58
{
"variables": {
"azure_client_id": "{{ env `ARM_CLIENT_ID` }}",
"azure_client_secret": "{{ env `ARM_CLIENT_SECRET` }}",
"azure_subscription_id": "{{ env `ARM_SUBSCRIPTION_ID` }}",
"azure_resource_group": "{{ env `AZURE_RESOURCE_GROUP` }}"
},
"builders": [
{
"type": "azure-arm",
"client_id": "{{ user `azure_client_id` }}",
"client_secret": "{{ user `azure_client_secret` }}",
"subscription_id": "{{ user `azure_subscription_id` }}",
"managed_image_resource_group_name": "{{ user `azure_resource_group` }}",
"location": "East US",
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04-LTS",
"os_type": "Linux",
"ssh_username": "packer",
"managed_image_name": "hashistack",
"azure_tags": {
"Product": "Hashistack"
}
}],
"provisioners": [
{
"type": "shell",
"inline": [
"sudo mkdir /ops",
"sudo chmod 777 /ops"
]
},
{
"type": "file",
"source": "../shared",
"destination": "/ops"
},
{
"type": "file",
"source": "../examples",
"destination": "/ops"
},
{
"type": "shell",
"script": "../shared/scripts/setup.sh"
},
{
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
"inline": [
"apt-get update -qq -y",
"apt-get upgrade -qq -y",
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
],
"inline_shebang": "/bin/sh -x",
"type": "shell"
}]
}