Packer Classroom Series – 14 /Sep/19

Packer images for Azure Cloud

Differenes Compared To AWS

  1. After Creating a VM Image, VM becomes unusable

References

  1. VM Creation
  2. Packer Image Creation

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

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube