Skip to content

scseely/PackerAzureDemo

Repository files navigation

Requirements

Must have Azure CLI and jq installed.

Next, login to your Azure account:

az login az account set -s

Now, create a Service Principal to handle the login (and capture the output for this command! You can't retrieve the generated password later). Documentation for this is found at https://docs.microsoft.com/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest:

az ad sp create-for-rbac --name ServicePrincipalName

From the output of the previous step, update demo-centos-variables.json such that the variables are appropriate for your environment.

Finally, run packvm.sh. This will create the VM as you require.

You can now adapt the packer file, demo-centos.json, to your requirements.

Updating the base image:

The following command lists the CentOS images published by OpenLogic:

az vm image list --location centralus --publisher OpenLogic --all

Finally, when updating an existing VM offer on Azure, follow these guidelines.

About

Demonstration of how to create a VM on Azure using Packer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published