github.com/manicqin/nomad@v0.9.5/terraform/azure/packer.json (about) 1 { 2 "variables": { 3 "azure_client_id": "{{ env `ARM_CLIENT_ID` }}", 4 "azure_client_secret": "{{ env `ARM_CLIENT_SECRET` }}", 5 "azure_subscription_id": "{{ env `ARM_SUBSCRIPTION_ID` }}", 6 "azure_resource_group": "{{ env `AZURE_RESOURCE_GROUP` }}" 7 }, 8 "builders": [ 9 { 10 "type": "azure-arm", 11 "client_id": "{{ user `azure_client_id` }}", 12 "client_secret": "{{ user `azure_client_secret` }}", 13 "subscription_id": "{{ user `azure_subscription_id` }}", 14 "managed_image_resource_group_name": "{{ user `azure_resource_group` }}", 15 "location": "East US", 16 "image_publisher": "Canonical", 17 "image_offer": "UbuntuServer", 18 "image_sku": "16.04-LTS", 19 "os_type": "Linux", 20 "ssh_username": "packer", 21 "managed_image_name": "hashistack", 22 "azure_tags": { 23 "Product": "Hashistack" 24 } 25 }], 26 "provisioners": [ 27 { 28 "type": "shell", 29 "inline": [ 30 "sudo mkdir /ops", 31 "sudo chmod 777 /ops" 32 ] 33 }, 34 { 35 "type": "file", 36 "source": "../shared", 37 "destination": "/ops" 38 }, 39 { 40 "type": "file", 41 "source": "../examples", 42 "destination": "/ops" 43 }, 44 { 45 "type": "shell", 46 "script": "../shared/scripts/setup.sh" 47 }, 48 { 49 "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'", 50 "inline": [ 51 "apt-get update -qq -y", 52 "apt-get upgrade -qq -y", 53 "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync" 54 ], 55 "inline_shebang": "/bin/sh -x", 56 "type": "shell" 57 }] 58 }