-
-
Save Laxman-SM/0caacf52074f9c3ed68c6f189b8a2c0d to your computer and use it in GitHub Desktop.
Vm creation for setting up presto coordinator and worker
This file contains hidden or 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
#Create resource group in azure to keep all the resources. | |
ResourceGroupName="PrestoResourceGroup" | |
Location="eastus" | |
Subscription="Azure-Subscription-Name" | |
az group create --name $ResourceGroupName --location $Location --subscription $Subscription | |
#Create vnet and 2 VMs one for Presto coordinator and one for Presto worker | |
CoordinatorName="presto-coordinator-vm" | |
WorkerName="presto-worker-vm" | |
AdminPassword="PasswordOfYourChoice" | |
VNetName="presto-vnet" | |
NsgName="presto-nsg" | |
az network vnet create --name $VNetName --resource-group $ResourceGroupName --subnet-name default --subscription $Subscription | |
az network nsg create --name $NsgName --resource-group $ResourceGroupName --subscription $Subscription | |
az vm create \ | |
--subscription $Subscription \ | |
--resource-group $ResourceGroupName \ | |
--name $CoordinatorName \ | |
--nsg $NsgName \ | |
--vnet-name $VNetName \ | |
--subnet "default" \ | |
--image centos \ | |
--admin-username azureuser \ | |
--admin-password $AdminPassword \ | |
--size Standard_D2_v3 | |
az vm create \ | |
--subscription $Subscription \ | |
--resource-group $ResourceGroupName \ | |
--name $WorkerName \ | |
--nsg $NsgName \ | |
--vnet-name $VNetName \ | |
--subnet "default" \ | |
--image centos \ | |
--admin-username azureuser \ | |
--admin-password $AdminPassword \ | |
--size Standard_D2_v3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment