45 lines
1.3 KiB
JSON
45 lines
1.3 KiB
JSON
{
|
|
"builders" : [
|
|
{
|
|
"type": "azure-arm",
|
|
|
|
"subscription_id": "{{user `azure_subscription_id`}}",
|
|
"client_id": "{{user `azure_client_id`}}",
|
|
"client_secret": "{{user `azure_client_secret`}}",
|
|
"tenant_id" : "{{user `azure_tenant_id`}}",
|
|
|
|
"resource_group_name": "azureagents-for-codevalet",
|
|
"storage_account": "codevaletimages",
|
|
|
|
"capture_container_name": "images",
|
|
"capture_name_prefix": "packer",
|
|
|
|
|
|
"os_type": "Linux",
|
|
"image_publisher": "Canonical",
|
|
"image_offer": "UbuntuServer",
|
|
"image_sku": "16.04-LTS",
|
|
|
|
"location": "West US",
|
|
"vm_size": "Standard_DS2_v2"
|
|
}
|
|
],
|
|
"provisioners" : [
|
|
{
|
|
"type" : "shell",
|
|
"inline" : [
|
|
"curl -sSL https://get.docker.com | bash",
|
|
"sudo apt-get install -qy git make default-jdk"
|
|
]
|
|
},
|
|
{
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
|
|
"inline": [
|
|
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
|
|
],
|
|
"inline_shebang": "/bin/sh -x",
|
|
"type": "shell"
|
|
}
|
|
]
|
|
}
|