Created
January 13, 2020 05:19
-
-
Save jesseloudon/93927c791a682672655123b3afb700c2 to your computer and use it in GitHub Desktop.
AzureProximityPlacementGroup AzureCLI Demo
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
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 "10.0.0.0/20" --subnet-name "AppFrontEnd-SN" --subnet-prefix "10.0.0.0/26" -g "AE-PPGdemo-RG" | |
az network vnet subnet create -n "AppBackEnd-SN" --address-prefix "10.0.1.0/26" --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 "10.0.0.10" --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 "10.0.0.11" --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 "10.0.1.10" --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 "10.0.1.11" --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