Created
August 17, 2019 01:21
-
-
Save Adron/f99ab85c58d341199de69ec85d101d7d to your computer and use it in GitHub Desktop.
A Build Script for Packer on Azure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GROUPNAME="adrons-images" | |
LOCATION="westus2" | |
STORAGENAME="adronsimagestorage" | |
IMAGECASSANDRA="basecassandra" | |
echo 'Deleting existing image.' | |
az image delete -g $GROUPNAME -n $IMAGECASSANDRA | |
echo 'Creating the managed resource group for images.' | |
az group create --name $GROUPNAME --location $LOCATION | |
echo 'Creating the storage account for image storage.' | |
az storage account create \ | |
--name $STORAGENAME --resource-group $GROUPNAME \ | |
--location $LOCATION \ | |
--sku Standard_LRS \ | |
--kind Storage | |
echo 'Building Apache cluster node image.' | |
packer build -var 'imagename='$IMAGECASSANDRA node-cassandra.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment