Packer images for Azure Cloud
Differenes Compared To AWS
- After Creating a VM Image, VM becomes unusable
References
Packer sample used in class room
{
"variables": {
"azure_subscription_id": "",
"azure_client_id": "",
"azure_client_secret": "",
"azure_tenant_id": ""
},
"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`}}",
"managed_image_resource_group_name": "packer",
"location": "centralus",
"os_type": "Linux",
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04-LTS",
"vm_size": "Standard_B1s",
"managed_image_name": "petclinic"
}
],
"provisioners":[
{
"type": "shell",
"script": "./deploypetclinic.sh"
}
]
}
Immutable Infrastructure using Packer
Any Change means New Image