Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
AzureProximityPlacementGroup AzureCLI Demo
az login
az account set -s "SUBSCRIPTIONID"
az account show -o json
#pre/post deployment discovery - if desired
az group list -o table
az vm availability-set list -o table
az network vnet list -o table
az storage account list -o table
az ppg list -o table
#create Resource Groups (AU East)
az group create --name AE-PPGdemo-RG --location australiaeast
#create Proximity Placement Group
az ppg create -n AE-IaaS-PPG -g AE-PPGdemo-RG -l australiaeast -t standard
#create availability sets
az vm availability-set create -n "AE-AppFrontEnd-AS" -g "AE-PPGdemo-RG" --ppg "AE-IaaS-PPG"
az vm availability-set create -n "AE-AppBackEnd-AS" -g "AE-PPGdemo-RG" --ppg "AE-IaaS-PPG"
#create VNETs & SUBNETs (AU East)
az network vnet create -n "AE-IaaS-VNET" --address-prefix "" --subnet-name "AppFrontEnd-SN" --subnet-prefix "" -g "AE-PPGdemo-RG"
az network vnet subnet create -n "AppBackEnd-SN" --address-prefix "" --vnet-name "AE-IaaS-VNET" -g "AE-PPGdemo-RG"
#create storage accounts
az storage account create -n "aeiaastorage" -l "Australia East" --kind "StorageV2" --sku "Standard_LRS" -g "AE-PPGdemo-RG"
#create network interfaces
az network nic create -n "APPFE1-NIC" --private-ip-address "" --accelerated-networking "true" --subnet "AppFrontEnd-SN" --vnet-name "AE-IaaS-VNET" -g "AE-PPGdemo-RG"
az network nic create -n "APPFE2-NIC" --private-ip-address "" --accelerated-networking "true" --subnet "AppFrontEnd-SN" --vnet-name "AE-IaaS-VNET" -g "AE-PPGdemo-RG"
az network nic create -n "APPBE1-NIC" --private-ip-address "" --accelerated-networking "true" --subnet "AppBackEnd-SN" --vnet-name "AE-IaaS-VNET" -g "AE-PPGdemo-RG"
az network nic create -n "APPBE2-NIC" --private-ip-address "" --accelerated-networking "true" --subnet "AppBackEnd-SN" --vnet-name "AE-IaaS-VNET" -g "AE-PPGdemo-RG"
#create virtual machines AppFrontEnd
az vm create -n "APPFE1" --ppg "AE-IaaS-PPG" --nics "APPFE1-NIC" --size "Standard_D3_v2" --availability-set "AE-AppFrontEnd-AS" --boot-diagnostics-storage "aeiaastorage" --image "Win2016Datacenter" --admin-username "localadmin" --admin-password "*****" --storage-sku "StandardSSD_LRS" -g "AE-PPGdemo-RG" --no-wait
az vm create -n "APPFE2" --ppg "AE-IaaS-PPG" --nics "APPFE2-NIC" --size "Standard_D3_v2" --availability-set "AE-AppFrontEnd-AS" --boot-diagnostics-storage "aeiaastorage" --image "Win2016Datacenter" --admin-username "localadmin" --admin-password "*****" --storage-sku "StandardSSD_LRS" -g "AE-PPGdemo-RG" --no-wait
#create virtual machines AppBackEnd
az vm create -n "APPBE1" --ppg "AE-IaaS-PPG" --nics "APPBE1-NIC" --size "Standard_D3_v2" --availability-set "AE-AppBackEnd-AS" --boot-diagnostics-storage "aeiaastorage" --image "Win2016Datacenter" --admin-username "localadmin" --admin-password "*****" --storage-sku "StandardSSD_LRS" -g "AE-PPGdemo-RG" --no-wait
az vm create -n "APPBE2" --ppg "AE-IaaS-PPG" --nics "APPBE2-NIC" --size "Standard_D3_v2" --availability-set "AE-AppBackEnd-AS" --boot-diagnostics-storage "aeiaastorage" --image "Win2016Datacenter" --admin-username "localadmin" --admin-password "*****" --storage-sku "StandardSSD_LRS" -g "AE-PPGdemo-RG" --no-wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.