merge from develop
|
@ -6,9 +6,9 @@
|
|||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing VM to apply Linux custom script to"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
"defaultValue": "[concat('vm', resourceGroup().name)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersion": {
|
||||
|
@ -27,6 +27,7 @@
|
|||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "CustomScriptForLinux",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"commandToExecute": "ifconfig"
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"value": "myVM001"
|
||||
}
|
||||
}
|
||||
}
|
||||
"parameters": { }
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing VM to apply Docker extension to"
|
||||
}
|
||||
},
|
||||
"defaultValue": "[concat('vm', resourceGroup().name)]"
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"value": "myVM001"
|
||||
}
|
||||
}
|
||||
}
|
||||
"parameters": { }
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing Linux VM to modify"
|
||||
}
|
||||
},
|
||||
"defaultValue": "[concat('vm', resourceGroup().name)]"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
|
@ -37,7 +38,8 @@
|
|||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "VMAccessForLinux",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": { },
|
||||
"protectedSettings": {
|
||||
"username": "[parameters('username')]",
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"value": "myVM001"
|
||||
},
|
||||
"username": {
|
||||
"value": "Test"
|
||||
},
|
||||
|
@ -12,4 +9,4 @@
|
|||
"value": "GEN-PASSWORD"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,273 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
echo "starting ubuntu devbox install on pid $$"
|
||||
date
|
||||
ps axjf
|
||||
|
||||
#############
|
||||
# Parameters
|
||||
#############
|
||||
|
||||
AZUREUSER=$1
|
||||
MASTERCOUNT=$2
|
||||
MASTERFIRSTADDR=$3
|
||||
PrivateIP=${4}
|
||||
HOMEDIR="/home/$AZUREUSER"
|
||||
VMNAME=`hostname`
|
||||
BASESUBNET=$5
|
||||
echo "User: $AZUREUSER"
|
||||
echo "User home dir: $HOMEDIR"
|
||||
echo "vmname: $VMNAME"
|
||||
echo "Num of Masters:$MASTERCOUNT"
|
||||
echo "Master Initial Addr: $MASTERFIRSTADDR"
|
||||
echo "adding IP to /etc/hosts"
|
||||
echo "$PrivateIP $VMNAME" >>/etc/hosts
|
||||
###################
|
||||
# Common Functions
|
||||
###################
|
||||
|
||||
ensureAzureNetwork()
|
||||
{
|
||||
# ensure the host name is resolvable
|
||||
hostResolveHealthy=1
|
||||
for i in {1..120}; do
|
||||
getent hosts $VMNAME
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# hostname has been found continue
|
||||
hostResolveHealthy=0
|
||||
echo "the host name resolves"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
if [ $hostResolveHealthy -ne 0 ]
|
||||
then
|
||||
echo "host name does not resolve, aborting install"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ensure the network works
|
||||
networkHealthy=1
|
||||
for i in {1..12}; do
|
||||
wget -O/dev/null http://bing.com
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# hostname has been found continue
|
||||
networkHealthy=0
|
||||
echo "the network is healthy"
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
if [ $networkHealthy -ne 0 ]
|
||||
then
|
||||
echo "the network is not healthy, cannot download from bing, aborting install"
|
||||
ifconfig
|
||||
ip a
|
||||
exit 2
|
||||
fi
|
||||
# ensure the hostname -i works
|
||||
networkHealthy=1
|
||||
for i in {1..120}; do
|
||||
hostname -i
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# hostname has been found continue
|
||||
networkHealthy=0
|
||||
echo "the network is healthy"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
if [ $networkHealthy -ne 0 ]
|
||||
then
|
||||
echo "the network is not healthy, cannot resolve ip address, aborting install"
|
||||
ifconfig
|
||||
ip a
|
||||
exit 2
|
||||
fi
|
||||
# ensure hostname -f works
|
||||
networkHealthy=1
|
||||
for i in {1..120}; do
|
||||
hostname -f
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# hostname has been found continue
|
||||
networkHealthy=0
|
||||
echo "the network is healthy"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
if [ $networkHealthy -ne 0 ]
|
||||
then
|
||||
echo "the network is not healthy, cannot resolve hostname, aborting install"
|
||||
ifconfig
|
||||
ip a
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
ensureAzureNetwork
|
||||
|
||||
################
|
||||
# Install Docker
|
||||
################
|
||||
|
||||
echo "Installing and configuring docker and swarm"
|
||||
|
||||
installDocker()
|
||||
{
|
||||
for i in {1..10}; do
|
||||
wget --tries 4 --retry-connrefused --waitretry=15 -qO- https://get.docker.com | sh
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# hostname has been found continue
|
||||
echo "Docker installed successfully"
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
}
|
||||
|
||||
time installDocker
|
||||
# AZUREUSER can run docker without sudo
|
||||
sudo usermod -aG docker $AZUREUSER
|
||||
sudo service docker restart
|
||||
|
||||
ensureDocker()
|
||||
{
|
||||
# ensure that docker is healthy
|
||||
dockerHealthy=1
|
||||
for i in {1..3}; do
|
||||
sudo docker info
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# hostname has been found continue
|
||||
dockerHealthy=0
|
||||
echo "Docker is healthy"
|
||||
sudo docker ps -a
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
if [ $dockerHealthy -ne 0 ]
|
||||
then
|
||||
echo "Docker is not healthy"
|
||||
fi
|
||||
}
|
||||
|
||||
ensureDocker
|
||||
|
||||
###################################################
|
||||
# Update Ubuntu and install all necessary binaries
|
||||
###################################################
|
||||
|
||||
time sudo apt-get -y update
|
||||
# kill the waagent and uninstall, otherwise, adding the desktop will do this and kill this script
|
||||
sudo pkill waagent
|
||||
time sudo apt-get -y remove walinuxagent
|
||||
time sudo DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install ubuntu-desktop firefox vnc4server ntp nodejs npm expect gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal gnome-core
|
||||
|
||||
#####################
|
||||
# setup the Azure CLI
|
||||
#####################
|
||||
time sudo npm install azure-cli -g
|
||||
time sudo update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100
|
||||
|
||||
####################
|
||||
# Setup Chrome
|
||||
####################
|
||||
cd /tmp
|
||||
time wget --tries 4 --retry-connrefused --waitretry=15 https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
time sudo dpkg -i google-chrome-stable_current_amd64.deb
|
||||
time sudo apt-get -y --force-yes install -f
|
||||
time rm /tmp/google-chrome-stable_current_amd64.deb
|
||||
|
||||
###################
|
||||
# Install Mesos DCOS CLI
|
||||
###################
|
||||
installMesosDCOSCLI()
|
||||
{
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install -y python-pip openjdk-7-jre-headless
|
||||
sudo pip install virtualenv
|
||||
sudo -i -u $AZUREUSER mkdir $HOMEDIR/dcos
|
||||
for i in {1..10}; do
|
||||
wget --tries 4 --retry-connrefused --waitretry=15 -qO- https://raw.githubusercontent.com/mesosphere/dcos-cli/master/bin/install/install-optout-dcos-cli.sh | sudo -i -u $AZUREUSER /bin/bash -s $HOMEDIR/dcos/. http://leader.mesos --add-path yes
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Mesos DCOS-CLI installed successfully"
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
}
|
||||
|
||||
time installMesosDCOSCLI
|
||||
|
||||
#########################################
|
||||
# Setup Azure User Account including VNC
|
||||
#########################################
|
||||
sudo -i -u $AZUREUSER mkdir $HOMEDIR/bin
|
||||
sudo -i -u $AZUREUSER touch $HOMEDIR/bin/startvnc
|
||||
sudo -i -u $AZUREUSER chmod 755 $HOMEDIR/bin/startvnc
|
||||
sudo -i -u $AZUREUSER touch $HOMEDIR/bin/stopvnc
|
||||
sudo -i -u $AZUREUSER chmod 755 $HOMEDIR/bin/stopvnc
|
||||
echo "vncserver -geometry 1280x1024 -depth 16 -SecurityTypes None" | sudo tee $HOMEDIR/bin/startvnc
|
||||
echo "vncserver -kill :1" | sudo tee $HOMEDIR/bin/stopvnc
|
||||
echo "export PATH=\$PATH:~/bin" | sudo tee -a $HOMEDIR/.bashrc
|
||||
|
||||
prog=/usr/bin/vncpasswd
|
||||
mypass="password"
|
||||
|
||||
sudo -i -u $AZUREUSER /usr/bin/expect <<EOF
|
||||
spawn "$prog"
|
||||
expect "Password:"
|
||||
send "$mypass\r"
|
||||
expect "Verify:"
|
||||
send "$mypass\r"
|
||||
expect eof
|
||||
exit
|
||||
EOF
|
||||
|
||||
sudo -i -u $AZUREUSER startvnc
|
||||
sudo -i -u $AZUREUSER stopvnc
|
||||
|
||||
echo "#!/bin/sh" | sudo tee $HOMEDIR/.vnc/xstartup
|
||||
echo "" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "export XKL_XMODMAP_DISABLE=1" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "unset SESSION_MANAGER" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "unset DBUS_SESSION_BUS_ADDRESS" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "xsetroot -solid grey" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "vncconfig -iconic &" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "gnome-panel &" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "gnome-settings-daemon &" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "metacity &" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "nautilus &" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
echo "gnome-terminal &" | sudo tee -a $HOMEDIR/.vnc/xstartup
|
||||
|
||||
sudo -i -u $AZUREUSER $HOMEDIR/bin/startvnc
|
||||
|
||||
########################################
|
||||
# generate nameserver IPs for resolvconf/resolv.conf.d/head file
|
||||
# for mesos_dns so service names can be resolve from the jumpbox as well
|
||||
########################################
|
||||
for ((i=MASTERFIRSTADDR; i<MASTERFIRSTADDR+MASTERCOUNT; i++)); do
|
||||
echo "nameserver $BASESUBNET$i" | sudo tee -a /etc/resolvconf/resolv.conf.d/head
|
||||
done
|
||||
echo "/etc/resolvconf/resolv.conf.d/head"
|
||||
cat /etc/resolvconf/resolv.conf.d/head
|
||||
sudo service resolvconf restart
|
||||
|
||||
date
|
||||
echo "completed ubuntu devbox install on pid $$"
|
||||
|
||||
echo "restart system to install any remaining software"
|
||||
shutdown -r now
|
|
@ -1,46 +0,0 @@
|
|||
param
|
||||
(
|
||||
[Parameter(Mandatory)]
|
||||
[String]$masterVMNamePrefix,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[String]$agentVMNamePrefix,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[Int]$masterFirstAddr,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[Int]$agentFirstAddr,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[Int]$masterCount=1,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[Int]$agentCount=1,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[String]$baseSubnet
|
||||
)
|
||||
|
||||
$hostsfilePath = "$env:SystemRoot\System32\drivers\etc\hosts"
|
||||
|
||||
For ($i=0; $i -lt $masterCount; $i++)
|
||||
{
|
||||
$masterIp= "$baseSubnet$masterFirstAddr"
|
||||
$masterHostname = $masterVMNamePrefix + $i
|
||||
Write-Output "Adding $masterIp $masterHostname to /etc/hosts file"
|
||||
$masterIp + "`t`t" + $masterHostname | Out-File -encoding ASCII -append $hostsfilePath
|
||||
Write-Output "Completed"
|
||||
$masterFirstAddr++
|
||||
}
|
||||
For ($i=0; $i -lt $agentCount; $i++)
|
||||
{
|
||||
$agentIp= $baseSubnet + $agentFirstAddr
|
||||
$agentHostname = $agentVMNamePrefix + $i
|
||||
Write-Output "Adding $agentIp $agentHostname to /etc/hosts file"
|
||||
$agentIp + "`t`t" + $agentHostname | Out-File -encoding ASCII -append $hostsfilePath
|
||||
Write-Output "Completed"
|
||||
$agentFirstAddr++
|
||||
}
|
||||
|
||||
|
|
@ -1,71 +1,71 @@
|
|||
# [IaaS Linux VM Comprehensive Resources]
|
||||
# [IaaS Linux VM]
|
||||
|
||||
<a href="http://armviz.io/#/?load=https://raw.githubusercontent.com/Azure/azurestack-quickstart-templates/master/101-simple-linux-vm/azuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
This template deploys a Linux VM and also uses customscript, VMLinuxAccess and Docker Extensions
|
||||
This template deploys a simple Linux VM such as ubuntu 14.04, ubuntu 15.10, sles 12 SP1 , CentOS 6.7, CentOS 7.2
|
||||
|
||||
`Tags: [Tag1, Tag2, Tag3]`
|
||||
`Tags: [Linux, Tag2, Tag3]`
|
||||
|
||||
| Endpoint | Version | Validated |
|
||||
| ------------- |:-------------:| -----:|
|
||||
| Microsoft Azure Stack | TP1 | yes|
|
||||
| Microsoft Azure Stack | TP2 | yes|
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Follow the below links to create an Ubuntu Image and upload the same to Azure Stack's Platform Image Repository
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-ubuntu/
|
||||
Follow the below links to create/download a Linux Image and upload the same to Azure Stack's Platform Image Repository
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-linux/
|
||||
2. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-add-image-pir/
|
||||
Note: please use the default values for linuxPublisher,linuxOffer,linuxSku,linuxVersion found in azuredeploy.json or parameters.json while creating the manifest.json in PIR
|
||||
|
||||
## Deployment steps
|
||||
You can either click the "deploy to Azure" button at the beginning of this document or deploy the solution from PowerShell with the following PowerShell script or deploy to azure stack portal using custom deployment.
|
||||
1. Deploy to azure stack portal using custom deployment.
|
||||
2. Deploy through Visual Studio using azuredeploy.json and azuredeploy.parameters.json. Note: for other linux versions deployment , rename the *.azuredeploy.parameters.json to the default name before deploying via VisualStudio
|
||||
2. Deploy the solution from PowerShell with the following PowerShell script
|
||||
|
||||
``` PowerShell
|
||||
## Specify your AzureAD Tenant in a variable.
|
||||
# If you know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 1)
|
||||
# If you do not know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 2)
|
||||
|
||||
# Option 1) If you know the prefix of your <prefix>.onmicrosoft.com AzureAD namespace.
|
||||
# You need to set that in the $AadTenantId varibale (e.g. contoso.onmicrosoft.com).
|
||||
$AadTenantId = "contoso"
|
||||
|
||||
# Option 2) If you don't know the prefix of your AzureAD namespace, run the following cmdlets.
|
||||
# Validate with the Azure AD credentials you also use to sign in as a tenant to Microsoft Azure Stack Technical Preview.
|
||||
$AadTenant = Login-AzureRmAccount
|
||||
$AadTenantId = $AadTenant.Context.Tenant.TenantId
|
||||
|
||||
## Configure the environment with the Add-AzureRmEnvironment cmdlt
|
||||
Add-AzureRmEnvironment -Name 'Azure Stack' `
|
||||
-ActiveDirectoryEndpoint ("https://login.windows.net/$AadTenantId/") `
|
||||
-ActiveDirectoryServiceEndpointResourceId "https://azurestack.local-api/"`
|
||||
-ResourceManagerEndpoint ("https://api.azurestack.local/") `
|
||||
-GalleryEndpoint ("https://gallery.azurestack.local/") `
|
||||
-GraphEndpoint "https://graph.windows.net/"
|
||||
|
||||
## Authenticate a user to the environment (you will be prompted during authentication)
|
||||
$privateEnv = Get-AzureRmEnvironment 'Azure Stack'
|
||||
$privateAzure = Add-AzureRmAccount -Environment $privateEnv -Verbose
|
||||
$endptOut = Invoke-RestMethod "$("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())/metadata/endpoints?api-version=1.0"
|
||||
$envName = "AzureStackCloud"
|
||||
Add-AzureRmEnvironment -Name ($envName) `
|
||||
-ActiveDirectoryEndpoint ($ActiveDirectoryEndpoint = $($endptOut.authentication.loginEndpoint) + $($endptOut.authentication.audiences[0]).Split("/")[-1] + "/") `
|
||||
-ActiveDirectoryServiceEndpointResourceId ($ActiveDirectoryServiceEndpointResourceId = $($endptOut.authentication.audiences[0])) `
|
||||
-ResourceManagerEndpoint ($ResourceManagerEndpoint = $("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())) `
|
||||
-GalleryEndpoint ($GalleryEndpoint = $endptOut.galleryEndpoint) `
|
||||
-GraphEndpoint ($GraphEndpoint = $endptOut.graphEndpoint) `
|
||||
-StorageEndpointSuffix ($StorageEndpointSuffix="$($env:USERDNSDOMAIN)".ToLowerInvariant()) `
|
||||
-AzureKeyVaultDnsSuffix ($AzureKeyVaultDnsSuffix="vault.$($env:USERDNSDOMAIN)".ToLowerInvariant())
|
||||
## Authenticate a user to the environment
|
||||
$AADUserName = "Enter_AADUserName"
|
||||
$AADUserPassword="Enter_AADUserPassword"
|
||||
$aadCredential = New-Object System.Management.Automation.PSCredential($AADUserName, (ConvertTo-SecureString -String $AADUserPassword -AsPlainText -Force))
|
||||
$privateEnv = Get-AzureRmEnvironment $envName -Credential $aadCredential
|
||||
$privateAzure = Add-AzureRmAccount -Environment $privateEnv -Credential $aadCredential -Verbose
|
||||
Select-AzureRmProfile -Profile $privateAzure
|
||||
|
||||
## Select an existing subscription where the deployment will take place
|
||||
Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION_NAME" | Select-AzureRmSubscription
|
||||
|
||||
|
||||
# Set Deployment Variables
|
||||
$myNum = "001" #Modify this per deployment
|
||||
$RGName = "myRG$myNum"
|
||||
$myLocation = "local"
|
||||
|
||||
$templateFile= "azuredeploy.json"
|
||||
$templateParameterFile= "azuredeploy.parameters.json"
|
||||
# For Suse $templateParameterFile= "suse.12.sp1.azuredeploy.parameters.json"
|
||||
# For CentOS 6.7 $templateParameterFile= "centos.6.7.azuredeploy.parameters.json"
|
||||
# For CentOS 7.2 $templateParameterFile= "centos.7.2.azuredeploy.parameters.json"
|
||||
|
||||
# Create Resource Group for Template Deployment
|
||||
New-AzureRmResourceGroup -Name $RGName -Location $myLocation
|
||||
|
||||
# Deploy Template
|
||||
New-AzureRmResourceGroupDeployment `
|
||||
-Name "myDeployment$myNum" `
|
||||
-ResourceGroupName $RGName `
|
||||
-TemplateFile "azuredeploy.json" `
|
||||
-adminUsername "admin" `
|
||||
-adminPassword ("GEN-PASSWORD" | ConvertTo-SecureString -AsPlainText -Force)`
|
||||
-ubuntuOSVersion "15.10" `
|
||||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -5,51 +5,58 @@
|
|||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
"description": "Username for the Virtual Machine. Default value is localadmin"
|
||||
},
|
||||
"defaultValue": "localadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine."
|
||||
"description": "Password for the Virtual Machine. Default value is 'Subscription#<subscription id>'"
|
||||
}
|
||||
},
|
||||
"ubuntuOSVersion": {
|
||||
"imagePublisher": {
|
||||
"type": "string",
|
||||
"defaultValue": "15.10",
|
||||
"allowedValues": [
|
||||
"14.04.2-LTS",
|
||||
"14.04.3-LTS",
|
||||
"15.10"
|
||||
],
|
||||
"defaultValue": "Canonical",
|
||||
"metadata": {
|
||||
"description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values:14.04.2-LTS, 14.04.3-LTS, 15.10."
|
||||
"description": "Maps to the publisher in the Azure Stack Platform Image Repository manifest file Eg: Canonical, Suse, OpenLogic "
|
||||
}
|
||||
},
|
||||
"imageOffer": {
|
||||
"type": "string",
|
||||
"defaultValue": "UbuntuServer",
|
||||
"metadata": {
|
||||
"description": "Maps to the Offer in the Azure Stack Platform Image Repository manifest file Eg: UbuntuServer, SlesServer, CentOS "
|
||||
}
|
||||
},
|
||||
"imageSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "14.04.3-LTS",
|
||||
"metadata": {
|
||||
"description": "Maps to the sku in the Azure Stack Platform Image Repository manifest file Eg: 12.SP1, 6.7 , 7.2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"dnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"dnsserver": "192.168.100.2",
|
||||
"dnsNameForPublicIP": "[tolower(concat('dns', uniquestring(resourceGroup().id)))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"imagePublisher": "Canonical",
|
||||
"imageOffer": "UbuntuServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "myVnic",
|
||||
"nicName": "[tolower(concat('nic',uniquestring(resourceGroup().id)))]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "mySubnet",
|
||||
"subnetName": "[tolower(concat('subnet',uniquestring(resourceGroup().id)))]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"storageAccountName": "[concat('sa', uniquestring(resourceGroup().id))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "myPublicIP",
|
||||
"publicIPAddressName": "[tolower(concat('pip',uniquestring(resourceGroup().id)))]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "myVnet",
|
||||
"virtualNetworkName": "[tolower(concat('vnet',uniquestring(resourceGroup().id)))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "mySG",
|
||||
"networkSecurityGroupName": "[tolower(concat('nsg',uniquestring(resourceGroup().id)))]",
|
||||
"apiVersion": {
|
||||
"resources": { "deployments": "2015-01-01" },
|
||||
"network": "2015-05-01-preview",
|
||||
|
@ -58,32 +65,6 @@
|
|||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[variables('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkSecurityGroup"
|
||||
},
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(variables('storageAccountName'))]",
|
||||
|
@ -95,123 +76,139 @@
|
|||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"name": "ssh",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "[variables('dnsserver')]" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[variables('dnsserver')]" ]
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
"description": "Allow RDP",
|
||||
"protocol": "Tcp",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "22",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[parameters('ubuntuOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('OSDiskName'), '.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob)]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[variables('networkSecurityGroupName')]"
|
||||
],
|
||||
"properties": {
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[parameters('imagePublisher')]",
|
||||
"offer": "[parameters('imageOffer')]",
|
||||
"sku": "[parameters('imageSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('OSDiskName'), '.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob)]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,15 +2,5 @@
|
|||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"value": "localadmin"
|
||||
},
|
||||
|
||||
"adminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
"ubuntuOSVersion": {
|
||||
"value": "15.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"imagePublisher": {
|
||||
"value": "OpenLogic"
|
||||
},
|
||||
|
||||
"imageOffer": {
|
||||
"value": "CentOS"
|
||||
},
|
||||
|
||||
"imageSku": {
|
||||
"value": "6.7"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"imagePublisher": {
|
||||
"value": "OpenLogic"
|
||||
},
|
||||
|
||||
"imageOffer": {
|
||||
"value": "CentOS"
|
||||
},
|
||||
|
||||
"imageSku": {
|
||||
"value": "7.2"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"imagePublisher": {
|
||||
"value": "Suse"
|
||||
},
|
||||
|
||||
"imageOffer": {
|
||||
"value": "SlesServer"
|
||||
},
|
||||
|
||||
"imageSku": {
|
||||
"value": "12.SP1"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,12 +14,18 @@
|
|||
"description": "vm suffix"
|
||||
}
|
||||
},
|
||||
"DiagnosticResourceGroup": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Resource Group diagnostic storage account is in"
|
||||
}
|
||||
},
|
||||
"adminUserName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "UserName for the Virtual Machine"
|
||||
},
|
||||
"defaultValue": "Administrator",
|
||||
"defaultValue": "Administrator"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
|
@ -74,7 +80,7 @@
|
|||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "SecurityGroup",
|
||||
"existingdiagnosticsStorageAccountName": "testmonstorage",
|
||||
"accountid": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/','testrg', '/providers/','Microsoft.Storage/storageAccounts/', variables('existingdiagnosticsStorageAccountName'))]",
|
||||
"accountid": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/',parameters('DiagnosticResourceGroup'), '/providers/','Microsoft.Storage/storageAccounts/', variables('existingdiagnosticsStorageAccountName'))]",
|
||||
"wadlogs": "<WadCfg> <DiagnosticMonitorConfiguration overallQuotaInMB=\"4096\" xmlns=\"http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration\"> <DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter=\"Error\"/> <WindowsEventLog scheduledTransferPeriod=\"PT1M\" > <DataSource name=\"Application!*[System[(Level = 1 or Level = 2)]]\" /> <DataSource name=\"Security!*[System[(Level = 1 or Level = 2)]]\" /> <DataSource name=\"System!*[System[(Level = 1 or Level = 2)]]\" /></WindowsEventLog>",
|
||||
"wadperfcounters1": "<PerformanceCounters scheduledTransferPeriod=\"PT1M\"><PerformanceCounterConfiguration counterSpecifier=\"\\Processor(_Total)\\% Processor Time\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU utilization\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Processor(_Total)\\% Privileged Time\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU privileged time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Processor(_Total)\\% User Time\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU user time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Processor Information(_Total)\\Processor Frequency\" sampleRate=\"PT15S\" unit=\"Count\"><annotation displayName=\"CPU frequency\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\System\\Processes\" sampleRate=\"PT15S\" unit=\"Count\"><annotation displayName=\"Processes\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Process(_Total)\\Thread Count\" sampleRate=\"PT15S\" unit=\"Count\"><annotation displayName=\"Threads\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Process(_Total)\\Handle Count\" sampleRate=\"PT15S\" unit=\"Count\"><annotation displayName=\"Handles\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\% Committed Bytes In Use\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Memory usage\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\Available Bytes\" sampleRate=\"PT15S\" unit=\"Bytes\"><annotation displayName=\"Memory available\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\Committed Bytes\" sampleRate=\"PT15S\" unit=\"Bytes\"><annotation displayName=\"Memory committed\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\Commit Limit\" sampleRate=\"PT15S\" unit=\"Bytes\"><annotation displayName=\"Memory commit limit\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\% Disk Time\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Disk active time\" locale=\"en-us\"/></PerformanceCounterConfiguration>",
|
||||
"wadperfcounters2": "<PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\% Disk Read Time\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Disk active read time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\% Disk Write Time\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Disk active write time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\Disk Transfers/sec\" sampleRate=\"PT15S\" unit=\"CountPerSecond\"><annotation displayName=\"Disk operations\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\Disk Reads/sec\" sampleRate=\"PT15S\" unit=\"CountPerSecond\"><annotation displayName=\"Disk read operations\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\Disk Writes/sec\" sampleRate=\"PT15S\" unit=\"CountPerSecond\"><annotation displayName=\"Disk write operations\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\Disk Bytes/sec\" sampleRate=\"PT15S\" unit=\"BytesPerSecond\"><annotation displayName=\"Disk speed\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\Disk Read Bytes/sec\" sampleRate=\"PT15S\" unit=\"BytesPerSecond\"><annotation displayName=\"Disk read speed\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk(_Total)\\Disk Write Bytes/sec\" sampleRate=\"PT15S\" unit=\"BytesPerSecond\"><annotation displayName=\"Disk write speed\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\LogicalDisk(_Total)\\% Free Space\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Disk free space (percentage)\" locale=\"en-us\"/></PerformanceCounterConfiguration></PerformanceCounters>",
|
||||
|
|
|
@ -5,14 +5,17 @@
|
|||
"vmsuffix": {
|
||||
"value": "myVM"
|
||||
},
|
||||
"deploymentLocation": {
|
||||
"value": "local"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
"storageAccountNamePrefix": {
|
||||
"value": "DiagStor"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"value": "2012-R2-Datacenter"
|
||||
},
|
||||
"DiagnosticResourceGroup": {
|
||||
"value": "DiagRg"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,31 +6,36 @@
|
|||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
|
||||
}
|
||||
},
|
||||
"defaultValue": "[replace(replace(tolower(concat('sa',resourceGroup().name)), '-', ''), '.','')]"
|
||||
},
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the VM."
|
||||
}
|
||||
},
|
||||
"defaultValue": "[substring(replace(replace(tolower(concat('vm',resourceGroup().name)), '-', ''), '.',''),0,8)]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
}
|
||||
},
|
||||
"defaultValue": "vmadmin1"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine."
|
||||
}
|
||||
"description": "The password for the Administrator account of the new VMs. Default value is subscription id"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
|
||||
}
|
||||
},
|
||||
"defaultValue": "[replace(replace(tolower(concat('dns',resourceGroup().name)), '-', ''), '.','')]"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"type": "string",
|
||||
|
@ -50,19 +55,19 @@
|
|||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "myVnic",
|
||||
"nicName": "[replace(replace(tolower(concat('nic',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "mySubnet",
|
||||
"subnetName": "[replace(replace(tolower(concat('subnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "myPublicIP",
|
||||
"publicIPAddressName": "[replace(replace(tolower(concat('pip',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "myVnet",
|
||||
"virtualNetworkName": "[replace(replace(tolower(concat('vnet',resourceGroup().name)), '-', ''), '.','')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "mySG"
|
||||
"networkSecurityGroupName": "[replace(replace(tolower(concat('nsg',resourceGroup().name)), '-', ''), '.','')]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
|
@ -136,10 +141,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": ["192.168.100.2"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -152,9 +154,6 @@
|
|||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"dnsSettings": {
|
||||
"dnsServers": ["192.168.100.2"]
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
|
|
|
@ -2,21 +2,6 @@
|
|||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"newStorageAccountName": {
|
||||
"value": "mystorage001"
|
||||
},
|
||||
"vmName": {
|
||||
"value": "myVM001"
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": "admin123"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
"dnsNameForPublicIP": {
|
||||
"value": "mydns001"
|
||||
},
|
||||
"windowsOSVersion": {
|
||||
"value": "2012-R2-Datacenter"
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"typeHandlerVersion": "1.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"commandToExecute": "md c:\\users\\public\\documents\\test"
|
||||
}
|
||||
|
@ -40,6 +41,7 @@
|
|||
"publisher": "Microsoft.Compute",
|
||||
"type": "BGInfo",
|
||||
"typeHandlerVersion": "2.1",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"Properties": [
|
||||
]
|
||||
|
@ -48,4 +50,4 @@
|
|||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"typeHandlerVersion": "1.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"commandToExecute": "md c:\\users\\public\\documents\\test"
|
||||
}
|
||||
|
@ -28,4 +29,4 @@
|
|||
}
|
||||
],
|
||||
"outputs": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"typeHandlerVersion": "1.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"commandToExecute": "powershell -ExecutionPolicy Unrestricted Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 192.168.100.2, 8.8.8.8"
|
||||
}
|
||||
|
@ -28,4 +29,4 @@
|
|||
}
|
||||
],
|
||||
"outputs": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"typeHandlerVersion": "1.8",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"fileUris": [ "[parameters('scriptFile')]" ],
|
||||
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file ',parameters('scriptName'))]"
|
||||
|
@ -46,4 +47,4 @@
|
|||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"publisher": "Microsoft.Compute",
|
||||
"type": "BGInfo",
|
||||
"typeHandlerVersion": "2.1",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"Properties": [
|
||||
]
|
||||
|
@ -34,4 +35,4 @@
|
|||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,10 +151,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "192.168.100.2" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -205,6 +202,7 @@
|
|||
{
|
||||
"name": "[concat(variables('vmName'),'-dataDisk')]",
|
||||
"lun": 0,
|
||||
"caching": "ReadOnly",
|
||||
"createOption": "FromImage",
|
||||
"image": {
|
||||
"uri": "[variables('dataDiskUrl')]"
|
||||
|
@ -238,4 +236,4 @@
|
|||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
"osType": {
|
||||
"value": "windows"
|
||||
},
|
||||
"location": {
|
||||
"value": "local"
|
||||
},
|
||||
"vmSize": {
|
||||
"value": "Standard_A1"
|
||||
}
|
||||
|
|
|
@ -1,278 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "localadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine."
|
||||
}
|
||||
},
|
||||
"ubuntuOSVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "15.10",
|
||||
"allowedValues": [
|
||||
"14.04.2-LTS",
|
||||
"14.04.3-LTS",
|
||||
"15.10"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Allowed values:14.04.2-LTS, 14.04.3-LTS, 15.10."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"dnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"dnsserver": "192.168.100.2",
|
||||
"location": "[resourceGroup().location]",
|
||||
"imagePublisher": "Canonical",
|
||||
"imageOffer": "UbuntuServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "myVnic",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "mySubnet",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "myPublicIP",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "myVnet",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/201-complex-linux-vm",
|
||||
"scriptFileName": "docker.sh",
|
||||
"scriptFile": "[concat(variables('assetLocation'),'/',variables('scriptFileName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "mySG",
|
||||
"apiVersion": {
|
||||
"resources": { "deployments": "2015-01-01" },
|
||||
"network": "2015-05-01-preview",
|
||||
"storage": "2015-05-01-preview",
|
||||
"compute": "2015-06-15"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[variables('location')]",
|
||||
"tags": {
|
||||
"displayName": "NetworkSecurityGroup"
|
||||
},
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(variables('storageAccountName'))]",
|
||||
"apiVersion": "[variables('apiVersion').storage]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "[variables('dnsserver')]" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[variables('dnsserver')]" ]
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[parameters('ubuntuOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/LinuxCustomScriptExtension')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "CustomScriptForLinux",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"settings": {
|
||||
"commandToExecute": "touch /test.txt",
|
||||
"enableInternalDNSCheck": "false"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/LinuxDockerExtension')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Extensions",
|
||||
"type": "DockerExtension",
|
||||
"typeHandlerVersion": "1.0",
|
||||
"settings": {
|
||||
"fileUris": [ "[variables('scriptFile')]" ],
|
||||
"commandToExecute": "sh docker.sh"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/LinuxVMAccessExtension')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "VMAccessForLinux",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"settings": { },
|
||||
"protectedSettings": {
|
||||
"username": "[parameters('adminUsername')]",
|
||||
"password": "[parameters('adminPassword')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentparameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"value": "localadmin"
|
||||
},
|
||||
|
||||
"adminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
|
||||
"ubuntuOSVersion": {
|
||||
"value": "15.10"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -43,7 +43,7 @@
|
|||
"windowsImageVersion": "latest",
|
||||
"dataDiskSize": 2,
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/201-Comprehensive",
|
||||
"staticSubnetName": "CVMStaticSubnet",
|
||||
"staticSubnetName": "vmstaticsubnet",
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('staticSubnetName')]",
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
# [IaaS Linux VM Comprehensive Resources]
|
||||
|
||||
This template deploys a Linux VM and also uses customscript, VMLinuxAccess, Docker, Linux Diagnostic and OSPatchingforLinux Extensions
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Follow the below links to download/create an Ubuntu 14.04.3-LTS Image and upload the same to Azure Stack's Platform Image Repository(PIR)
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-linux/
|
||||
2. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-add-image-pir/
|
||||
Note: please use the default values for linuxPublisher,linuxOffer,linuxSku,linuxVersion found in azuredeploy.json while creating the manifest.json in PIR
|
||||
|
||||
## Deployment steps
|
||||
1. Deploy to azure stack portal using custom deployment.
|
||||
2. Deploy through Visual Studio using azuredeploy.json and azuredeploy.parameters.json.
|
||||
2. Deploy the solution from PowerShell with the following PowerShell script
|
||||
|
||||
``` PowerShell
|
||||
## Configure the environment with the Add-AzureRmEnvironment cmdlt
|
||||
$endptOut = Invoke-RestMethod "$("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())/metadata/endpoints?api-version=1.0"
|
||||
$envName = "AzureStackCloud"
|
||||
Add-AzureRmEnvironment -Name ($envName) `
|
||||
-ActiveDirectoryEndpoint ($ActiveDirectoryEndpoint = $($endptOut.authentication.loginEndpoint) + $($endptOut.authentication.audiences[0]).Split("/")[-1] + "/") `
|
||||
-ActiveDirectoryServiceEndpointResourceId ($ActiveDirectoryServiceEndpointResourceId = $($endptOut.authentication.audiences[0])) `
|
||||
-ResourceManagerEndpoint ($ResourceManagerEndpoint = $("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())) `
|
||||
-GalleryEndpoint ($GalleryEndpoint = $endptOut.galleryEndpoint) `
|
||||
-GraphEndpoint ($GraphEndpoint = $endptOut.graphEndpoint) `
|
||||
-StorageEndpointSuffix ($StorageEndpointSuffix="$($env:USERDNSDOMAIN)".ToLowerInvariant()) `
|
||||
-AzureKeyVaultDnsSuffix ($AzureKeyVaultDnsSuffix="vault.$($env:USERDNSDOMAIN)".ToLowerInvariant())
|
||||
## Authenticate a user to the environment
|
||||
$AADUserName = "Enter_AADUserName"
|
||||
$AADUserPassword="Enter_AADUserPassword"
|
||||
$aadCredential = New-Object System.Management.Automation.PSCredential($AADUserName, (ConvertTo-SecureString -String $AADUserPassword -AsPlainText -Force))
|
||||
$privateEnv = Get-AzureRmEnvironment $envName -Credential $aadCredential
|
||||
$privateAzure = Add-AzureRmAccount -Environment $privateEnv -Credential $aadCredential -Verbose
|
||||
Select-AzureRmProfile -Profile $privateAzure
|
||||
|
||||
## Select an existing subscription where the deployment will take place
|
||||
Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION_NAME" | Select-AzureRmSubscription
|
||||
|
||||
# Set Deployment Variables
|
||||
$myNum = "001" #Modify this per deployment
|
||||
$RGName = "myRG$myNum"
|
||||
$myLocation = "local"
|
||||
|
||||
$templateFile= "azuredeploy.json"
|
||||
$templateParameterFile= "azuredeploy.parameters.json"
|
||||
|
||||
# Create Resource Group for Template Deployment
|
||||
New-AzureRmResourceGroup -Name $RGName -Location $myLocation
|
||||
|
||||
# Deploy Template
|
||||
New-AzureRmResourceGroupDeployment `
|
||||
-ResourceGroupName $RGName `
|
||||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,297 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "localadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine.Default value is 'Subscription#<subscription id>'"
|
||||
}
|
||||
},
|
||||
"ubuntuOSVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "14.04.3-LTS",
|
||||
"metadata": {
|
||||
"description": "The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version. Default value: 14.04.3-LTS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"dnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"imagePublisher": "Canonical",
|
||||
"imageOffer": "UbuntuServer",
|
||||
"OSDiskName": "osdisk",
|
||||
"nicName": "myVnic",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "mySubnet",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "myPublicIP",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A1",
|
||||
"virtualNetworkName": "myVnet",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/201-comprehensive-linux-vm",
|
||||
"scriptFileName": "docker.sh",
|
||||
"scriptFile": "[concat(variables('assetLocation'),'/',variables('scriptFileName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[tolower(concat('nsg',uniquestring(resourceGroup().id)))]",
|
||||
"apiVersion": {
|
||||
"resources": { "deployments": "2015-01-01" },
|
||||
"network": "2015-05-01-preview",
|
||||
"storage": "2015-05-01-preview",
|
||||
"compute": "2015-06-15"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[toLower(variables('storageAccountName'))]",
|
||||
"apiVersion": "[variables('apiVersion').storage]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "ssh",
|
||||
"properties": {
|
||||
"description": "Allow RDP",
|
||||
"protocol": "Tcp",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "22",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[variables('networkSecurityGroupName')]"
|
||||
],
|
||||
"properties": {
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[parameters('ubuntuOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/LinuxCustomScriptExtension')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "CustomScriptForLinux",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"commandToExecute": "touch /test.txt",
|
||||
"enableInternalDNSCheck": "false"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/LinuxDockerExtension')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Extensions",
|
||||
"type": "DockerExtension",
|
||||
"typeHandlerVersion": "1.0",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"fileUris": [ "[variables('scriptFile')]" ],
|
||||
"commandToExecute": "sh docker.sh"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/LinuxVMAccessExtension')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "VMAccessForLinux",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": { },
|
||||
"protectedSettings": {
|
||||
"username": "[parameters('adminUsername')]",
|
||||
"password": "[parameters('adminPassword')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/installospatching')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "OSPatchingForLinux",
|
||||
"typeHandlerVersion": "2.0",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"disabled": false,
|
||||
"stop": false,
|
||||
"rebootAfterPatch": "Auto",
|
||||
"category": "ImportantAndRecommended",
|
||||
"installDuration": "01:00",
|
||||
"oneoff": true,
|
||||
"intervalOfWeeks": "1",
|
||||
"dayOfWeek": "Sunday",
|
||||
"startTime": "03:00",
|
||||
"vmStatusTest": {
|
||||
"local": false,
|
||||
"idleTestScript": "",
|
||||
"healthyTestScript": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"outputs": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentparameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": { }
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
# Simple deployment of an Ubuntu VM with OS Patching extension
|
||||
|
||||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazurestack-quickstart-templates%2Fmaster%2F201-ospatching-extension-on-ubuntu%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazurestack-quickstart-templates%2Fmaster%2F201-ospatching-extension-on-ubuntu%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
|
||||
Linux [OSPatching extension](https://github.com/Azure/azure-linux-extensions/tree/master/OSPatching) enables the Azure and Azure stack VM administrators to automate the VM OS updates with the customized configurations.
|
||||
|
||||
This template shows a simple example to deploy OSPatching Extension on an Linux VM.
|
||||
|
||||
`Tags: [Linux, Azurestack, Azure]`
|
||||
|
||||
| Endpoint | Version | Validated |
|
||||
| ------------- |:-------------:| -----:|
|
||||
| Microsoft Azure Stack | TP2 | yes|
|
||||
| Microsoft Azure | | yes|
|
||||
|
||||
## Prerequisites for Azure Stack
|
||||
|
||||
Follow the below links to create/download an Ubuntu 14.04 LTS Image and upload the same to Azure Stack's Platform Image Repository
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-linux/
|
||||
2. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-add-image-pir/
|
||||
Note: please use the default values for linuxPublisher,linuxOffer,linuxSku,linuxVersion found in azuredeploy.json while creating the manifest.json in PIR
|
||||
|
||||
## Deployment Steps
|
||||
|
||||
Azure CLI or Powershell is recommended to deploy the template. And Portal cannot ignore the optional parameters.
|
||||
|
||||
1. Using Azure CLI
|
||||
|
||||
https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-azure-resource-manager/
|
||||
|
||||
2. Deploy through portal using custom deployment.
|
||||
|
||||
3. Deploy through Visual Studio using azuredeploy.json and azuredeploy.parameters.json.
|
||||
|
||||
4. Using Powershell (https://azure.microsoft.com/en-us/documentation/articles/powershell-azure-resource-manager/)
|
||||
``` PowerShell
|
||||
## Configure the environment with the Add-AzureRmEnvironment cmdlt
|
||||
$endptOut = Invoke-RestMethod "$("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())/metadata/endpoints?api-version=1.0"
|
||||
$envName = "AzureStackCloud"
|
||||
Add-AzureRmEnvironment -Name ($envName) `
|
||||
-ActiveDirectoryEndpoint ($ActiveDirectoryEndpoint = $($endptOut.authentication.loginEndpoint) + $($endptOut.authentication.audiences[0]).Split("/")[-1] + "/") `
|
||||
-ActiveDirectoryServiceEndpointResourceId ($ActiveDirectoryServiceEndpointResourceId = $($endptOut.authentication.audiences[0])) `
|
||||
-ResourceManagerEndpoint ($ResourceManagerEndpoint = $("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())) `
|
||||
-GalleryEndpoint ($GalleryEndpoint = $endptOut.galleryEndpoint) `
|
||||
-GraphEndpoint ($GraphEndpoint = $endptOut.graphEndpoint) `
|
||||
-StorageEndpointSuffix ($StorageEndpointSuffix="$($env:USERDNSDOMAIN)".ToLowerInvariant()) `
|
||||
-AzureKeyVaultDnsSuffix ($AzureKeyVaultDnsSuffix="vault.$($env:USERDNSDOMAIN)".ToLowerInvariant())
|
||||
## Authenticate a user to the environment
|
||||
$AADUserName = "Enter_AADUserName"
|
||||
$AADUserPassword="Enter_AADUserPassword"
|
||||
$aadCredential = New-Object System.Management.Automation.PSCredential($AADUserName, (ConvertTo-SecureString -String $AADUserPassword -AsPlainText -Force))
|
||||
$privateEnv = Get-AzureRmEnvironment $envName -Credential $aadCredential
|
||||
$privateAzure = Add-AzureRmAccount -Environment $privateEnv -Credential $aadCredential -Verbose
|
||||
Select-AzureRmProfile -Profile $privateAzure
|
||||
|
||||
## Select an existing subscription where the deployment will take place
|
||||
Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION_NAME" | Select-AzureRmSubscription
|
||||
|
||||
|
||||
# Set Deployment Variables
|
||||
$myNum = "001" #Modify this per deployment
|
||||
$RGName = "myRG$myNum"
|
||||
$myLocation = "local"
|
||||
|
||||
$templateFile= "azuredeploy.json"
|
||||
$templateParameterFile= "azuredeploy.parameters.json"
|
||||
|
||||
# Create Resource Group for Template Deployment
|
||||
New-AzureRmResourceGroup -Name $RGName -Location $myLocation
|
||||
|
||||
# Deploy Template
|
||||
New-AzureRmResourceGroupDeployment `
|
||||
-ResourceGroupName $RGName `
|
||||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,310 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"defaultValue": "localadmin",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine. Default value is localadmin"
|
||||
}
|
||||
},
|
||||
"password": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine. Default value is 'Subscription#<subscription id>'"
|
||||
}
|
||||
},
|
||||
"rebootAfterPatch": {
|
||||
"type": "string",
|
||||
"defaultValue": "Auto",
|
||||
"metadata": {
|
||||
"description": "The reboot behavior after patching.Default value is Auto"
|
||||
},
|
||||
"allowedValues": [
|
||||
"RebootIfNeed",
|
||||
"Required",
|
||||
"NotRequired",
|
||||
"Auto"
|
||||
]
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"defaultValue": "ImportantAndRecommended",
|
||||
"metadata": {
|
||||
"description": "Type of patches to install.Default value is ImportantAndRecommended"
|
||||
},
|
||||
"allowedValues": [
|
||||
"Important",
|
||||
"ImportantAndRecommended"
|
||||
]
|
||||
},
|
||||
"installDuration": {
|
||||
"type": "string",
|
||||
"defaultValue": "01:00",
|
||||
"metadata": {
|
||||
"description": "The allowed total time for installation.Default value is 01:00"
|
||||
}
|
||||
},
|
||||
"oneoff": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "Patch the OS immediately.Default value is false"
|
||||
},
|
||||
"allowedValues": [
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"dayOfWeek": {
|
||||
"type": "string",
|
||||
"defaultValue": "Sunday|Wednesday",
|
||||
"metadata": {
|
||||
"description": "The patching date (of the week)You can specify multiple days in a week."
|
||||
}
|
||||
},
|
||||
"startTime": {
|
||||
"type": "string",
|
||||
"defaultValue": "03:00",
|
||||
"metadata": {
|
||||
"description": "Start time of patching. Default value is 03:00"
|
||||
}
|
||||
},
|
||||
"idleTestScript": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The uri of the VMStatus idle test script"
|
||||
}
|
||||
},
|
||||
"healthyTestScript": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The uri of the VMStatus healthy test script"
|
||||
}
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The name of storage account where the VMStatus scripts resides."
|
||||
}
|
||||
},
|
||||
"storageAccountKey": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The access key of storage account where the VMStatus scripts resides."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"extensionName": "OSPatching",
|
||||
"scenarioPrefix": "[concat('ospatchlinux',substring(uniquestring(resourceGroup().id),0,5))]",
|
||||
"apiVersion": {
|
||||
"resources": { "deployments": "2015-01-01" },
|
||||
"network": "2015-05-01-preview",
|
||||
"storage": "2015-05-01-preview",
|
||||
"compute": "2015-06-15"
|
||||
},
|
||||
"imagePublisher": "Canonical",
|
||||
"imageOffer": "UbuntuServer",
|
||||
"ubuntuOSVersion": "14.04.3-LTS",
|
||||
"vmSize": "Standard_A1",
|
||||
"OSDiskName": "[concat(variables('scenarioPrefix'),'OSDisk')]",
|
||||
"nicName": "[concat(variables('scenarioPrefix'),'Nic')]",
|
||||
"vnetAddressPrefix": "10.0.0.0/16",
|
||||
"subnetName": "[concat(variables('scenarioPrefix'),'Subnet')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountName": "[concat(variables('scenarioPrefix'),'sa')]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "[concat(variables('scenarioPrefix'),'PublicIp')]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"dnsNameForPublicIP": "[tolower(concat(variables('scenarioPrefix'),'dns'))]",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmName": "[concat(variables('scenarioPrefix'),'VM')]",
|
||||
"virtualNetworkName": "[concat(variables('scenarioPrefix'),'Vnet')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"networkSecurityGroupName": "[tolower(concat(variables('scenarioPrefix'),'nsg'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "[variables('apiVersion').storage]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "ssh",
|
||||
"properties": {
|
||||
"description": "Allow RDP",
|
||||
"protocol": "Tcp",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "22",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('vnetAddressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
|
||||
"[variables('networkSecurityGroupName')]"
|
||||
],
|
||||
"properties": {
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('username')]",
|
||||
"adminPassword": "[parameters('password')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('ubuntuOSVersion')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk1",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/installospatching')]",
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.OSTCExtensions",
|
||||
"type": "OSPatchingForLinux",
|
||||
"typeHandlerVersion": "2.0",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"disabled": false,
|
||||
"stop": false,
|
||||
"rebootAfterPatch": "[parameters('rebootAfterPatch')]",
|
||||
"category": "[parameters('category')]",
|
||||
"installDuration": "[parameters('installDuration')]",
|
||||
"oneoff": "[parameters('oneoff')]",
|
||||
"intervalOfWeeks": "1",
|
||||
"dayOfWeek": "[parameters('dayOfWeek')]",
|
||||
"startTime": "[parameters('startTime')]",
|
||||
"vmStatusTest": {
|
||||
"local": false,
|
||||
"idleTestScript": "[parameters('idleTestScript')]",
|
||||
"healthyTestScript": "[parameters('healthyTestScript')]"
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"storageAccountName": "[parameters('storageAccountName')]",
|
||||
"storageAccountKey": "[parameters('storageAccountKey')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
}
|
||||
}
|
|
@ -1,3 +1,21 @@
|
|||
# A template that deploys the Microsoft Monitoring Agent extension to an existing Windows VM and adds it to an existing OMS workspace.
|
||||
|
||||
## Prerequisites
|
||||
This template requires an existing Windows VM.
|
||||
This template requires an existing OMS workspace on Azure. See on the link below how to set up a workspace:
|
||||
https://azure.microsoft.com/en-us/documentation/articles/log-analytics-get-started/?cdn=disable#sign-up-quickly-using-microsoft-azure
|
||||
|
||||
## Parameters
|
||||
- vmName: Name of an existing Windows VM to update.
|
||||
- workspaceId: Target Azure OMS workspace ID.
|
||||
- password: Target Azure OMS workspace key.
|
||||
|
||||
## Deployment steps
|
||||
1. Deploy to azure stack portal using custom deployment.
|
||||
2. Deploy through Visual Studio using azuredeploy.json and azuredeploy.parameters.json
|
||||
2. Deploy the solution from PowerShell with the following PowerShell script
|
||||
|
||||
``` PowerShell
|
||||
## Specify your AzureAD Tenant in a variable.
|
||||
# If you know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 1)
|
||||
# If you do not know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 2)
|
||||
|
@ -44,3 +62,4 @@ New-AzureRmResourceGroupDeployment `
|
|||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
||||
```
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of an existing Windows VM to update"
|
||||
},
|
||||
"defaultValue": "MyWindowsVM"
|
||||
},
|
||||
"workspaceId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Target Azure OMS workspace ID e.g. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX "
|
||||
}
|
||||
},
|
||||
"workspaceKey": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Target Azure OMS workspace key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "MicrosoftMonitoringAgent"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
|
||||
"type": "MicrosoftMonitoringAgent",
|
||||
"typeHandlerVersion": "1.0",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"workspaceId": "[parameters('workspaceId')]"
|
||||
},
|
||||
"protectedSettings": {
|
||||
"workspaceKey" : "[parameters('workspaceKey')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"value": "MyWindowsVM"
|
||||
},
|
||||
"workspaceId": {
|
||||
"value": ""
|
||||
},
|
||||
"workspaceKey": {
|
||||
"value": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
# A template that creates a simple Windows VM and joins it to an existing domain using VM extension
|
||||
|
||||
## Prerequisites
|
||||
1. Template requires a pre-existing domain to join.A domain controller can be deployed using the template located at:
|
||||
https://github.com/Azure/AzureStack-QuickStart-Templates/tree/master/ad-non-ha
|
||||
2. The template asumes that the VM to be created will be connected to a subnet that can access the target domain controller
|
||||
|
||||
## Parameters
|
||||
- vmName: Name of the Virtual Machine to be created.
|
||||
- adminUsername: Username for the Virtual Machine local administrator.
|
||||
- adminPassword: Password for the Virtual Machine local administrator.
|
||||
- dcVNetName: Name of the extisting VNet that contains the domain controller
|
||||
- dcSubnetName: Name of the existing subnet that contains the domain controller
|
||||
- domainToJoin: FQDN of the AD domain to join
|
||||
- ouToJoin: Specifies an AD organizational unit (OU) for the computer to join. Enter the full distinguished name of the OU in quotation marks.
|
||||
Example: 'OU=testOU; DC=domain; DC=Domain; DC=com'. This value can be empty
|
||||
- domainJoinOptions: Set of bit flags that define the join options. Default value of 3 is a combination of NETSETUP_JOIN_DOMAIN (0x00000001) & NETSETUP_ACCT_CREATE (0x00000002)
|
||||
i.e. will join the domain and create the account on the domain. For more information see https://msdn.microsoft.com/en-us/library/aa392154(v=vs.85).aspx
|
||||
- domainUserName: Username of the domain account to be used for joining the domain
|
||||
- domainPassword: Password of the domain account to be used for joining the domain
|
||||
|
||||
## Deployment steps
|
||||
1. Deploy to azure stack portal using custom deployment.
|
||||
2. Deploy through Visual Studio using azuredeploy.json and azuredeploy.parameters.json
|
||||
2. Deploy the solution from PowerShell with the following PowerShell script
|
||||
|
||||
``` PowerShell
|
||||
## Specify your AzureAD Tenant in a variable.
|
||||
# If you know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 1)
|
||||
# If you do not know the prefix of your <prefix>.onmicrosoft.com AzureAD account use option 2)
|
||||
|
||||
# Option 1) If you know the prefix of your <prefix>.onmicrosoft.com AzureAD namespace.
|
||||
# You need to set that in the $AadTenantId varibale (e.g. contoso.onmicrosoft.com).
|
||||
$AadTenantId = "contoso"
|
||||
|
||||
# Option 2) If you don't know the prefix of your AzureAD namespace, run the following cmdlets.
|
||||
# Validate with the Azure AD credentials you also use to sign in as a tenant to Microsoft Azure Stack Technical Preview.
|
||||
$AadTenant = Login-AzureRmAccount
|
||||
$AadTenantId = $AadTenant.Context.Tenant.TenantId
|
||||
|
||||
## Configure the environment with the Add-AzureRmEnvironment cmdlt
|
||||
Add-AzureRmEnvironment -Name 'Azure Stack' `
|
||||
-ActiveDirectoryEndpoint ("https://login.windows.net/$AadTenantId/") `
|
||||
-ActiveDirectoryServiceEndpointResourceId "https://azurestack.local-api/"`
|
||||
-ResourceManagerEndpoint ("https://api.azurestack.local/") `
|
||||
-GalleryEndpoint ("https://gallery.azurestack.local/") `
|
||||
-GraphEndpoint "https://graph.windows.net/"
|
||||
|
||||
## Authenticate a user to the environment (you will be prompted during authentication)
|
||||
$privateEnv = Get-AzureRmEnvironment 'Azure Stack'
|
||||
$privateAzure = Add-AzureRmAccount -Environment $privateEnv -Verbose
|
||||
Select-AzureRmProfile -Profile $privateAzure
|
||||
|
||||
## Select an existing subscription where the deployment will take place
|
||||
Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION_NAME" | Select-AzureRmSubscription
|
||||
|
||||
# Set Deployment Variables
|
||||
$myNum = "001" #Modify this per deployment
|
||||
$RGName = "myRG$myNum"
|
||||
$myLocation = "local"
|
||||
|
||||
$templateFile= "azuredeploy.json"
|
||||
$templateParameterFile= "azuredeploy.parameters.json"
|
||||
|
||||
# Create Resource Group for Template Deployment
|
||||
New-AzureRmResourceGroup -Name $RGName -Location $myLocation
|
||||
|
||||
# Deploy Template
|
||||
New-AzureRmResourceGroupDeployment `
|
||||
-ResourceGroupName $RGName `
|
||||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
||||
```
|
|
@ -0,0 +1,221 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"vmName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the Virtual Machine to be created"
|
||||
},
|
||||
"defaultValue": "[concat('myvm',resourceGroup().name)]"
|
||||
},
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine local administrator"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine local administrator. Default value is subscription id"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]"
|
||||
},
|
||||
"dcResourceGroupName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the resource group that cointains the domain controller"
|
||||
},
|
||||
"defaultValue": "[resourceGroup().name]"
|
||||
},
|
||||
"dcVNetName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the extisting VNet that contains the domain controller"
|
||||
},
|
||||
"defaultValue": "[concat('ADVNET',resourceGroup().name)]"
|
||||
},
|
||||
"dcSubnetName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Name of the existing subnet that contains the domain controller"
|
||||
},
|
||||
"defaultValue": "[concat('ADStaticSubnet',resourceGroup().name)]"
|
||||
},
|
||||
"domainToJoin": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "FQDN of the AD domain to join"
|
||||
},
|
||||
"defaultValue": "contoso.com"
|
||||
},
|
||||
"ouToJoin": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Specifies an organizational unit (OU) for the domain account. Enter the full distinguished name of the OU in quotation marks. Example: 'OU=testOU; DC=domain; DC=Domain; DC=com'. This value can be empty"
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"domainJoinOptions": {
|
||||
"type": "int",
|
||||
"metadata": {
|
||||
"description": "Set of bit flags that define the join options. Default value of 3 is a combination of NETSETUP_JOIN_DOMAIN (0x00000001) & NETSETUP_ACCT_CREATE (0x00000002) i.e. will join the domain and create the account on the domain. For more information see https://msdn.microsoft.com/en-us/library/aa392154(v=vs.85).aspx"
|
||||
},
|
||||
"defaultValue": 3
|
||||
},
|
||||
"domainUserName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username of the domain account to be used for joining the domain"
|
||||
},
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"domainPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password of the domain account to be used for joining the domain"
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmExtensionName": "JsonADDomainExtension",
|
||||
"storageAccountName": "[toLower(concat(resourceGroup().name,'sa'))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A2",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"imageSKU": "2012-R2-Datacenter",
|
||||
"imageVersion": "latest",
|
||||
"OSDiskName": "osdisk",
|
||||
"publicIPAddressName": "[concat(parameters('vmName'),'-pip')]",
|
||||
"nicName": "[concat(parameters('vmName'),'-nic')]",
|
||||
"vnetID": "[resourceId(parameters('dcResourceGroupName'), 'Microsoft.Network/virtualNetworks', parameters('dcVNetName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/', parameters('dcSubnetName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[parameters('vmName')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[parameters('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[parameters('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSKU')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[variables('OSDiskName')]",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(parameters('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "JsonADDomainExtension",
|
||||
"typeHandlerVersion": "1.3",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"Name": "[parameters('domainToJoin')]",
|
||||
"OUPath": "[parameters('ouToJoin')]",
|
||||
"User": "[concat(parameters('domainToJoin'), '\\', parameters('domainUserName'))]",
|
||||
"Restart": "true",
|
||||
"Options": "[parameters('domainJoinOptions')]"
|
||||
},
|
||||
"protectedsettings": {
|
||||
"Password": "[parameters('domainPassword')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
}
|
||||
}
|
Двоичные данные
ad-non-ha/CreateADPDC.ps1.zip
|
@ -14,13 +14,14 @@
|
|||
"metadata": {
|
||||
"description": "The name of the Administrator of the new VMs and Domain"
|
||||
},
|
||||
"defaultValue": "lcladmin"
|
||||
"defaultValue": "vmadmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "The password for the Administrator account of the new VMs and Domain"
|
||||
}
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -35,10 +36,10 @@
|
|||
"deployments": "2015-01-01"
|
||||
},
|
||||
"network": {
|
||||
"virtualNetworks": "2015-05-01-preview",
|
||||
"loadBalancers": "2015-05-01-preview",
|
||||
"publicIPAddresses": "2015-05-01-preview",
|
||||
"networkSecurityGroups": "2015-05-01-preview"
|
||||
"virtualNetworks": "2015-06-15",
|
||||
"loadBalancers": "2015-06-15",
|
||||
"publicIPAddresses": "2015-06-15",
|
||||
"networkSecurityGroups": "2015-06-15"
|
||||
}
|
||||
},
|
||||
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/ad-non-ha",
|
||||
|
@ -47,10 +48,9 @@
|
|||
"virtualNetworkAddressRange": "10.0.0.0/16",
|
||||
"primaryAdIpAddress": "10.0.0.4",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"azureStackDNSIPAddress": "192.168.100.2",
|
||||
"adTemplateURL": "[concat(variables('assetLocation'),'/adVmTemplate.json')]",
|
||||
"adStorageName": "[tolower(concat('adsa',resourceGroup().name))]",
|
||||
"dnsPrefix": "[concat('ADDNS',resourceGroup().name)]",
|
||||
"dnsPrefix": "[tolower(concat(resourceGroup().name,'dc'))]",
|
||||
"adVmDeployment": "CreateADVMs",
|
||||
"adVmDeploymentId": "[concat('Microsoft.Resources/deployments/', variables('adVmDeployment'))]",
|
||||
"adPDCVMName": "[concat('AD',resourceGroup().name)]",
|
||||
|
@ -132,13 +132,7 @@
|
|||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
},
|
||||
"subnets": "[variables('subnets')]",
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [
|
||||
"[variables('primaryAdIpAddress')]",
|
||||
"[variables('azureStackDNSIPAddress')]"
|
||||
]
|
||||
}
|
||||
"subnets": "[variables('subnets')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -294,12 +288,11 @@
|
|||
"value": "[variables('subnets')]"
|
||||
},
|
||||
"dnsServerAddress": {
|
||||
"value": [ "[variables('primaryAdIpAddress')]",
|
||||
"[variables('azureStackDNSIPAddress')]" ]
|
||||
"value": [ "[variables('primaryAdIpAddress')]" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outputs": { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,14 +2,5 @@
|
|||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"domainName": {
|
||||
"value": "contoso.com"
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": "lcladmin"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,28 @@
|
|||
# [IaaS Linux VM Comprehensive Resources]
|
||||
|
||||
This template deploys a Linux VM and also uses customscript, VMLinuxAccess and Docker Extensions
|
||||
# A template that creates a simple Windows VM with Anti-Malware extension enabled with the following configuration:
|
||||
Exclusions: none
|
||||
Realtime protection enabled: true
|
||||
Scheduled scan settings:
|
||||
Scan type: Quick
|
||||
Day: 7 (Saturday)
|
||||
Time: 120 (measured as minutes after midnight = 2AM)
|
||||
|
||||
## Prerequisites
|
||||
None
|
||||
|
||||
Follow the below links to create an Ubuntu Image and upload the same to Azure Stack's Platform Image Repository
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-ubuntu/
|
||||
2. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-add-image-pir/
|
||||
## Parameters
|
||||
- adminUsername: Username for the Virtual Machine local administrator.
|
||||
- adminPassword: Password for the Virtual Machine local administrator.
|
||||
|
||||
## Notes
|
||||
The Anti-Malware extension disables the Anti-Malware application from opening (but the service is configured).
|
||||
If access to the application is needed run the following commands:
|
||||
cd C:/program files/microsoft security client
|
||||
configsecuritypolicy cleanuppolicy.xml
|
||||
|
||||
## Deployment steps
|
||||
Deploy the solution from PowerShell with the following PowerShell script or deploy to azure stack portal using custom deployment.
|
||||
1. Deploy to azure stack portal using custom deployment.
|
||||
2. Deploy through Visual Studio using azuredeploy.json and azuredeploy.parameters.json
|
||||
2. Deploy the solution from PowerShell with the following PowerShell script
|
||||
|
||||
``` PowerShell
|
||||
## Specify your AzureAD Tenant in a variable.
|
||||
|
@ -46,17 +59,15 @@ $myNum = "001" #Modify this per deployment
|
|||
$RGName = "myRG$myNum"
|
||||
$myLocation = "local"
|
||||
|
||||
$templateFile= "azuredeploy.json"
|
||||
$templateParameterFile= "azuredeploy.parameters.json"
|
||||
|
||||
# Create Resource Group for Template Deployment
|
||||
New-AzureRmResourceGroup -Name $RGName -Location $myLocation
|
||||
|
||||
# Deploy Template
|
||||
New-AzureRmResourceGroupDeployment `
|
||||
-Name "myDeployment$myNum" `
|
||||
-ResourceGroupName $RGName `
|
||||
-TemplateFile "azuredeploy.json" `
|
||||
-adminUsername "admin" `
|
||||
-adminPassword ("GEN-PASSWORD" | ConvertTo-SecureString -AsPlainText -Force)`
|
||||
-ubuntuOSVersion "15.10" `
|
||||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,221 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Username for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "Administrator"
|
||||
},
|
||||
"adminPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Password for the Virtual Machine."
|
||||
},
|
||||
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"vmName": "[concat(resourceGroup().name,'-am')]",
|
||||
"vmExtensionName": "IaaSAntimalware",
|
||||
"storageAccountName": "[toLower(concat(resourceGroup().name,'amsa'))]",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"vmStorageAccountContainerName": "vhds",
|
||||
"vmSize": "Standard_A2",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"imageSKU": "2012-R2-Datacenter",
|
||||
"imageVersion": "latest",
|
||||
"OSDiskName": "osdisk",
|
||||
"networkSecurityGroupName": "[concat(resourceGroup().name,'-amsg')]",
|
||||
"publicIPAddressName": "[concat(resourceGroup().name,'-amip')]",
|
||||
"dnsName": "[concat(resourceGroup().name,'-amdns')]",
|
||||
"virtualNetworkName": "[concat(resourceGroup().name,'-amvnet')]",
|
||||
"addressPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[concat(resourceGroup().name,'-amsubnet')]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"nicName": "[concat(resourceGroup().name,'-amvnic')]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('networkSecurityGroupName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[variables('storageAccountName')]",
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "Dynamic",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('dnsName')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-05-01-preview",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('nicName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"dnsSettings": {
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfig1",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('imageSKU')]",
|
||||
"version": "[variables('imageVersion')]"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "[variables('OSDiskName')]",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/', variables('vmExtensionName'))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Azure.Security",
|
||||
"type": "IaaSAntimalware",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"AntimalwareEnabled": "true",
|
||||
"RealtimeProtectionEnabled": "true",
|
||||
"ScheduledScanSettings": {
|
||||
"isEnabled": "true",
|
||||
"scanType": "Quick",
|
||||
"day": "7",
|
||||
"time": "120"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,17 +2,11 @@
|
|||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"adminUsername": {
|
||||
"value": "Administrator"
|
||||
},
|
||||
"adminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
"adminUsername": {
|
||||
"value": "azureUser"
|
||||
},
|
||||
"adDomainName": {
|
||||
"value": "mydomain.local"
|
||||
},
|
||||
"numberOfRdshInstances": {
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
}
|
Двоичные данные
bootstorm-vm-boot-time/VMBootAll.zip
|
@ -1,324 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.05.27",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure tenant user name to authenticate inside controller VM."
|
||||
}
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Azure tenant user password to authenticate inside controller VM."
|
||||
}
|
||||
},
|
||||
"tenantId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure Subscription Tenant Id."
|
||||
}
|
||||
},
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 2,
|
||||
"metadata": {
|
||||
"description": "Number of VMs to create."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersionCRP": "2015-06-15",
|
||||
"apiVersionSRP": "2015-06-15",
|
||||
"apiVersionNRP": "2015-05-01-preview",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnetName": "[concat('vsn', resourceGroup().name)]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"publicIPAddressName": "[concat('ip', resourceGroup().name)]",
|
||||
"uniqueDnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"uniqueStorageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"uniqueStorageAccountContainerName": "[concat('sc', resourceGroup().name)]",
|
||||
"adResourceID": "https://azurestack.local-api/",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "pwd0a!8b7",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmNicName": "[concat('nc', resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('vn', resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/bootstorm-vm-boot-time/",
|
||||
"moduleVMBootAll": "VMBootAll.zip",
|
||||
"modulesUrlVMBootAll": "[concat(variables('modulesPath'),variables('moduleVMBootAll'))]",
|
||||
"configurationFunctionVMBootAll": "VMBootAll.ps1\\ConfigureVMBootAll"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionSRP')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('uniqueDnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "192.168.100.2" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('vmNicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigprivate",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName')))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',concat(variables('vmOsDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.13",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlVMBootAll')]",
|
||||
"configurationFunction": "[variables('configurationFunctionVMBootAll')]",
|
||||
"properties": {
|
||||
"azureAccountUsername": "[parameters('azureAccountUsername')]",
|
||||
"azureAccountPassword": "[parameters('azureAccountPassword')]",
|
||||
"AdResourceID": "[variables('adResourceID')]",
|
||||
"TenantId": "[parameters('tenantId')]",
|
||||
"VMName": "[variables('vmName')]",
|
||||
"VMCount": "[parameters('vmCount')]",
|
||||
"VMAdminUserName": "[variables('vmAdminUsername')]",
|
||||
"VMAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"AzureStorageAccount": "[variables('uniqueStorageAccountName')]",
|
||||
"AzureStorageAccessKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).key1]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
|
||||
"contentVersion": "1.16.03.24",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"value": "<Your Azure tenant account user name>"
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"value": "<Your secured Azure tenant account password>"
|
||||
},
|
||||
"tenantId": {
|
||||
"value": "<Your secured tenant Id from Azure Subscription>"
|
||||
},
|
||||
"vmCount": {
|
||||
"value": 2
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,322 +1,332 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.05.27",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure account SPN user name to authenticate inside controller VM."
|
||||
}
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Azure account SPN password to authenticate inside controller VM."
|
||||
}
|
||||
},
|
||||
"tenantId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure Subscription Tenant Id."
|
||||
}
|
||||
},
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 2,
|
||||
"metadata": {
|
||||
"description": "Number of VMs to create."
|
||||
}
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.08.15",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure tenant user name to authenticate inside controller VM."
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersion": "2015-06-15",
|
||||
"apiVersionCRP": "2015-06-15",
|
||||
"apiVersionSRP": "2015-06-15",
|
||||
"apiVersionNRP": "2015-05-01-preview",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnetName": "[concat('vsn', resourceGroup().name)]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"publicIPAddressName": "[concat('ip', resourceGroup().name)]",
|
||||
"uniqueDnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"uniqueStorageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"uniqueStorageAccountContainerName": "[concat('sc', resourceGroup().name)]",
|
||||
"adResourceID": "null",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "pwd0a!8b7",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmNicName": "[concat('nc', resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('vn', resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/bootstorm-vm-boot-time/",
|
||||
"moduleVMBootAll": "VMBootAll.zip",
|
||||
"modulesUrlVMBootAll": "[concat(variables('modulesPath'),variables('moduleVMBootAll'))]",
|
||||
"configurationFunctionVMBootAll": "VMBootAll.ps1\\ConfigureVMBootAll"
|
||||
"azureAccountPassword": {
|
||||
"type": "string",
|
||||
"defaultValue": "[subscription().subscriptionId]",
|
||||
"metadata": {
|
||||
"description": "Azure tenant user password to authenticate inside controller VM."
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionSRP')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('uniqueDnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('vmNicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigprivate",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName')))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',concat(variables('vmOsDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.15",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlVMBootAll')]",
|
||||
"configurationFunction": "[variables('configurationFunctionVMBootAll')]",
|
||||
"properties": {
|
||||
"azureAccountUsername": "[parameters('azureAccountUsername')]",
|
||||
"azureAccountPassword": "[parameters('azureAccountPassword')]",
|
||||
"AdResourceID": "[variables('adResourceID')]",
|
||||
"TenantId": "[parameters('tenantId')]",
|
||||
"VMName": "[variables('vmName')]",
|
||||
"VMCount": "[parameters('vmCount')]",
|
||||
"VMAdminUserName": "[variables('vmAdminUsername')]",
|
||||
"VMAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"AzureStorageAccount": "[variables('uniqueStorageAccountName')]",
|
||||
"AzureStorageAccessKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).key1]"
|
||||
}
|
||||
}
|
||||
}
|
||||
"tenantId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure Subscription Tenant Id."
|
||||
}
|
||||
},
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 2,
|
||||
"metadata": {
|
||||
"description": "Number of VMs to create."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersionCRP": "2015-06-15",
|
||||
"apiVersionSRP": "2015-06-15",
|
||||
"apiVersionNRP": "2015-06-15",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnetName": "[concat('vsn', resourceGroup().name)]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"publicIPAddressName": "[concat('ip', resourceGroup().name)]",
|
||||
"uniqueDnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"uniqueStorageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"uniqueStorageAccountContainerName": "[concat('sc', resourceGroup().name)]",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "pwd0a!8b7",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmNicName": "[concat('nc', resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('vn', resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/bootstorm-vm-boot-time/",
|
||||
"moduleVMBootAll": "VMBootAll.zip",
|
||||
"modulesUrlVMBootAll": "[concat(variables('modulesPath'),variables('moduleVMBootAll'))]",
|
||||
"configurationFunctionVMBootAll": "VMBootAll.ps1\\ConfigureVMBootAll"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionSRP')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('uniqueDnsNameForPublicIP')]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('vmNicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigprivate",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName')))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',concat(variables('vmOsDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.15",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlVMBootAll')]",
|
||||
"configurationFunction": "[variables('configurationFunctionVMBootAll')]",
|
||||
"properties": {
|
||||
"AzureAccountCreds": {
|
||||
"userName": "[parameters('azureAccountUsername')]",
|
||||
"password": "PrivateSettingsRef:azureAccountPassword"
|
||||
},
|
||||
"TenantId": "[parameters('tenantId')]",
|
||||
"Location": "[variables('location')]",
|
||||
"VMName": "[variables('vmName')]",
|
||||
"VMCount": "[parameters('vmCount')]",
|
||||
"VMAdminCreds": {
|
||||
"userName": "[variables('vmAdminUsername')]",
|
||||
"password": "PrivateSettingsRef:vmAdminPassword"
|
||||
},
|
||||
"AzureStorageAccount": "[variables('uniqueStorageAccountName')]",
|
||||
"AzureStorageAccessKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).key1]",
|
||||
"AzureStorageEndpoint": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).primaryEndpoints['blob']]"
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"items": {
|
||||
"vmAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"azureAccountPassword": "[parameters('azureAccountPassword')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
|
||||
"contentVersion": "1.16.03.24",
|
||||
"contentVersion": "1.16.08.15",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"value": "<Your Azure account SPN user name>"
|
||||
"value": "AZURE-AD-ACCOUNT-USERNAME"
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"value": "<Your secured Azure account SPN password>"
|
||||
"value": "AZURE-AD-ACCOUNT-PASSWORD"
|
||||
},
|
||||
"tenantId": {
|
||||
"value": "<Your secured tenant Id from Azure Subscription>"
|
||||
"value": "AZURE-AD-ACCOUNT-TENANT-ID"
|
||||
},
|
||||
"vmCount": {
|
||||
"value": 2
|
||||
"value": 5
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
## VM BOOTSTORM WORKLOAD FOR AZURE (CLOUD) ##
|
||||
|
||||
<b>DESCRIPTION</b>
|
||||
|
||||
This template deploys requested number of A2 size Windows Server 2012R2 VMs and a controller VM with public IP address in same virtual network. Controller VM turn-off all VMs then boot them simultaneously to measure an average and end-to-end VM boot time.
|
||||
|
||||
For controller VM to manage all VMs, Azure SPN needs to be configured using instructions given below.
|
||||
|
||||
|
||||
<b>AZURE SPN CONFIGURATION</b>
|
||||
```Poweshell
|
||||
New-AzureRmADApplication -Password <any string to use as a password> -DisplayName <Any String Name> -IdentifierUris https://<UseAnyUniqueName e.g. serviceprinciplenm> -HomePage <same as IdentifierUris>
|
||||
|
||||
<i>Use ApplicationId returned by above cmdlet</i>
|
||||
|
||||
New-AzureRmADServicePrincipal -ApplicationId <ApplicationId>
|
||||
|
||||
New-AzureRmRoleAssignment -RoleDefinitionName Owner -ServicePrincipalName "https://<same as IdentifierUris>"
|
||||
```
|
||||
|
||||
|
||||
<b>SAMPLE AZURE SPN CONFIGURATION COMMANDS</b>
|
||||
```Poweshell
|
||||
$azureSubscriptionId = "<Your Azure subscription id (Get-AzureSubscription).SubscriptionId>"
|
||||
|
||||
$azureAdIdUri = "https://azureadiduri"
|
||||
|
||||
$azureAdPassword = "azureadpwd123"
|
||||
|
||||
$azureAdDisplayName = "azureaddisplayname"
|
||||
|
||||
Add-AzureRmAccount
|
||||
|
||||
Select-AzureRmSubscription -SubscriptionID $azureSubscriptionId
|
||||
|
||||
$azureAdApp = New-AzureRmADApplication -Password $azureAdPassword -DisplayName $azureAdDisplayName -IdentifierUris $azureAdIdUri -HomePage $azureAdIdUri
|
||||
|
||||
New-AzureRmADServicePrincipal -ApplicationId $azureAdApp.ApplicationId
|
||||
|
||||
New-AzureRmRoleAssignment -RoleDefinitionName Owner -ServicePrincipalName $azureAdIdUri
|
||||
```
|
||||
|
||||
|
||||
<b>RESULTS</b>
|
||||
|
||||
VM bootstorm results file is uploaded to Unique Azure Storage Account ('uniqueStorageAccountName' parameter provided by you) as a blob with name 'VMBootAllResult.log.ps1.zip'
|
||||
|
||||
|
||||
<b>DEPLOY</b>
|
||||
|
||||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fbootstorm-vm-boot-time%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fbootstorm-vm-boot-time%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
|
||||
|
||||
<b>PARAMETERS</b>
|
||||
```Poweshell
|
||||
Azure AD Application Id: <Application ID returned by New-AzureADServicePrincipal cmdlet while setting up Azure SPN Configuration>
|
||||
|
||||
Azure AD Application Password: <Password you entered for New-AzureADServicePrincipal cmdlet while setting up Azure SPN Configuration>
|
||||
|
||||
Tenant Id: (Get-AzureSubscription).TenantId
|
||||
|
||||
VM Count: <Choose number of VMs to deploy>
|
||||
|
||||
```
|
|
@ -1,32 +0,0 @@
|
|||
## VM BOOTSTORM WORKLOAD FOR AZURESTACK (LOCAL) ##
|
||||
|
||||
<b>DESCRIPTION</b>
|
||||
|
||||
This template deploys requested number of A2 size Windows Server 2012R2 VMs and a controller VM with public IP address in same virtual network. Controller VM turn-off all VMs then boot them simultaneously to measure an average and end-to-end VM boot time.
|
||||
|
||||
|
||||
<b>RESULTS</b>
|
||||
|
||||
VM bootstorm results file is uploaded to Unique Azure Storage Account ('uniqueStorageAccountName' parameter provided by you) as a blob with name 'VMBootAllResult.log.ps1.zip. Detailed logs are also uploaded alongside with name VMBootAll.log.ps1.zip.'
|
||||
|
||||
|
||||
<b>DEPLOY</b>
|
||||
|
||||
Login to AzureStack portal
|
||||
|
||||
Click 'New' -> 'Custom' -> 'Template Deployment'
|
||||
|
||||
Copy content in azuredeploy.json, click 'Edit Template', paste all the content and click 'Save'
|
||||
|
||||
Fill in the parameters
|
||||
|
||||
Click 'Create New' to create a new 'Resource Group'
|
||||
|
||||
Click 'Create'
|
||||
|
||||
Wait for results to appear in 'Storage Account' of a given 'Resource Group' parameter name resource
|
||||
|
||||
|
||||
<b>NOTE</b>
|
||||
|
||||
On AzureStack you might see parallel VM deployment failures which is known issue and is being addressed. Please try single VM deployment only.
|
|
@ -1,57 +1,38 @@
|
|||
## VM BOOTSTORM WORKLOAD FOR AZURE (CLOUD) ##
|
||||
## VM bootstorm workload for Azure and AzureStack ##
|
||||
|
||||
<b>DESCRIPTION</b>
|
||||
|
||||
This template deploys requested number of A2 size Windows Server 2012R2 VMs and a controller VM with public IP address in same virtual network. Controller VM turn-off all VMs then boot them simultaneously to measure an average and end-to-end VM boot time.
|
||||
|
||||
For controller VM to manage all VMs, Azure SPN needs to be configured using instructions given below.
|
||||
|
||||
|
||||
<b>AZURE SPN CONFIGURATION</b>
|
||||
```Poweshell
|
||||
New-AzureRmADApplication -Password <any string to use as a password> -DisplayName <Any String Name> -IdentifierUris https://<UseAnyUniqueName e.g. serviceprinciplenm> -HomePage <same as IdentifierUris>
|
||||
|
||||
<i>Use ApplicationId returned by above cmdlet</i>
|
||||
|
||||
New-AzureRmADServicePrincipal -ApplicationId <ApplicationId>
|
||||
|
||||
New-AzureRmRoleAssignment -RoleDefinitionName Owner -ServicePrincipalName "https://<same as IdentifierUris>"
|
||||
```
|
||||
|
||||
|
||||
<b>SAMPLE AZURE SPN CONFIGURATION COMMANDS</b>
|
||||
```Poweshell
|
||||
$azureSubscriptionId = "<Your Azure subscription id (Get-AzureSubscription).SubscriptionId>"
|
||||
|
||||
$azureAdIdUri = "https://azureadiduri"
|
||||
|
||||
$azureAdPassword = "azureadpwd123"
|
||||
|
||||
$azureAdDisplayName = "azureaddisplayname"
|
||||
|
||||
Add-AzureRmAccount
|
||||
|
||||
Select-AzureRmSubscription -SubscriptionID $azureSubscriptionId
|
||||
|
||||
$azureAdApp = New-AzureRmADApplication -Password $azureAdPassword -DisplayName $azureAdDisplayName -IdentifierUris $azureAdIdUri -HomePage $azureAdIdUri
|
||||
|
||||
New-AzureRmADServicePrincipal -ApplicationId $azureAdApp.ApplicationId
|
||||
|
||||
New-AzureRmRoleAssignment -RoleDefinitionName Owner -ServicePrincipalName $azureAdIdUri
|
||||
```
|
||||
|
||||
|
||||
<b>RESULTS</b>
|
||||
|
||||
VM bootstorm results file is uploaded to Unique Azure Storage Account ('uniqueStorageAccountName' parameter provided by you) as a blob with name 'VMBootAllResult.log.ps1.zip'
|
||||
VM bootstorm results file is uploaded to Unique Azure Storage Account ('uniqueStorageAccountName' parameter provided by you) as a blob with name 'VMBootAllResult.log'. Detailed logs are also uploaded alongside with name 'VMBootAll.log'
|
||||
|
||||
|
||||
<b>DEPLOY</b>
|
||||
|
||||
Login to AzureStack portal
|
||||
|
||||
Click 'New' -> 'Custom' -> 'Template Deployment'
|
||||
|
||||
Copy content in azuredeploy.json, click 'Edit Template', paste all the content and click 'Save'
|
||||
|
||||
Fill in the parameters
|
||||
|
||||
Click 'Create New' to create a new 'Resource Group'
|
||||
|
||||
Click 'Create'
|
||||
|
||||
Wait for results to appear in 'Storage Account' of a given 'Resource Group' parameter name resource
|
||||
|
||||
|
||||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fbootstorm-vm-boot-time%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
|
||||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fbootstorm-vm-boot-time%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
|
||||
|
||||
<b>PARAMETERS</b>
|
||||
|
@ -62,17 +43,4 @@ Azure AD Application Password: <Password you entered for New-AzureADServicePrinc
|
|||
|
||||
Tenant Id: (Get-AzureSubscription).TenantId
|
||||
|
||||
Unique Dns Name for PublicIP: <Choose any string value unique across Azure>
|
||||
|
||||
Unique Storage Account Name: <Choose any string value unique across Azure>
|
||||
|
||||
Location: <Location where Azure resources will be deployed>
|
||||
|
||||
VM Admin User Name: <Choose secure username for VMs>
|
||||
|
||||
VM Admin Password: <Choose secure password for VMs>
|
||||
|
||||
VM Count: <Choose number of VMs to deploy>
|
||||
|
||||
VM OS Sku: <Choose version of Windows to deploy>
|
||||
```
|
||||
|
|
|
@ -1,58 +1,53 @@
|
|||
# Clusters with Swarm Orchestrators
|
||||
|
||||
These Microsoft Azure Stack templates create various cluster Swarm Orchestrators.
|
||||
These Microsoft Azure Stack templates create docker Swarm clusters.
|
||||
|
||||
Note:This version of swarm deployment USING ADMIN PASSWORD. SSHKeys are not supported at this moment The below content is to give overall architecture of the Swarm Cluster
|
||||
The below content is to give overall architecture of the Swarm Cluster
|
||||
|
||||
## Deployed resources
|
||||
|
||||
Once your cluster has been created you will have a resource group containing 2 parts:
|
||||
|
||||
1. a set of 1,3,5 masters in a master specific availability set. Each master's SSH can be accessed via the public dns address at ports 2200..2204
|
||||
1. a set of 1,3,5 masters nodes. Each master's SSH can be accessed via the public dns address at ports 2200..2204
|
||||
|
||||
2. a set of agents behind in an agent specific availability set. The agent VMs must be accessed through the master.
|
||||
2. a set of agents nodes. The agent VMs must be accessed through the master.
|
||||
|
||||
The following image is an example of a cluster with 3 masters, and 3 agents:
|
||||
|
||||
![Image of Swarm cluster on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-dockerswarm-ubuntu/images/swarm.png)
|
||||
![Image of Swarm cluster on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/docker-swarm-ubuntu/images/swarm.png)
|
||||
|
||||
All VMs are on the same private subnet, 10.0.0.0/18, and fully accessible to each other.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Follow the below links to create an Ubuntu Image and upload the same to Azure Stack's Platform Image Repository
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-ubuntu/
|
||||
Follow the below links to create/download an Ubuntu 14.04 LTS Image and upload the same to Azure Stack's Platform Image Repository(PIR)
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-linux/
|
||||
2. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-add-image-pir/
|
||||
Note: please use the default values for linuxPublisher,linuxOffer,linuxSku,linuxVersion found in azuredeploy.json while creating the manifest.json in PIR
|
||||
|
||||
## Deployment steps
|
||||
=> Deploy to azurestack, using custom deployment in azurestack portal.
|
||||
=> or use Deployswarm.ps1 to deploy to azurestack via powershell.
|
||||
|
||||
## Template Parameters
|
||||
When you launch the installation of the cluster, you need to specify the following parameters:
|
||||
* `adminPassword`: self-explanatory
|
||||
* `agentCount`: the number of swarm Agents that you want to create in the cluster. You are allowed to create 1 to 10 agents
|
||||
* `masterCount`: Number of Masters. Currently the template supports 3 configurations: 1, 3 and 5 Masters cluster configuration.
|
||||
* `agentVMSize`: The type of VM that you want to use for each node in the cluster. The default size is A1 but you can change that if you expect to run workloads that require more RAM or CPU resources.
|
||||
|
||||
## Usage
|
||||
1. Get your endpoints to cluster
|
||||
1. browse to https://portal.azurestack.local
|
||||
|
||||
2. then click browse all, followed by "resource groups", and choose your resource group
|
||||
|
||||
![Image of resource groups in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-dockerswarm-ubuntu/images/portal-resourcegroups.png)
|
||||
![Image of resource groups in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/docker-swarm-ubuntu/images/portal-resourcegroups.png)
|
||||
|
||||
3. then expand your resources, and copy the dns names of your jumpbox (if chosen), and your NAT public ip addresses.
|
||||
|
||||
![Image of public ip addresses in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-dockerswarm-ubuntu/images/portal-publicipaddresses.png)
|
||||
![Image of public ip addresses in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/docker-swarm-ubuntu/images/portal-publicipaddresses.png)
|
||||
|
||||
2. Connect to your cluster using windows jumpbox - remote desktop to the windows jumpbox
|
||||
|
||||
## Explore Swarm with Simple hello world
|
||||
1. After successfully deploying the template write down the two output master and agent FQDNs.
|
||||
2. SSH to port 2200 of the master FQDN
|
||||
2. SSH to port 22 of the master private ip
|
||||
3. Type `docker -H 10.0.0.5:2375 info` to see the status of the agent nodes.
|
||||
![Image of docker info](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-dockerswarm-ubuntu/images/dockerinfo.png)
|
||||
![Image of docker info](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/docker-swarm-ubuntu/images/dockerinfo.png)
|
||||
4. Type `docker -H 10.0.0.5:2375 run hello-world` to see the hello-world test app run on one of the agents
|
||||
|
||||
## Explore Swarm with a web-based Compose Script, then scale the script to all agents
|
||||
|
@ -68,11 +63,13 @@ web:
|
|||
3. type `export DOCKER_HOST=10.0.0.5:2375` so that docker-compose automatically hits the swarm endpoints
|
||||
4. type `docker-compose up -d` to create the simple web server. this will take about a minute to pull the image
|
||||
5. once completed, type `docker ps` to see the running image.
|
||||
![Image of docker ps](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-dockerswarm-ubuntu/images/dockerps.png)
|
||||
![Image of docker ps](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/docker-swarm-ubuntu/images/dockerps.png)
|
||||
6. You can now scale the web application by typing `docker-compose scale web=3`, and this will scale to the rest of your agents. The Azure load balancer will automatically pick up the new containers.
|
||||
![Image of docker scaling](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-dockerswarm-ubuntu/images/dockercomposescale.png)
|
||||
![Image of docker scaling](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/docker-swarm-ubuntu/images/dockercomposescale.png)
|
||||
|
||||
## Notes
|
||||
* This version of swarm is a non-HA(no Loadbalancer or Availabilitysets) with master, Agent node deployment.
|
||||
* Refer https://help.ubuntu.com/community/SSH/OpenSSH/Keys#Generating_RSA_Keys for generating sshkeys for ubuntu
|
||||
* the installation log for the linux jumpbox, masters, and agents are in /var/log/azure/cluster-bootstrap.log
|
||||
* event though the VMs finish quickly configuring swarm can take 5-15 minutes to install, check /var/log/azure/cluster-bootstrap.log for the completion status.
|
||||
|
|
@ -3,11 +3,8 @@
|
|||
"contentVersion": "1.0.0.0",
|
||||
"parameters":
|
||||
{
|
||||
"linuxAdminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
"windowsAdminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
"sshRSAPublicKey": {
|
||||
"value": "GEN-SSH-PUB-KEY"
|
||||
},
|
||||
"agentCount": {
|
||||
"value": 1
|
||||
|
@ -21,8 +18,8 @@
|
|||
"masterVMSize": {
|
||||
"value": "Standard_A2"
|
||||
},
|
||||
"nameSuffix": {
|
||||
"value": "UNIQUESTRING"
|
||||
"setSSHKeysLinuxConfiguration": {
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,14 +6,14 @@
|
|||
"type": "string",
|
||||
"defaultValue": "adminuser",
|
||||
"metadata": {
|
||||
"description": "User name for the Linux Virtual Machines (SSH or Password)."
|
||||
"description": "User name for the Linux Virtual Machines (SSH or Password).Default value is adminuser"
|
||||
}
|
||||
},
|
||||
"linuxAdminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Linux Virtual Machine. Not Required. If not set, you must provide a SSH key."
|
||||
"description": "Password for the Linux Virtual Machine. Default value is 'Subscription#<subscription id>'. Not Required. If not set, you must provide a SSH key."
|
||||
}
|
||||
},
|
||||
"sshRSAPublicKey": {
|
||||
|
@ -27,14 +27,14 @@
|
|||
"type": "string",
|
||||
"defaultValue": "adminuser",
|
||||
"metadata": {
|
||||
"description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported)."
|
||||
"description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported).Default value is adminuser"
|
||||
}
|
||||
},
|
||||
"windowsAdminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Windows Jumpbox Virtual Machine."
|
||||
"description": "Password for the Windows Jumpbox Virtual Machine. Default value is 'Subscription#<subscription id>'."
|
||||
}
|
||||
},
|
||||
"agentVMSize": {
|
||||
|
@ -119,14 +119,7 @@
|
|||
"description": "This is the windows sku used by the windows jumpbox"
|
||||
}
|
||||
},
|
||||
"disablePasswordAuthentication": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "This setting controls whether password auth is disabled for Linux VMs provisioned by this template. Default is true which disables password and makes SSH key required."
|
||||
}
|
||||
},
|
||||
"setLinuxConfigurationForVMCreate": {
|
||||
"setSSHKeysLinuxConfiguration": {
|
||||
"type": "int",
|
||||
"defaultValue": 0,
|
||||
"allowedValues": [ 0, 1 ],
|
||||
|
@ -134,13 +127,6 @@
|
|||
"description": "This setting controls whether Linux configuration with SSH Key is passed in VM PUT Payload. Defaults to 1. If SSH Key is blank, this must be set to 0."
|
||||
}
|
||||
},
|
||||
"nameSuffix": {
|
||||
"type": "string",
|
||||
"defaultValue": "0",
|
||||
"metadata": {
|
||||
"description": "A UNIQUE string to be included in the names of resources created. Defaults to 0. Can not be blank."
|
||||
}
|
||||
},
|
||||
"vmsPerStorageAccount": {
|
||||
"type": "int",
|
||||
"defaultValue": 40,
|
||||
|
@ -148,19 +134,12 @@
|
|||
"description": "This specifies the number of VMs per storage accounts"
|
||||
}
|
||||
},
|
||||
"postInstallScriptURI": {
|
||||
"type": "string",
|
||||
"defaultValue": "disabled",
|
||||
"metadata": {
|
||||
"description": "After installation, this specifies a script to download and install. To disabled, set value to 'disabled'."
|
||||
}
|
||||
},
|
||||
"configureScriptsRootLocation": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The root location for all the configuring scripts"
|
||||
},
|
||||
"defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-dockerswarm-ubuntu/parts/"
|
||||
"defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/docker-swarm-ubuntu/parts/"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -172,9 +151,11 @@
|
|||
"storage": "2015-05-01-preview",
|
||||
"compute": "2015-06-15"
|
||||
},
|
||||
"jumpboxEndpointDNSName": "[concat('jumpbox', variables('nameSuffix'))]",
|
||||
"masterEndpointDNSName": "[concat('master', variables('nameSuffix'))]",
|
||||
"agentEndpointDNSName": "[concat('agent', variables('nameSuffix'))]",
|
||||
"orchestratorName": "swarm",
|
||||
"nameSuffix": "[replace(replace(substring(tolower(uniqueString(resourceGroup().id)),0,5), '-', ''), '.','')]",
|
||||
"jumpboxEndpointDNSName": "[tolower(concat('jumpbox', variables('nameSuffix')))]",
|
||||
"masterEndpointDNSName": "[tolower(concat('master', variables('nameSuffix')))]",
|
||||
"agentEndpointDNSName": "[tolower(concat('agent', variables('nameSuffix')))]",
|
||||
"agentCount": "[parameters('agentCount')]",
|
||||
"masterCount": "[parameters('masterCount')]",
|
||||
"agentVMSize": "[parameters('agentVMSize')]",
|
||||
|
@ -189,18 +170,13 @@
|
|||
"windowsAdminUsername": "[parameters('windowsAdminUsername')]",
|
||||
"windowsAdminPassword": "[parameters('windowsAdminPassword')]",
|
||||
"vmsPerStorageAccount": "[parameters('vmsPerStorageAccount')]",
|
||||
"postInstallScriptURI": "[parameters('postInstallScriptURI')]",
|
||||
|
||||
"nameSuffix": "[tolower(parameters('nameSuffix'))]",
|
||||
"storageLocation": "[resourceGroup().location]",
|
||||
|
||||
"sshKeyPath": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]",
|
||||
"disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]",
|
||||
"setLinuxConfigurationForVMCreate": "[parameters('setLinuxConfigurationForVMCreate')]",
|
||||
"linuxConfigurations": [
|
||||
{ },
|
||||
{
|
||||
"disablePasswordAuthentication": "[variables('disablePasswordAuthentication')]",
|
||||
"disablePasswordAuthentication": true,
|
||||
"ssh": {
|
||||
"publicKeys": [
|
||||
{
|
||||
|
@ -211,9 +187,7 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"linuxConfiguration": "[variables('linuxConfigurations')[variables('setLinuxConfigurationForVMCreate')]]",
|
||||
|
||||
"orchestratorName": "swarm",
|
||||
"linuxConfiguration": "[variables('linuxConfigurations')[parameters('setSSHKeysLinuxConfiguration')]]",
|
||||
|
||||
|
||||
"jumpboxPublicIPAddressName": "[concat(variables('orchestratorName'), '-jumpbox-ip-', '-', variables('nameSuffix'))]",
|
||||
|
@ -225,7 +199,7 @@
|
|||
|
||||
"virtualNetworkName": "[concat(variables('orchestratorName'), '-vnet-', variables('nameSuffix'))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetName": "[concat(variables('orchestratorName'), '-subnet')]",
|
||||
"subnetName": "[concat(variables('orchestratorName'), '-subnet-', variables('nameSuffix'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"subnetPrefix": "10.0.0.0/18",
|
||||
|
@ -275,9 +249,9 @@
|
|||
"agentStorageAccountName": "[concat(variables('storageAccountBaseName'),'agent', variables('nameSuffix'))]",
|
||||
"omsStorageAccount": "none",
|
||||
"omsStorageAccountKey": "none",
|
||||
"clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('adminUsername'),' ',variables('postInstallScriptURI'), ' ', variables('baseSubnet'))]",
|
||||
"jumpboxNSGName": "[concat(variables('orchestratorName'), '-jumpbox-nsg-', variables('nameSuffix'))]",
|
||||
"jumpboxNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('jumpboxNSGName'))]",
|
||||
"clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('adminUsername'),' ',' ', ' ', variables('baseSubnet'))]",
|
||||
"jumpboxAddr": 4,
|
||||
"jumpboxVMName": "[concat('jumpboxVM-', variables('nameSuffix'))]",
|
||||
"jumpboxVMSize": "Standard_A1",
|
||||
|
@ -285,7 +259,6 @@
|
|||
"masterNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('masterNSGName'))]",
|
||||
"masterVMNamePrefix": "[concat(variables('orchestratorName'), '-masterVM-', variables('nameSuffix'), '-')]",
|
||||
"masterFirstAddr": 5,
|
||||
"azureStackDNSIP": "192.168.100.2",
|
||||
"agentNSGName": "[concat(variables('orchestratorName'), '-agent-nsg-', variables('nameSuffix'))]",
|
||||
"agentNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('agentNSGName'))]",
|
||||
"agentFirstAddr": 20,
|
||||
|
@ -313,10 +286,7 @@
|
|||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "[variables('azureStackDNSIP')]" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -360,32 +330,6 @@
|
|||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule2",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Outbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -404,9 +348,6 @@
|
|||
"networkSecurityGroup": {
|
||||
"id": "[variables('jumpboxNSGID')]"
|
||||
},
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[ variables('azureStackDNSIP')]" ]
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipConfig",
|
||||
|
@ -487,32 +428,6 @@
|
|||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule2",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Outbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -534,10 +449,6 @@
|
|||
"networkSecurityGroup": {
|
||||
"id": "[variables('masterNSGID')]"
|
||||
},
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[ variables('azureStackDNSIP')]" ]
|
||||
},
|
||||
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipConfigNode",
|
||||
|
@ -619,7 +530,7 @@
|
|||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"fileUris": [ "[concat(parameters('configureScriptsRootLocation'), variables('swarmScriptName'))]" ],
|
||||
"commandToExecute": "[concat('/bin/bash -c \"/bin/bash configure-swarm-azurestack.sh ', variables('clusterInstallParameters'),' ', reference(concat(variables('masterVMNamePrefix'), 'nic-', copyIndex()), '2015-05-01-preview').ipConfigurations[0].properties.privateIPAddress ,' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]"
|
||||
"commandToExecute": "[concat('/bin/bash -c \"/bin/bash configure-swarm-azurestack.sh ', variables('clusterInstallParameters'), ' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -684,32 +595,6 @@
|
|||
"priority": 230,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule2",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Outbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -731,9 +616,6 @@
|
|||
"networkSecurityGroup": {
|
||||
"id": "[variables('agentNSGID')]"
|
||||
},
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[ variables('azureStackDNSIP')]" ]
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipConfigNode",
|
||||
|
@ -815,7 +697,7 @@
|
|||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"fileUris": [ "[concat(parameters('configureScriptsRootLocation'), variables('swarmScriptName'))]" ],
|
||||
"commandToExecute": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash configure-swarm-azurestack.sh ', variables('clusterInstallParameters'),' ', reference(concat(variables('agentVMNamePrefix'), 'nic-', copyIndex()), '2015-05-01-preview').ipConfigurations[0].properties.privateIPAddress,' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]"
|
||||
"commandToExecute": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash configure-swarm-azurestack.sh ', variables('clusterInstallParameters'), ' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,12 +3,6 @@
|
|||
"contentVersion": "1.0.0.0",
|
||||
"parameters":
|
||||
{
|
||||
"linuxAdminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
"windowsAdminPassword": {
|
||||
"value": "GEN-PASSWORD"
|
||||
},
|
||||
"agentCount": {
|
||||
"value": 1
|
||||
},
|
||||
|
@ -21,8 +15,8 @@
|
|||
"masterVMSize": {
|
||||
"value": "Standard_A2"
|
||||
},
|
||||
"nameSuffix": {
|
||||
"value": "UNIQUESTRING"
|
||||
"setSSHKeysLinuxConfiguration": {
|
||||
"value": 0
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
## Configure the environment with the Add-AzureRmEnvironment cmdlt
|
||||
$endptOut = Invoke-RestMethod "$("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())/metadata/endpoints?api-version=1.0"
|
||||
$envName = "AzureStackCloud"
|
||||
Add-AzureRmEnvironment -Name ($envName) `
|
||||
-ActiveDirectoryEndpoint ($ActiveDirectoryEndpoint = $($endptOut.authentication.loginEndpoint) + "5454420b-2e38-4b9e-8b56-1712d321cf33" + "/") `
|
||||
-ActiveDirectoryServiceEndpointResourceId ($ActiveDirectoryServiceEndpointResourceId = $($endptOut.authentication.audiences[0])) `
|
||||
-ResourceManagerEndpoint ($ResourceManagerEndpoint = $("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())) `
|
||||
-GalleryEndpoint ($GalleryEndpoint = $endptOut.galleryEndpoint) `
|
||||
-GraphEndpoint ($GraphEndpoint = $endptOut.graphEndpoint) `
|
||||
-StorageEndpointSuffix ($StorageEndpointSuffix="$($env:USERDNSDOMAIN)".ToLowerInvariant()) `
|
||||
-AzureKeyVaultDnsSuffix ($AzureKeyVaultDnsSuffix="vault.$($env:USERDNSDOMAIN)".ToLowerInvariant())
|
||||
|
||||
## Authenticate a user to the environment (you will be prompted during authentication)
|
||||
$privateEnv = Get-AzureRmEnvironment $envName
|
||||
$privateAzure = Add-AzureRmAccount -Environment $privateEnv -Verbose
|
||||
Select-AzureRmProfile -Profile $privateAzure
|
||||
|
||||
## Select an existing subscription where the deployment will take place
|
||||
Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION_NAME" | Select-AzureRmSubscription
|
||||
|
||||
# Set Deployment Variables
|
||||
$myNum = "001" #Modify this per deployment
|
||||
$RGName = "myRG$myNum"
|
||||
$myLocation = "local"
|
||||
|
||||
$templateFile= "azuredeploy.json"
|
||||
$templateParameterFile= "azuredeploy.parameters.json"
|
||||
# For SSHKeys use below parameters.json. Fix the GEN-* values before proceeding to next steps
|
||||
#$templateParameterFile= "azuredeploy-sshkeys.parameters.json"
|
||||
|
||||
# Create Resource Group for Template Deployment
|
||||
New-AzureRmResourceGroup -Name $RGName -Location $myLocation
|
||||
|
||||
# Deploy Template
|
||||
New-AzureRmResourceGroupDeployment `
|
||||
-ResourceGroupName $RGName `
|
||||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
До Ширина: | Высота: | Размер: 10 KiB После Ширина: | Высота: | Размер: 10 KiB |
До Ширина: | Высота: | Размер: 35 KiB После Ширина: | Высота: | Размер: 35 KiB |
До Ширина: | Высота: | Размер: 9.8 KiB После Ширина: | Высота: | Размер: 9.8 KiB |
До Ширина: | Высота: | Размер: 50 KiB После Ширина: | Высота: | Размер: 50 KiB |
До Ширина: | Высота: | Размер: 44 KiB После Ширина: | Высота: | Размер: 44 KiB |
До Ширина: | Высота: | Размер: 37 KiB После Ширина: | Высота: | Размер: 37 KiB |
До Ширина: | Высота: | Размер: 19 KiB После Ширина: | Высота: | Размер: 19 KiB |
До Ширина: | Высота: | Размер: 22 KiB После Ширина: | Высота: | Размер: 22 KiB |
|
@ -27,7 +27,6 @@ MASTERFIRSTADDR=${3}
|
|||
AZUREUSER=${4}
|
||||
POSTINSTALLSCRIPTURI=${5}
|
||||
BASESUBNET=${6}
|
||||
PrivateIP=${7}
|
||||
VMNAME=`hostname`
|
||||
VMNUMBER=`echo $VMNAME | sed 's/.*[^0-9]\([0-9]\+\)*$/\1/'`
|
||||
VMPREFIX=`echo $VMNAME | sed 's/\(.*[^0-9]\)*[0-9]\+$/\1/'`
|
||||
|
@ -39,8 +38,6 @@ echo "vmname: $VMNAME"
|
|||
echo "VMNUMBER: $VMNUMBER, VMPREFIX: $VMPREFIX"
|
||||
echo "BASESUBNET: $BASESUBNET"
|
||||
echo "AZUREUSER: $AZUREUSER"
|
||||
echo "adding IP to /etc/hosts"
|
||||
echo "$PrivateIP $VMNAME" >>/etc/hosts
|
||||
###################
|
||||
# Common Functions
|
||||
###################
|
||||
|
@ -50,7 +47,7 @@ ensureAzureNetwork()
|
|||
# ensure the host name is resolvable
|
||||
hostResolveHealthy=1
|
||||
for i in {1..120}; do
|
||||
getent hosts $VMNAME
|
||||
host $VMNAME
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# hostname has been found continue
|
|
@ -0,0 +1,81 @@
|
|||
param (
|
||||
[Parameter(Mandatory)]
|
||||
[string]$uri,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$destination
|
||||
)
|
||||
|
||||
function DownloadISO {
|
||||
|
||||
# Local file storage location
|
||||
$localPath = "$env:SystemDrive"
|
||||
|
||||
# Log file
|
||||
$logFileName = "CSDownload.log"
|
||||
$logFilePath = "$localPath\$logFileName"
|
||||
|
||||
if(Test-Path $destination) {
|
||||
"Destination path exists. Skipping ISO download" | Tee-Object -FilePath $logFilePath -Append
|
||||
return
|
||||
}
|
||||
|
||||
$destination = Join-Path $env:SystemDrive $destination
|
||||
New-Item -Path $destination -ItemType Directory
|
||||
|
||||
$destinationFile = $null
|
||||
$result = $false
|
||||
# Download ISO
|
||||
$retries = 3
|
||||
# Stop retrying after download succeeds or all retries attempted
|
||||
while(($retries -gt 0) -and ($result -eq $false)) {
|
||||
try
|
||||
{
|
||||
"Downloading ISO from URI: $uri to destination: $destination" | Tee-Object -FilePath $logFilePath -Append
|
||||
$isoFileName = [System.IO.Path]::GetFileName($uri)
|
||||
$webClient = New-Object System.Net.WebClient
|
||||
$_date = Get-Date -Format hh:mmtt
|
||||
$destinationFile = "$destination\$isoFileName"
|
||||
$webClient.DownloadFile($uri, $destinationFile)
|
||||
$_date = Get-Date -Format hh:mmtt
|
||||
if((Test-Path $destinationFile) -eq $true) {
|
||||
"Downloading ISO file succeeded at $_date" | Tee-Object -FilePath $logFilePath -Append
|
||||
$result = $true
|
||||
}
|
||||
else {
|
||||
"Downloading ISO file failed at $_date" | Tee-Object -FilePath $logFilePath -Append
|
||||
$result = $false
|
||||
}
|
||||
} catch [Exception] {
|
||||
"Failed to download ISO. Exception: $_" | Tee-Object -FilePath $logFilePath -Append
|
||||
$retries--
|
||||
if($retries -eq 0) {
|
||||
Remove-Item $destination -Force -Confirm:0 -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Extract ISO
|
||||
if($result)
|
||||
{
|
||||
"Mount the image from $destinationFile" | Tee-Object -FilePath $logFilePath -Append
|
||||
$image = Mount-DiskImage -ImagePath $destinationFile -PassThru
|
||||
$driveLetter = ($image | Get-Volume).DriveLetter
|
||||
|
||||
"Copy files to destination directory: $destination" | Tee-Object -FilePath $logFilePath -Append
|
||||
Robocopy.exe ("{0}:" -f $driveLetter) $destination /E | Out-Null
|
||||
|
||||
"Dismount the image from $destinationFile" | Tee-Object -FilePath $logFilePath -Append
|
||||
Dismount-DiskImage -ImagePath $destinationFile
|
||||
|
||||
"Delete the temp file: $destinationFile" | Tee-Object -FilePath $logFilePath -Append
|
||||
Remove-Item -Path $destinationFile -Force
|
||||
}
|
||||
else
|
||||
{
|
||||
"Failed to download the file after exhaust retry limit" | Tee-Object -FilePath $logFilePath -Append
|
||||
Remove-Item $destination -Force -Confirm:0 -ErrorAction SilentlyContinue
|
||||
Throw "Failed to download the file after exhaust retry limit"
|
||||
}
|
||||
}
|
||||
|
||||
DownloadISO
|
Двоичные данные
exchange-2016-non-ha/ExchangeWorkload.zip
|
@ -1,265 +1,303 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"exchangeStorageSize": {
|
||||
"type": "int",
|
||||
"defaultValue": 1073741824,
|
||||
"metadata": {
|
||||
"description": "Exchange Mailbox storage size."
|
||||
}
|
||||
},
|
||||
"exchangeVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"metadata": {
|
||||
"description": "Number of Exchange VMs to deploy."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersion": {
|
||||
"compute": "2015-06-15",
|
||||
"storage": "2015-06-15",
|
||||
"network": "2015-05-01-preview"
|
||||
},
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "[concat('ip', resourceGroup().name)]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[concat('sn', resourceGroup().name)]",
|
||||
"exchangeDomainName": "[concat(resourceGroup().name, '.com')]",
|
||||
"uniqueDnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"uniqueStorageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"uniqueStorageAccountContainerName": "[concat('sc', resourceGroup().name)]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "pwd0a!8b7",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmDataDiskName": "[concat('dd', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmDataDiskSize": "15",
|
||||
"vmNicName": "[concat('nc', resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('vn', resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/dipakmsft/AzureStack-QuickStart-Templates/master/exchange-2016-non-ha/",
|
||||
"modulesExchange": "ExchangeWorkload.zip",
|
||||
"modulesUrlExchange": "[concat(variables('modulesPath'),variables('modulesExchange'))]",
|
||||
"modulesExchangeData": "ExchangeWorkload.psd1",
|
||||
"modulesUrlExchangeData": "[concat(variables('modulesPath'),variables('modulesExchangeData'))]",
|
||||
"configurationFunctionExchange": "ExchangeWorkload.ps1\\InstallAndConfigureExchange",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').storage]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[concat(variables('publicIPAddressName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "publicIPLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('uniqueDnsNameForPublicIP')]"
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"exchangeVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"metadata": {
|
||||
"description": "Number of Exchange VMs to deploy."
|
||||
}
|
||||
},
|
||||
"exchangeStorageSizeInGB": {
|
||||
"type": "int",
|
||||
"defaultValue": 10,
|
||||
"metadata": {
|
||||
"description": "Exchange Mailbox storage size in GB."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
"variables": {
|
||||
"apiVersion": {
|
||||
"compute": "2015-06-15",
|
||||
"storage": "2015-06-15",
|
||||
"network": "2015-06-15"
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "192.168.100.2" ]
|
||||
}
|
||||
}
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "[tolower(concat('ip', resourceGroup().name))]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[tolower(concat('sn', resourceGroup().name))]",
|
||||
"exchangeDomainName": "[tolower(concat(resourceGroup().name, '.com'))]",
|
||||
"uniqueDnsNameForPublicIP": "[tolower(concat('dns', resourceGroup().name))]",
|
||||
"uniqueStorageAccountName": "[tolower(concat('sa', resourceGroup().name))]",
|
||||
"uniqueStorageAccountContainerName": "[tolower(concat('sc', resourceGroup().name))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "[subscription().subscriptionId]",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmDataDiskName": "[concat('dd', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmDataDiskSize": "15",
|
||||
"vmNicName": "[tolower(concat('nc', resourceGroup().name))]",
|
||||
"virtualNetworkName": "[tolower(concat('vn', resourceGroup().name))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/exchange-2016-non-ha/",
|
||||
"modulesExchange": "ExchangeWorkload.zip",
|
||||
"modulesUrlExchange": "[concat(variables('modulesPath'),variables('modulesExchange'))]",
|
||||
"modulesExchangeData": "ExchangeWorkload.psd1",
|
||||
"modulesUrlExchangeData": "[concat(variables('modulesPath'),variables('modulesExchangeData'))]",
|
||||
"configurationFunctionExchange": "ExchangeWorkload.ps1\\InstallAndConfigureExchange",
|
||||
"nsgName": "[tolower(concat('ng', resourceGroup().name))]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"exchangeInstallerPath": "InstallerExchange",
|
||||
"exchangeISOUri": "https://download.microsoft.com/download/6/4/8/648EB83C-00F9-49B2-806D-E46033DA4AE6/ExchangeServer2016-CU1.iso",
|
||||
"modulesExchangeISODownload": "CSDownloadISO.ps1",
|
||||
"modulesUrlExchangeISODownload": "[concat(variables('modulesPath'),variables('modulesExchangeISODownload'))]"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'),copyIndex())]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').storage]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),copyIndex()))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),copyIndex(),'.vhd')]"
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[concat(variables('publicIPAddressName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "publicIPLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmDataDiskName'),copyIndex(),'.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmDataDiskName'),copyIndex())]",
|
||||
"createOption": "empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[variables('vmDataDiskSize')]",
|
||||
"lun": 0
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('uniqueDnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "extensionLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.13",
|
||||
"autoUpgradeMinorVersion": false,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlExchange')]",
|
||||
"configurationFunction": "[variables('configurationFunctionExchange')]",
|
||||
"properties": {
|
||||
"DomainName": "[variables('exchangeDomainName')]",
|
||||
"StorageSize": "[parameters('exchangeStorageSize')]",
|
||||
"VMAdminCreds": {
|
||||
"userName": "[variables('vmAdminUsername')]",
|
||||
"password": "PrivateSettingsRef:vmAdminPassword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"items": {
|
||||
"vmAdminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"DataBlobUri": "[variables('modulesUrlExchangeData')]"
|
||||
{
|
||||
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'),copyIndex())]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),copyIndex()))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),copyIndex(),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmDataDiskName'),copyIndex(),'-0','.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmDataDiskName'),copyIndex(),'-0')]",
|
||||
"createOption": "empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[variables('vmDataDiskSize')]",
|
||||
"lun": 0
|
||||
},
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmDataDiskName'),copyIndex(),'-1','.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmDataDiskName'),copyIndex(),'-1')]",
|
||||
"createOption": "empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[variables('vmDataDiskSize')]",
|
||||
"lun": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "2015-06-15",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/CustomScriptExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "customExtensionLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"fileUris": [
|
||||
"[variables('modulesUrlExchangeISODownload')]"
|
||||
],
|
||||
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file ',variables('modulesExchangeISODownload'),' -uri ',variables('exchangeISOUri'),' -destination ',variables('exchangeInstallerPath'))]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "extensionLoop",
|
||||
"count": "[parameters('exchangeVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex())]",
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex(),'/extensions/','CustomScriptExtension')]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.15",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlExchange')]",
|
||||
"configurationFunction": "[variables('configurationFunctionExchange')]",
|
||||
"properties": {
|
||||
"DomainName": "[variables('exchangeDomainName')]",
|
||||
"StorageSize": "[parameters('exchangeStorageSizeInGB')]",
|
||||
"VMAdminCreds": {
|
||||
"userName": "[variables('vmAdminUsername')]",
|
||||
"password": "PrivateSettingsRef:vmAdminPassword"
|
||||
},
|
||||
"Location": "[variables('location')]"
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"items": {
|
||||
"vmAdminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"DataBlobUri": "[variables('modulesUrlExchangeData')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"exchangeVMCount": {
|
||||
"value": 1
|
||||
},
|
||||
"exchangeStorageSize": {
|
||||
"value": "10GB"
|
||||
"exchangeStorageSizeInGB": {
|
||||
"value": 10
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,9 @@
|
|||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fexchange-2016-non-ha%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
|
||||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fexchange-2016-non-ha%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
|
||||
This template deploys Exchange 2016.
|
||||
|
||||
|
@ -12,7 +14,7 @@ This template deploys Exchange 2016.
|
|||
| Endpoint | Version | Validated |
|
||||
| ------------- |:-------------:| -----:|
|
||||
| Microsoft Azure | - | YES |
|
||||
| Microsoft Azure Stack | TP1 | YES |
|
||||
| Microsoft Azure Stack | TP2 | YES |
|
||||
|
||||
## Deployed resources
|
||||
|
||||
|
|
Двоичные данные
iostorm-vm-iops-latency/VMIOWorkload.zip
Двоичные данные
iostorm-vm-iops-latency/VMIOWorkloadController.zip
|
@ -1,367 +0,0 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.03.23",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure user to authenticate inside controller VM for AzureStack. Azure AD Application ID to authenticate inside controller VM for Azure."
|
||||
}
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Azure user password to authenticate inside controller VM for AzureStack. Azure AD Application password to authenticate inside controller VM for Azure."
|
||||
}
|
||||
},
|
||||
"tenantId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure Subscription Tenant Id."
|
||||
}
|
||||
},
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 2,
|
||||
"metadata": {
|
||||
"description": "Number of VMs to create."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersion": "2015-06-15",
|
||||
"apiVersionCRP": "2015-06-15",
|
||||
"apiVersionSRP": "2015-06-15",
|
||||
"apiVersionNRP": "2015-05-01-preview",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.1.0.0/16",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnetName": "[concat('sn', resourceGroup().name)]",
|
||||
"subnetPrefix": "10.1.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"publicIPAddressName": "[concat('ip', resourceGroup().name)]",
|
||||
"uniqueDnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"uniqueStorageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"uniqueStorageAccountContainerName": "[concat('sc', resourceGroup().name)]",
|
||||
"adResourceID": "https://azurestack.local-api/",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "pwd0a!8b7",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmIoBlockSize": "4096",
|
||||
"vmIoDuration": "600",
|
||||
"vmIoReadPercentage": "70",
|
||||
"vmIoMaxLatency": "100",
|
||||
"vmNicName": "[concat('nc', resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('vn', resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/iostorm-vm-iops-latency/",
|
||||
"moduleVMIOController": "VMIOWorkloadController.zip",
|
||||
"moduleVMIOWorkload": "VMIOWorkload.zip",
|
||||
"modulesUrlVMIOController": "[concat(variables('modulesPath'),variables('moduleVMIOController'))]",
|
||||
"modulesUrlVMIOWorkload": "[concat(variables('modulesPath'),variables('moduleVMIOWorkload'))]",
|
||||
"configurationFunctionVMIOController": "VMIOWorkloadController.ps1\\ConfigureVMIO",
|
||||
"configurationFunctionVMIOWorkload": "VMIOWorkload.ps1\\ConfigureVMIO"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionSRP')]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[variables('publicIPAddressName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('uniqueDnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "192.168.100.2" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[variables('vmNicName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'))]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionNRP')]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigprivate",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName')))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',concat(variables('vmOsDiskName'),copyIndex()),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"diagnosticsProfile": {
|
||||
"bootDiagnostics": {
|
||||
"enabled": "true",
|
||||
"storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.13",
|
||||
"autoUpgradeMinorVersion": false,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlVMIOController')]",
|
||||
"configurationFunction": "[variables('configurationFunctionVMIOController')]",
|
||||
"properties": {
|
||||
"AzureUserName": "[parameters('azureAccountUsername')]",
|
||||
"AzurePassword": "[parameters('azureAccountPassword')]",
|
||||
"AdResourceID": "[variables('adResourceID')]",
|
||||
"TenantId": "[parameters('tenantId')]",
|
||||
"VMName": "[variables('vmName')]",
|
||||
"VMCount": "[parameters('vmCount')]",
|
||||
"VMAdminUserName": "[variables('vmAdminUsername')]",
|
||||
"VMAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"VMIoMaxLatency": "[variables('vmIoMaxLatency')]",
|
||||
"AzureStorageAccount": "[variables('uniqueStorageAccountName')]",
|
||||
"AzureStorageAccessKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).key1]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/dscExtension')]",
|
||||
"apiVersion": "[variables('apiVersion')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('vmCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.13",
|
||||
"autoUpgradeMinorVersion": false,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlVMIOWorkload')]",
|
||||
"configurationFunction": "[variables('configurationFunctionVMIOWorkload')]",
|
||||
"properties": {
|
||||
"ControllerVMName": "[variables('vmName')]",
|
||||
"ControllerVMPrivateIP": "[reference(variables('vmNicName')).ipConfigurations[0].properties.privateIPAddress]",
|
||||
"VMName": "[concat(variables('vmName'),copyIndex())]",
|
||||
"VMAdminUserName": "[variables('vmAdminUsername')]",
|
||||
"VMAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"VMIoBlockSize": "[variables('vmIoBlockSize')]",
|
||||
"VMIoDuration": "[variables('vmIoDuration')]",
|
||||
"VMIoReadPercentage": "[variables('vmIoReadPercentage')]",
|
||||
"VMIoMaxLatency": "[variables('vmIoMaxLatency')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
|
||||
"contentVersion": "1.16.03.23",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"value": "<Your Azure tenant account user name>"
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"value": "<Your secured Azure tenant account password>"
|
||||
},
|
||||
"tenantId": {
|
||||
"value": "<Your secured tenant Id from Azure Subscription>"
|
||||
},
|
||||
"vmCount": {
|
||||
"value": 2
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,75 +1,97 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.03.23",
|
||||
"contentVersion": "1.16.07.29",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure user to authenticate inside controller VM for AzureStack. Azure AD Application ID to authenticate inside controller VM for Azure."
|
||||
}
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"type": "securestring",
|
||||
"metadata": {
|
||||
"description": "Azure user password to authenticate inside controller VM for AzureStack. Azure AD Application password to authenticate inside controller VM for Azure."
|
||||
}
|
||||
},
|
||||
"tenantId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "Azure Subscription Tenant Id."
|
||||
}
|
||||
},
|
||||
"vmCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 2,
|
||||
"metadata": {
|
||||
"description": "Number of VMs to create."
|
||||
"description": "Number of VMs to create and run IO simulation in determining the maximum IOPS reached without exceeding specified latency thresholds as acceptable performance limit."
|
||||
}
|
||||
},
|
||||
"vmOsSku": {
|
||||
"type": "string",
|
||||
"defaultValue": "2012-R2-Datacenter",
|
||||
"allowedValues": [
|
||||
"2012-R2-Datacenter",
|
||||
"Windows-Server-Technical-Preview"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "The Windows version for the VM."
|
||||
}
|
||||
},
|
||||
"vmDataDiskSizeInGB": {
|
||||
"type": "int",
|
||||
"defaultValue": 5,
|
||||
"metadata": {
|
||||
"description": "VM IO workload target data disk size in GB."
|
||||
}
|
||||
},
|
||||
"vmIoLatencyThresholdInMS": {
|
||||
"type": "int",
|
||||
"defaultValue": 60,
|
||||
"metadata": {
|
||||
"description": "VM IO workload latency threshold in milliseconds."
|
||||
}
|
||||
},
|
||||
"vmIoDurationInSec": {
|
||||
"type": "int",
|
||||
"defaultValue": 60,
|
||||
"metadata": {
|
||||
"description": "VM IO workload duration in seconds."
|
||||
}
|
||||
},
|
||||
"vmIoBlockSizeInBytes": {
|
||||
"type": "int",
|
||||
"defaultValue": 4096,
|
||||
"metadata": {
|
||||
"description": "VM IO workload block size in bytes."
|
||||
}
|
||||
},
|
||||
"vmIoReadPercentage": {
|
||||
"type": "int",
|
||||
"defaultValue": 90,
|
||||
"metadata": {
|
||||
"description": "VM IO workload read percentage."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersion": "2015-06-15",
|
||||
"apiVersionCRP": "2015-06-15",
|
||||
"apiVersionSRP": "2015-06-15",
|
||||
"apiVersionNRP": "2015-05-01-preview",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.1.0.0/16",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnetName": "[concat('sn', resourceGroup().name)]",
|
||||
"subnetPrefix": "10.1.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"publicIPAddressName": "[concat('ip', resourceGroup().name)]",
|
||||
"uniqueDnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"uniqueStorageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"uniqueStorageAccountContainerName": "[concat('sc', resourceGroup().name)]",
|
||||
"adResourceID": "null",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "pwd0a!8b7",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmIoBlockSize": "4096",
|
||||
"vmIoDuration": "600",
|
||||
"vmIoReadPercentage": "70",
|
||||
"vmIoMaxLatency": "50",
|
||||
"vmNicName": "[concat('nc', resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('vn', resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/iostorm-vm-iops-latency/",
|
||||
"moduleVMIOController": "VMIOWorkloadController.zip",
|
||||
"moduleVMIOWorkload": "VMIOWorkload.zip",
|
||||
"modulesUrlVMIOController": "[concat(variables('modulesPath'),variables('moduleVMIOController'))]",
|
||||
"modulesUrlVMIOWorkload": "[concat(variables('modulesPath'),variables('moduleVMIOWorkload'))]",
|
||||
"configurationFunctionVMIOController": "VMIOWorkloadController.ps1\\ConfigureVMIO",
|
||||
"configurationFunctionVMIOWorkload": "VMIOWorkload.ps1\\ConfigureVMIO"
|
||||
},
|
||||
"variables": {
|
||||
"apiVersionCRP": "2015-06-15",
|
||||
"apiVersionSRP": "2015-06-15",
|
||||
"apiVersionNRP": "2015-06-15",
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"location": "[resourceGroup().location]",
|
||||
"subnetName": "[tolower(concat('sn', resourceGroup().name))]",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"publicIPAddressName": "[tolower(concat('ip', resourceGroup().name))]",
|
||||
"uniqueDnsNameForPublicIP": "[tolower(concat('dns', resourceGroup().name))]",
|
||||
"uniqueStorageAccountName": "[tolower(concat('sa', resourceGroup().name))]",
|
||||
"uniqueStorageAccountContainerName": "[tolower(concat('sc', resourceGroup().name))]",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "[subscription().subscriptionId]",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmDataDiskName": "[concat('dd', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmNicName": "[tolower(concat('nc', resourceGroup().name))]",
|
||||
"virtualNetworkName": "[tolower(concat('vn', resourceGroup().name))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"nsgName": "[tolower(concat('ng', resourceGroup().name))]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/iostorm-vm-iops-latency/",
|
||||
"moduleVMIOController": "VMIOWorkloadController.zip",
|
||||
"moduleVMIOWorkload": "VMIOWorkload.zip",
|
||||
"modulesUrlVMIOController": "[concat(variables('modulesPath'),variables('moduleVMIOController'))]",
|
||||
"modulesUrlVMIOWorkload": "[concat(variables('modulesPath'),variables('moduleVMIOWorkload'))]",
|
||||
"configurationFunctionVMIOController": "VMIOWorkloadController.ps1\\ConfigureVMIO",
|
||||
"configurationFunctionVMIOWorkload": "VMIOWorkload.ps1\\ConfigureVMIO"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionSRP')]",
|
||||
|
@ -214,7 +236,7 @@
|
|||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"sku": "[parameters('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
|
@ -252,7 +274,8 @@
|
|||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]",
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
|
@ -267,7 +290,7 @@
|
|||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"sku": "[parameters('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
|
@ -277,7 +300,29 @@
|
|||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
}
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmDataDiskName'),copyIndex(),'-0','.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmDataDiskName'),copyIndex(),'-0')]",
|
||||
"createOption": "empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[parameters('vmDataDiskSizeInGB')]",
|
||||
"lun": 0
|
||||
},
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmDataDiskName'),copyIndex(),'-1','.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmDataDiskName'),copyIndex(),'-1')]",
|
||||
"createOption": "empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[parameters('vmDataDiskSizeInGB')]",
|
||||
"lun": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
|
@ -305,31 +350,29 @@
|
|||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.13",
|
||||
"autoUpgradeMinorVersion": false,
|
||||
"typeHandlerVersion": "2.15",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlVMIOController')]",
|
||||
"configurationFunction": "[variables('configurationFunctionVMIOController')]",
|
||||
"properties": {
|
||||
"AzureUserName": "[parameters('azureAccountUsername')]",
|
||||
"AzurePassword": "[parameters('azureAccountPassword')]",
|
||||
"AdResourceID": "[variables('adResourceID')]",
|
||||
"TenantId": "[parameters('tenantId')]",
|
||||
"VMName": "[variables('vmName')]",
|
||||
"VMCount": "[parameters('vmCount')]",
|
||||
"VMAdminUserName": "[variables('vmAdminUsername')]",
|
||||
"VMAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"VMIoMaxLatency": "[variables('vmIoMaxLatency')]",
|
||||
"AzureStorageAccount": "[variables('uniqueStorageAccountName')]",
|
||||
"AzureStorageAccessKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).key1]"
|
||||
}
|
||||
"properties": {
|
||||
"VMName": "[variables('vmName')]",
|
||||
"VMCount": "[parameters('vmCount')]",
|
||||
"VMAdminUserName": "[variables('vmAdminUsername')]",
|
||||
"VMAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"VMIoMaxLatency": "[parameters('vmIoLatencyThresholdInMS')]",
|
||||
"Location": "[variables('location')]",
|
||||
"AzureStorageAccount": "[variables('uniqueStorageAccountName')]",
|
||||
"AzureStorageAccessKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).key1]",
|
||||
"AzureStorageEndpoint": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('uniqueStorageAccountName')), variables('apiVersionSRP')).primaryEndpoints['blob']]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionCRP')]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/dscExtension')]",
|
||||
"apiVersion": "[variables('apiVersion')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
|
@ -341,8 +384,8 @@
|
|||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.13",
|
||||
"autoUpgradeMinorVersion": false,
|
||||
"typeHandlerVersion": "2.15",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlVMIOWorkload')]",
|
||||
"configurationFunction": "[variables('configurationFunctionVMIOWorkload')]",
|
||||
|
@ -352,10 +395,10 @@
|
|||
"VMName": "[concat(variables('vmName'),copyIndex())]",
|
||||
"VMAdminUserName": "[variables('vmAdminUsername')]",
|
||||
"VMAdminPassword": "[variables('vmAdminPassword')]",
|
||||
"VMIoBlockSize": "[variables('vmIoBlockSize')]",
|
||||
"VMIoDuration": "[variables('vmIoDuration')]",
|
||||
"VMIoReadPercentage": "[variables('vmIoReadPercentage')]",
|
||||
"VMIoMaxLatency": "[variables('vmIoMaxLatency')]"
|
||||
"VMIoBlockSize": "[parameters('vmIoBlockSizeInBytes')]",
|
||||
"VMIoDuration": "[parameters('vmIoDurationInSec')]",
|
||||
"VMIoReadPercentage": "[parameters('vmIoReadPercentage')]",
|
||||
"VMIoMaxLatency": "[parameters('vmIoLatencyThresholdInMS')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
|
||||
"contentVersion": "1.16.03.23",
|
||||
"contentVersion": "1.16.07.29",
|
||||
"parameters": {
|
||||
"azureAccountUsername": {
|
||||
"value": "<Your Azure account SPN user name>"
|
||||
},
|
||||
"azureAccountPassword": {
|
||||
"value": "<Your secured Azure account SPN password>"
|
||||
},
|
||||
"tenantId": {
|
||||
"value": "<Your secured tenant Id from Azure Subscription>"
|
||||
},
|
||||
"vmCount": {
|
||||
"value": 2
|
||||
"value": 5
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,5 +3,5 @@
|
|||
"description": "This template creates requested number of VMs, boot them and start IO workload simultaneously.",
|
||||
"summary": "This template creates VM iostorm and reports IOPS and latency values.",
|
||||
"githubUsername": "dipakmsft",
|
||||
"dateUpdated": "2016-03-23"
|
||||
"dateUpdated": "2016-07-29"
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
## VM IOSTORM WORKLOAD FOR AZURESTACK (LOCAL) ##
|
||||
|
||||
|
||||
<b>DESCRIPTION</b>
|
||||
|
||||
This template deploys requested number of VMs and a controller VM with public IP address in same virtual network. Controller VM synchronizes IO workload on all VMs, collects and analyse results and upload it to the storage account.
|
||||
|
||||
Please make sure to user unique resource group name for each deployment to avoid deployment failures due to name collisions of resources.
|
||||
|
||||
NOTE: There is a 90 minutes Azure time-out which you can hit if large number of VMs are deployed. To circumvent that, all these operations are done using Scheduled Task which gets created by a DSC Script Resource by a Controller VM.
|
||||
|
||||
|
||||
<b>PARAMETERS</b>
|
||||
|
||||
```PowerShell
|
||||
azureAccountUsername: "user@yourdomain.com" #[Tenant user name used for azure portal login]
|
||||
|
||||
azureAccountPassword: "abcd!!00" #[Tenant user password used for azure portal login]
|
||||
|
||||
tenantId: "1ab2c3d4-567e-8901-234f-gh0000ijk1l2" #[(Get-AzureRmSubscription).TenantId]
|
||||
|
||||
vmCount: 2 #[Number of VMs to deploy and iostorm]
|
||||
```
|
||||
|
||||
|
||||
<b>RESULTS</b>
|
||||
|
||||
VM IO-storm results file is uploaded to Unique Azure Storage Account ('uniqueStorageAccountName' parameter provided by you) as a blob with name 'VMIOResult.log.ps1.zip'
|
||||
|
||||
|
||||
<b>DEPLOY</b>
|
||||
|
||||
Login to AzureStack portal
|
||||
|
||||
Click 'New' -> 'Custom' -> 'Template Deployment'
|
||||
|
||||
Copy content in azuredeploy.azurestack.json, click 'Edit Template', paste all the content and click 'Save'
|
||||
|
||||
Fill in the parameters
|
||||
|
||||
Click 'Create New' to create a new 'Resource Group'
|
||||
|
||||
Click 'Create'
|
||||
|
||||
Wait for results to appear in 'Storage Account' of a given 'Resource Group' parameter name resource
|
|
@ -1,75 +1,45 @@
|
|||
## VM IOSTORM WORKLOAD FOR AZURE (CLOUD) ##
|
||||
## VM Iostorm Workload for Azure and AzureStack ##
|
||||
|
||||
|
||||
<b>DESCRIPTION</b>
|
||||
|
||||
This template deploys requested number of VMs and a controller VM with public IP address in same virtual network. Controller VM synchronizes IO workload on all VMs, collects and analyze results and upload it to the storage account.
|
||||
|
||||
For controller VM to upload results to Azure Storage Account, Azure SPN needs to be configured using instructions given below. (This is required especially for accounts with Multi-Factor authentication enabled by the system admins.)
|
||||
This template deploys requested number of VMs and a controller VM with public IP address in same virtual network. Controller VM synchronizes IO workload on all VMs, collects and analyse results and upload it to the storage account.
|
||||
|
||||
Please make sure to user unique resource group name for each deployment to avoid deployment failures due to name collisions of resources.
|
||||
|
||||
NOTE: There is a 90 minutes Azure time-out which you can hit if large number of VMs are deployed. To circumvent that, all these operations are done using Scheduled Task which gets created by a DSC Script Resource by a Controller VM.
|
||||
NOTE: There is a 90 minutes time-out for DSC execution, which can cause template deployment to fail if large number of VMs are deployed or if longer execution time is provided to run iostorm test. To circumvent that, all these operations are done using Scheduled Task which gets created by a DSC Script Resource by a Controller VM.
|
||||
|
||||
|
||||
<b>PARAMETERS</b>
|
||||
```PowerShell
|
||||
azureAccountUsername: "1ab2c3d4-56e7-8901-f2g3-45hi67890123" #[As per Azure SPN Configuration instructions given below, use $azureAdApp.ApplicationId]
|
||||
|
||||
azureAccountPassword: "azureadpwd123" #[As per Azure SPN Configuration instructions given below, use $azureAdPassword]
|
||||
|
||||
tenantId:"72f988bf-86f1-41af-91ab-2d7cd011db47" #[(Get-AzureRmSubscription).TenantId]
|
||||
|
||||
vmCount: 2 #[Number of VMs to deploy and iostorm]
|
||||
vmCount: 10 #[Number of VMs to deploy and iostorm]
|
||||
```
|
||||
|
||||
<b>RESULTS</b>
|
||||
|
||||
VM iostorm results file is uploaded to Unique Azure Storage Account ('uniqueStorageAccountName' parameter provided by you) as a blob with name 'VMIOResult.log.ps1.zip'
|
||||
VM iostorm results are published inside Azure Storage Account ('uniqueStorageAccountName' variable provided by you) as a table with name 'VMIoResults'
|
||||
|
||||
|
||||
<b>DEPLOY</b>
|
||||
|
||||
Login to AzureStack portal
|
||||
|
||||
Click 'New' -> 'Custom' -> 'Template Deployment'
|
||||
|
||||
Copy content in azuredeploy.json, click 'Edit Template', paste all the content and click 'Save'
|
||||
|
||||
Fill in the parameters
|
||||
|
||||
Click 'Create New' to create a new 'Resource Group'
|
||||
|
||||
Click 'Create'
|
||||
|
||||
Wait for results to appear in a 'Azure Storage Account' of a given 'Resource Group' resource
|
||||
|
||||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fiostorm-vm-iops-latency%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fiostorm-vm-iops-latency%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
|
||||
|
||||
<b>AZURE SPN CONFIGURATION</b>
|
||||
```PowerShell
|
||||
New-AzureRmADApplication -Password <any string to use as a password> `
|
||||
-DisplayName <Any String Name> `
|
||||
-IdentifierUris https://<UseAnyUniqueName e.g. serviceprinciplenm> `
|
||||
-HomePage <same as IdentifierUris>
|
||||
```
|
||||
<i>Use ApplicationId returned by above cmdlet</i>
|
||||
```PowerShell
|
||||
New-AzureRmADServicePrincipal -ApplicationId <ApplicationId>
|
||||
|
||||
New-AzureRmRoleAssignment -RoleDefinitionName Owner -ServicePrincipalName "https://<same as IdentifierUris>"
|
||||
```
|
||||
|
||||
|
||||
<b>SAMPLE AZURE SPN CONFIGURATION COMMANDS</b>
|
||||
```PowerShell
|
||||
$azureSubscriptionId = "<Your Azure subscription id (Get-AzureSubscription).SubscriptionId>"
|
||||
|
||||
$azureAdIdUri = "https://azureadiduri"
|
||||
|
||||
$azureAdPassword = "azureadpwd123"
|
||||
|
||||
$azureAdDisplayName = "azureaddisplayname"
|
||||
|
||||
Add-AzureRmAccount
|
||||
|
||||
Select-AzureRmSubscription -SubscriptionID $azureSubscriptionId
|
||||
|
||||
$azureAdApp = New-AzureRmADApplication -Password $azureAdPassword `
|
||||
-DisplayName $azureAdDisplayName `
|
||||
-IdentifierUris $azureAdIdUri `
|
||||
-HomePage $azureAdIdUri
|
||||
|
||||
New-AzureRmADServicePrincipal -ApplicationId $azureAdApp.ApplicationId
|
||||
|
||||
New-AzureRmRoleAssignment -RoleDefinitionName Owner -ServicePrincipalName $azureAdIdUri
|
||||
```
|
|
@ -0,0 +1,82 @@
|
|||
param (
|
||||
[Parameter(Mandatory)]
|
||||
[string]$uri,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$destination
|
||||
)
|
||||
|
||||
function DownloadISO {
|
||||
|
||||
# Local file storage location
|
||||
$localPath = "$env:SystemDrive"
|
||||
|
||||
# Log file
|
||||
$logFileName = "CSDownload.log"
|
||||
$logFilePath = "$localPath\$logFileName"
|
||||
|
||||
if(Test-Path $destination) {
|
||||
"Destination path exists. Skipping ISO download" | Tee-Object -FilePath $logFilePath -Append
|
||||
return
|
||||
}
|
||||
|
||||
$destination = Join-Path $env:SystemDrive $destination
|
||||
New-Item -Path $destination -ItemType Directory
|
||||
|
||||
$destinationFile = $null
|
||||
$result = $false
|
||||
# Download ISO
|
||||
$retries = 3
|
||||
# Stop retrying after download succeeds or all retries attempted
|
||||
while(($retries -gt 0) -and ($result -eq $false)) {
|
||||
try
|
||||
{
|
||||
"Downloading URI: $uri ($sizeInBytes bytes) to path: $destination" | Tee-Object -FilePath $logFilePath -Append
|
||||
$isoFileName = [System.IO.Path]::GetFileName($uri)
|
||||
$webClient = New-Object System.Net.WebClient
|
||||
$_date = Get-Date -Format hh:mmtt
|
||||
$destinationFile = "$destination\$isoFileName"
|
||||
$webClient.DownloadFile($uri, $destinationFile)
|
||||
$_date = Get-Date -Format hh:mmtt
|
||||
if((Test-Path $destinationFile) -eq $true) {
|
||||
"Downloading ISO file succeeded at $_date" | Tee-Object -FilePath $logFilePath -Append
|
||||
$result = $true
|
||||
}
|
||||
else {
|
||||
"Downloading ISO file failed at $_date" | Tee-Object -FilePath $logFilePath -Append
|
||||
$result = $false
|
||||
}
|
||||
} catch [Exception] {
|
||||
"Failed to download ISO. Exception: $_" | Tee-Object -FilePath $logFilePath -Append
|
||||
$retries--
|
||||
if($retries -eq 0) {
|
||||
Remove-Item $destination -Force -Confirm:0 -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Extract ISO
|
||||
if($result)
|
||||
{
|
||||
"Mount the image from $destinationFile" | Tee-Object -FilePath $logFilePath -Append
|
||||
$image = Mount-DiskImage -ImagePath $destinationFile -PassThru
|
||||
$driveLetter = ($image | Get-Volume).DriveLetter
|
||||
|
||||
"Copy files to destination directory: $destination" | Tee-Object -FilePath $logFilePath -Append
|
||||
Robocopy.exe ("{0}:" -f $driveLetter) $destination /E | Out-Null
|
||||
|
||||
"Dismount the image from $destinationFile" | Tee-Object -FilePath $logFilePath -Append
|
||||
Dismount-DiskImage -ImagePath $destinationFile
|
||||
|
||||
"Delete the temp file: $destinationFile" | Tee-Object -FilePath $logFilePath -Append
|
||||
Remove-Item -Path $destinationFile -Force
|
||||
}
|
||||
else
|
||||
{
|
||||
"Failed to download the file after exhaust retry limit" | Tee-Object -FilePath $logFilePath -Append
|
||||
Remove-Item $destination -Force -Confirm:0 -ErrorAction SilentlyContinue
|
||||
Throw "Failed to download the file after exhaust retry limit"
|
||||
}
|
||||
}
|
||||
|
||||
DownloadISO
|
Двоичные данные
jetstress-2013-exchange-loadtest/JetstressWorkload.zip
|
@ -1,333 +1,362 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"jetstressVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"metadata": {
|
||||
"description": "Number of VMs to deploy and run jetstress (Exchange) load test."
|
||||
}
|
||||
},
|
||||
"testExecutionTimeInMinutes": {
|
||||
"type": "string",
|
||||
"defaultValue": "1H00M0S",
|
||||
"metadata": {
|
||||
"description": "Duration to run jetstress load test."
|
||||
}
|
||||
},
|
||||
"numberOfThreads": {
|
||||
"type": "string",
|
||||
"defaultValue": "AutoSeek",
|
||||
"allowedValues": [
|
||||
"AutoSeek",
|
||||
"1 thread",
|
||||
"2 threads",
|
||||
"4 threads",
|
||||
"8 threads",
|
||||
"16 threads",
|
||||
"32 threads"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Jetstress can autoseek or have fixed number of threads to run load test"
|
||||
}
|
||||
},
|
||||
"testType": {
|
||||
"type": "string",
|
||||
"defaultValue": "DiskSubsystemThroughput",
|
||||
"allowedValues": [
|
||||
"DiskSubsystemThroughput",
|
||||
"ExchangeMailboxProfile"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Jetstress load test type - 1. Disk Subsystem Throughput (Recommended) 2. Exchange Mailbox Profile"
|
||||
}
|
||||
},
|
||||
"storageDiskCapacityPercentage": {
|
||||
"type": "int",
|
||||
"defaultValue": 80,
|
||||
"metadata": {
|
||||
"description": "Storage Capacity % to use for Disk Subsystem Throughput test"
|
||||
}
|
||||
},
|
||||
"iopsCapacityPercentage": {
|
||||
"type": "int",
|
||||
"defaultValue": 80,
|
||||
"metadata": {
|
||||
"description": "IOPS Capacity % to use for Disk Subsystem Throughput test"
|
||||
}
|
||||
},
|
||||
"exchangeMailboxCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 10,
|
||||
"metadata": {
|
||||
"description": "Mailbox count to use for Exchange Mailbox Profile test"
|
||||
}
|
||||
},
|
||||
"exchangeIopsPerMailbox": {
|
||||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"metadata": {
|
||||
"description": "IOPS per Mailbox to use for Exchange Mailbox Profile test"
|
||||
}
|
||||
},
|
||||
"exchangeMailboxSizeInMB": {
|
||||
"type": "int",
|
||||
"defaultValue": 200,
|
||||
"metadata": {
|
||||
"description": "Mailbox size in MBs to use for Exchange Mailbox Profile test"
|
||||
}
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.16.8.3",
|
||||
"parameters": {
|
||||
"jetstressVMCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"metadata": {
|
||||
"description": "Number of VMs to deploy and run Jetstress (Exchange) load test."
|
||||
}
|
||||
},
|
||||
"testExecutionTimeInMinutes": {
|
||||
"type": "int",
|
||||
"defaultValue": 60,
|
||||
"metadata": {
|
||||
"description": "Duration to run Jetstress load test."
|
||||
}
|
||||
},
|
||||
"numberOfThreads": {
|
||||
"type": "string",
|
||||
"defaultValue": "AutoSeek",
|
||||
"allowedValues": [
|
||||
"AutoSeek",
|
||||
"1 thread",
|
||||
"2 threads",
|
||||
"4 threads",
|
||||
"8 threads",
|
||||
"16 threads",
|
||||
"32 threads"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Jetstress can autoseek or have fixed number of threads to run load test"
|
||||
}
|
||||
},
|
||||
"testType": {
|
||||
"type": "string",
|
||||
"defaultValue": "DiskSubsystemThroughput",
|
||||
"allowedValues": [
|
||||
"DiskSubsystemThroughput",
|
||||
"ExchangeMailboxProfile"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Jetstress load test type - 1. Disk Subsystem Throughput (Recommended) 2. Exchange Mailbox Profile"
|
||||
}
|
||||
},
|
||||
"storageDiskCapacityPercentage": {
|
||||
"type": "int",
|
||||
"defaultValue": 80,
|
||||
"metadata": {
|
||||
"description": "Storage Capacity % to use for Disk Subsystem Throughput test"
|
||||
}
|
||||
},
|
||||
"iopsCapacityPercentage": {
|
||||
"type": "int",
|
||||
"defaultValue": 80,
|
||||
"metadata": {
|
||||
"description": "IOPS Capacity % to use for Disk Subsystem Throughput test"
|
||||
}
|
||||
},
|
||||
"exchangeMailboxCount": {
|
||||
"type": "int",
|
||||
"defaultValue": 10,
|
||||
"metadata": {
|
||||
"description": "Mailbox count to use for Exchange Mailbox Profile test"
|
||||
}
|
||||
},
|
||||
"exchangeIopsPerMailbox": {
|
||||
"type": "int",
|
||||
"defaultValue": 1,
|
||||
"metadata": {
|
||||
"description": "IOPS per Mailbox to use for Exchange Mailbox Profile test"
|
||||
}
|
||||
},
|
||||
"exchangeMailboxSizeInMB": {
|
||||
"type": "int",
|
||||
"defaultValue": 200,
|
||||
"metadata": {
|
||||
"description": "Mailbox size in MBs to use for Exchange Mailbox Profile test"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersion": {
|
||||
"compute": "2015-06-15",
|
||||
"storage": "2015-06-15",
|
||||
"network": "2015-05-01-preview"
|
||||
},
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "[tolower(concat('ip', resourceGroup().name))]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[concat('sn', resourceGroup().name)]",
|
||||
"uniqueDnsNameForPublicIP": "[tolower(concat('dns', resourceGroup().name))]",
|
||||
"uniqueStorageAccountName": "[tolower(concat('sa', resourceGroup().name))]",
|
||||
"uniqueStorageAccountContainerName": "[tolower(concat('sc', resourceGroup().name))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "[subscription().subscriptionId]",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmDatabaseDiskName": "[concat('db', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmDatabaseDiskSizeInGB": "10",
|
||||
"vmNicName": "[tolower(concat('nc', resourceGroup().name))]",
|
||||
"virtualNetworkName": "[tolower(concat('vn', resourceGroup().name))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[tolower(concat(variables('vnetID'),'/subnets/',variables('subnetName')))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/jetstress-2013-exchange-loadtest/",
|
||||
"modulesJetstress": "JetstressWorkload.zip",
|
||||
"modulesUrlJetstress": "[concat(variables('modulesPath'),variables('modulesJetstress'))]",
|
||||
"configurationFunctionJetstress": "JetstressWorkload.ps1\\InstallAndConfigureJetstress",
|
||||
"nsgName": "[tolower(concat('ng', resourceGroup().name))]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
|
||||
"exchangeInstallerPath": "InstallerExchange",
|
||||
"exchangeISOUri": "https://download.microsoft.com/download/6/4/8/648EB83C-00F9-49B2-806D-E46033DA4AE6/ExchangeServer2016-CU1.iso",
|
||||
"modulesExchangeISODownload": "CSDownloadISO.ps1",
|
||||
"modulesUrlExchangeISODownload": "[concat(variables('modulesPath'),variables('modulesExchangeISODownload'))]"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').storage]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[concat(variables('publicIPAddressName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "publicIPLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[concat(variables('uniqueDnsNameForPublicIP'),copyIndex())]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"apiVersion": {
|
||||
"compute": "2015-06-15",
|
||||
"storage": "2015-06-15",
|
||||
"network": "2015-05-01-preview"
|
||||
},
|
||||
"imagePublisher": "MicrosoftWindowsServer",
|
||||
"imageOffer": "WindowsServer",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"storageAccountType": "Standard_LRS",
|
||||
"publicIPAddressName": "[concat('ip', resourceGroup().name)]",
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"subnetPrefix": "10.0.0.0/24",
|
||||
"subnetName": "[concat('sn', resourceGroup().name)]",
|
||||
"uniqueDnsNameForPublicIP": "[concat('dns', resourceGroup().name)]",
|
||||
"uniqueStorageAccountName": "[concat('sa', resourceGroup().name)]",
|
||||
"uniqueStorageAccountContainerName": "[concat('sc', resourceGroup().name)]",
|
||||
"location": "[resourceGroup().location]",
|
||||
"vmOsSku": "2012-R2-Datacenter",
|
||||
"vmAdminUsername": "vmadministrator",
|
||||
"vmAdminPassword": "pwd0a!8b7",
|
||||
"vmName": "[concat('vm', resourceGroup().name)]",
|
||||
"vmOsDiskName": "[concat('od', resourceGroup().name)]",
|
||||
"vmDatabaseDiskName": "[concat('db', resourceGroup().name)]",
|
||||
"vmSize": "Standard_A2",
|
||||
"vmDatabaseDiskSizeInGB": "10",
|
||||
"vmNicName": "[concat('nc', resourceGroup().name)]",
|
||||
"virtualNetworkName": "[concat('vn', resourceGroup().name)]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"modulesPath": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/jetstress-2013-exchange-loadtest/",
|
||||
"modulesJetstress": "JetstressWorkload.zip",
|
||||
"modulesUrlJetstress": "[concat(variables('modulesPath'),variables('modulesJetstress'))]",
|
||||
"configurationFunctionJetstress": "JetstressWorkload.ps1\\InstallAndConfigureJetstress",
|
||||
"nsgName": "[concat('ng', resourceGroup().name)]",
|
||||
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]"
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').storage]",
|
||||
"type": "Microsoft.Storage/storageAccounts",
|
||||
"name": "[tolower(variables('uniqueStorageAccountName'))]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"accountType": "[variables('storageAccountType')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/publicIPAddresses",
|
||||
"name": "[concat(variables('publicIPAddressName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "publicIPLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"properties": {
|
||||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
|
||||
"dnsSettings": {
|
||||
"domainNameLabel": "[variables('uniqueDnsNameForPublicIP')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkSecurityGroups",
|
||||
"name": "[variables('nsgName')]",
|
||||
"location": "[variables('location')]",
|
||||
"properties": {
|
||||
"securityRules": [
|
||||
{
|
||||
"name": "nsgsrule",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "192.168.100.2" ]
|
||||
}
|
||||
}
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/virtualNetworks",
|
||||
"name": "[variables('virtualNetworkName')]",
|
||||
"location": "[variables('location')]",
|
||||
"dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ],
|
||||
"properties": {
|
||||
"addressSpace": {
|
||||
"addressPrefixes": [
|
||||
"[variables('addressPrefix')]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'),copyIndex())]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"subnets": [
|
||||
{
|
||||
"name": "[variables('subnetName')]",
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),copyIndex()))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"addressPrefix": "[variables('subnetPrefix')]",
|
||||
"networkSecurityGroup": {
|
||||
"id": "[variables('nsgID')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').network]",
|
||||
"type": "Microsoft.Network/networkInterfaces",
|
||||
"name": "[concat(variables('vmNicName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "nicLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Network/publicIPAddresses/',variables('publicIPAddressName'),copyIndex())]",
|
||||
"[concat('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]"
|
||||
],
|
||||
"properties": {
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipconfigpublic",
|
||||
"properties": {
|
||||
"privateIPAllocationMethod": "Dynamic",
|
||||
"publicIPAddress": {
|
||||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(variables('publicIPAddressName'),copyIndex()))]"
|
||||
},
|
||||
"subnet": {
|
||||
"id": "[variables('subnetRef')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "vmLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Storage/storageAccounts/',variables('uniqueStorageAccountName'))]",
|
||||
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNicName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"hardwareProfile": {
|
||||
"vmSize": "[variables('vmSize')]"
|
||||
},
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),copyIndex(),'.vhd')]"
|
||||
},
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmDatabaseDiskName'),copyIndex(),'.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmDatabaseDiskName'),copyIndex())]",
|
||||
"createOption": "empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[variables('vmDatabaseDiskSizeInGB')]",
|
||||
"lun": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"osProfile": {
|
||||
"computerName": "[variables('vmName')]",
|
||||
"adminUsername": "[variables('vmAdminUsername')]",
|
||||
"adminPassword": "[variables('vmAdminPassword')]"
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "extensionLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
"storageProfile": {
|
||||
"imageReference": {
|
||||
"publisher": "[variables('imagePublisher')]",
|
||||
"offer": "[variables('imageOffer')]",
|
||||
"sku": "[variables('vmOsSku')]",
|
||||
"version": "latest"
|
||||
},
|
||||
"osDisk": {
|
||||
"name": "osdisk",
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmOsDiskName'),copyIndex(),'.vhd')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.13",
|
||||
"autoUpgradeMinorVersion": false,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlJetstress')]",
|
||||
"configurationFunction": "[variables('configurationFunctionJetstress')]",
|
||||
"properties": {
|
||||
"ExecutionTime": "[parameters('testExecutionTimeInMinutes')]",
|
||||
"AutoSeek": "[parameters('numberOfThreads')]",
|
||||
"ThreadCount": "[parameters('numberOfThreads')]",
|
||||
"TestType": "[parameters('testType')]",
|
||||
"StorageCapacityPercentage": "[parameters('storageDiskCapacityPercentage')]",
|
||||
"IopsCapacityPercentage": "[parameters('iopsCapacityPercentage')]",
|
||||
"MailboxCount": "[parameters('exchangeMailboxCount')]",
|
||||
"IopsPerMailbox": "[parameters('exchangeIopsPerMailbox')]",
|
||||
"MailboxSizeinMB": "[parameters('exchangeMailboxSizeInMB')]",
|
||||
"VMAdminCreds": {
|
||||
"userName": "[variables('vmAdminUsername')]",
|
||||
"password": "PrivateSettingsRef:vmAdminPassword"
|
||||
},
|
||||
"StorageAccountName": "[variables('uniqueStorageAccountName')]",
|
||||
"StorageAccountKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), '2015-05-01-preview').key1]",
|
||||
"StorageEndpoint": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('uniqueStorageAccountName')), variables('apiVersion').storage).primaryEndpoints['blob']]"
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"items": {
|
||||
"vmAdminPassword": "[variables('vmAdminPassword')]"
|
||||
}
|
||||
}
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage"
|
||||
},
|
||||
"dataDisks": [
|
||||
{
|
||||
"vhd": {
|
||||
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('uniqueStorageAccountContainerName'),'/',variables('vmDatabaseDiskName'),copyIndex(),'.vhd')]"
|
||||
},
|
||||
"name": "[concat(variables('vmDatabaseDiskName'),copyIndex())]",
|
||||
"createOption": "empty",
|
||||
"caching": "None",
|
||||
"diskSizeGB": "[variables('vmDatabaseDiskSizeInGB')]",
|
||||
"lun": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('vmNicName'),copyIndex()))]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/CustomScriptExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "customExtensionLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex())]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Compute",
|
||||
"type": "CustomScriptExtension",
|
||||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"fileUris": [
|
||||
"[variables('modulesUrlExchangeISODownload')]"
|
||||
],
|
||||
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file ',variables('modulesExchangeISODownload'),' -uri ',variables('exchangeISOUri'),' -destination ',variables('exchangeInstallerPath'))]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "[variables('apiVersion').compute]",
|
||||
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||
"name": "[concat(variables('vmName'),copyIndex(),'/dscExtension')]",
|
||||
"location": "[variables('location')]",
|
||||
"copy": {
|
||||
"name": "extensionLoop",
|
||||
"count": "[parameters('jetstressVMCount')]"
|
||||
},
|
||||
"dependsOn": [
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex())]",
|
||||
"[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex(),'/extensions/','CustomScriptExtension')]"
|
||||
],
|
||||
"properties": {
|
||||
"publisher": "Microsoft.Powershell",
|
||||
"type": "DSC",
|
||||
"typeHandlerVersion": "2.15",
|
||||
"autoUpgradeMinorVersion": true,
|
||||
"settings": {
|
||||
"modulesUrl": "[variables('modulesUrlJetstress')]",
|
||||
"configurationFunction": "[variables('configurationFunctionJetstress')]",
|
||||
"properties": {
|
||||
"ExecutionTime": "[parameters('testExecutionTimeInMinutes')]",
|
||||
"AutoSeek": "[parameters('numberOfThreads')]",
|
||||
"ThreadCount": "[parameters('numberOfThreads')]",
|
||||
"TestType": "[parameters('testType')]",
|
||||
"StorageCapacityPercentage": "[parameters('storageDiskCapacityPercentage')]",
|
||||
"IopsCapacityPercentage": "[parameters('iopsCapacityPercentage')]",
|
||||
"MailboxCount": "[parameters('exchangeMailboxCount')]",
|
||||
"IopsPerMailbox": "[parameters('exchangeIopsPerMailbox')]",
|
||||
"MailboxSizeinMB": "[parameters('exchangeMailboxSizeInMB')]",
|
||||
"Location": "[variables('location')]",
|
||||
"VMName": "[concat(variables('vmName'),copyIndex())]",
|
||||
"VMAdminCreds": {
|
||||
"userName": "[variables('vmAdminUsername')]",
|
||||
"password": "PrivateSettingsRef:vmAdminPassword"
|
||||
},
|
||||
"StorageAccountName": "[variables('uniqueStorageAccountName')]",
|
||||
"StorageAccountKey": "[listKeys(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStorageAccountName')), '2015-05-01-preview').key1]",
|
||||
"StorageEndpoint": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('uniqueStorageAccountName')), variables('apiVersion').storage).primaryEndpoints['blob']]"
|
||||
}
|
||||
},
|
||||
"protectedSettings": {
|
||||
"items": {
|
||||
"vmAdminPassword": "[variables('vmAdminPassword')]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"contentVersion": "1.16.8.3",
|
||||
"parameters": {
|
||||
"jetstressVMCount": {
|
||||
"value": "1"
|
||||
"value": 4
|
||||
},
|
||||
"testExecutionTimeInMinutes": {
|
||||
"value": "60"
|
||||
"value": 60
|
||||
},
|
||||
"numberOfThreads": {
|
||||
"value": "AutoSeek"
|
||||
|
@ -15,19 +15,19 @@
|
|||
"value": "DiskSubsystemThroughput"
|
||||
},
|
||||
"storageDiskCapacityPercentage": {
|
||||
"value": "80"
|
||||
"value": 80
|
||||
},
|
||||
"iopsCapacityPercentage": {
|
||||
"value": "80"
|
||||
"value": 80
|
||||
},
|
||||
"exchangeMailboxCount": {
|
||||
"value": "10"
|
||||
"value": 10
|
||||
},
|
||||
"exchangeIopsPerMailbox": {
|
||||
"value": "1"
|
||||
"value": 1
|
||||
},
|
||||
"exchangeMailboxSizeInMB": {
|
||||
"value": "200"
|
||||
"value": 200
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,6 +4,9 @@
|
|||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fjetstress-2013-exchange-loadtest%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzureStack-QuickStart-Templates%2Fmaster%2Fjetstress-2013-exchange-loadtest%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
|
||||
This template deploys a Jetstress workload for Exchange 2016. The Jetstress workload simulates Exchange database and find out IOPS supported by a given storage subsystem.
|
||||
|
||||
|
@ -15,8 +18,8 @@ NOTE: There is a 90 minutes Azure time-out which you can hit if large number of
|
|||
|
||||
| Endpoint | Version | Validated |
|
||||
| ------------- |:-------------:| -----:|
|
||||
| Microsoft Azure | - | no |
|
||||
| Microsoft Azure Stack | TP1 | no |
|
||||
| Microsoft Azure | - | yes |
|
||||
| Microsoft Azure Stack | TP2 | yes |
|
||||
|
||||
|
||||
## Deployed resources
|
||||
|
|
|
@ -5,15 +5,15 @@ This Microsoft Azure stack template create Mesos cluster with Marathon/Chronos f
|
|||
|
||||
Once your cluster has been created you will have a resource group containing 3 parts:
|
||||
|
||||
1. a set of 1,3,5 masters in a master specific availability set. Each master's SSH can be accessed via the public dns address at ports 2200..2204
|
||||
1. a set of 1,3,5 masters nodes. Each master's SSH can be accessed via the public dns address at ports 2200..2204
|
||||
|
||||
2. a set of agents behind in an agent specific availability set. The agent VMs must be accessed through the master, or jumpbox
|
||||
2. a set of agents node. The agent VMs must be accessed through the master, or jumpbox
|
||||
|
||||
3. a windows jumpbox
|
||||
|
||||
The following image is an example of a cluster with 1 jumpbox, 3 masters, and 3 agents:
|
||||
|
||||
![Image of Mesos cluster on azure Stack](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/mesos.png)
|
||||
![Image of Mesos cluster on azure Stack](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/mesos.png)
|
||||
|
||||
You can see the following parts:
|
||||
|
||||
|
@ -26,22 +26,15 @@ All VMs are on the same private subnet, 10.0.0.0/18, and fully accessible to eac
|
|||
|
||||
## Prerequisites
|
||||
|
||||
Follow the below links to create an Ubuntu Image and upload the same to Azure Stack's Platform Image Repository
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-ubuntu/
|
||||
Follow the below links to create/download an Ubuntu 14.04 LTS Image and upload the same to Azure Stack's Platform Image Repository(PIR)
|
||||
1. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-linux/
|
||||
2. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-add-image-pir/
|
||||
Note: please use the default values for linuxPublisher,linuxOffer,linuxSku,linuxVersion found in azuredeploy.json while creating the manifest.json in PIR
|
||||
|
||||
## Deployment steps
|
||||
=> Deploy to azurestack, using custom deployment in azurestack portal.
|
||||
=> or use DeployMesos.ps1 to deploy to azurestack via powershell.
|
||||
|
||||
## Template Parameters
|
||||
When you launch the installation of the cluster, you need to specify the following parameters:
|
||||
* `adminPassword`: self-explanatory
|
||||
* `agentCount`: the number of Mesos Agents that you want to create in the cluster. You are allowed to create 1 to 100 agents
|
||||
* `masterCount`: Number of Masters. Currently the template supports 3 configurations: 1, 3 and 5 Masters cluster configuration.
|
||||
* `agentVMSize`: The type of VM that you want to use for each node in the cluster. The default size is D1 (1 core 3.5GB RAM) but you can change that if you expect to run workloads that require more RAM or CPU resources.
|
||||
* Not SUPPORTED yet:`sshRSAPublicKey`: Configure all linux machines with the SSH rsa public key string. Use 'disabled' to not configure access with SSH rsa public key.
|
||||
|
||||
## Usage
|
||||
|
||||
This walk through is based the wonderful digital ocean tutorial: https://www.digitalocean.com/community/tutorials/how-to-configure-a-production-ready-mesosphere-cluster-on-ubuntu-14-04
|
||||
|
@ -51,36 +44,30 @@ This walk through is based the wonderful digital ocean tutorial: https://www.dig
|
|||
|
||||
2. then click browse all, followed by "resource groups", and choose your resource group
|
||||
|
||||
![Image of resource groups in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/portal-resourcegroups.png)
|
||||
![Image of resource groups in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/portal-resourcegroups.png)
|
||||
|
||||
3. then expand your resources, and copy the dns names of your jumpbox (if chosen), and your NAT public ip addresses.
|
||||
|
||||
![Image of public ip addresses in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/portal-publicipaddresses.png)
|
||||
![Image of public ip addresses in portal](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/portal-publicipaddresses.png)
|
||||
|
||||
2. Connect to your cluster
|
||||
1. linux jumpbox - start a VNC to the jumpbox using instructions https://github.com/anhowe/ubuntu-devbox. The jumpbox takes an hour to configure. If the desktop is not ready, you can tail /var/log/azure/cluster-bootstrap.log to watch installation.
|
||||
2. windows jumpbox - remote desktop to the windows jumpbox
|
||||
3. no jumpbox - SSH to port 2200 on your NAT creating a tunnel to port 5050 and port 8080. Then use the browser of your desktop to browse these ports.
|
||||
2. Connect to your windows jumpbox - remote desktop to the windows jumpbox
|
||||
|
||||
3. browse to the Mesos UI http://master0:5050
|
||||
1. linux jumpbox - in top right corner choose Applications->Internet->Chrome and browse to http://master0:5050
|
||||
2. windows jumpbox - open browser and browse to http://master0:5050
|
||||
3. no jumpbox - browse to http://localhost:5050
|
||||
3. browse to the Mesos UI on the windows jumpbox - open browser , the master URL is set as default page
|
||||
|
||||
4. Browse Mesos:
|
||||
1. scroll down the page and notice your resources of CPU and memory. These are your agents
|
||||
|
||||
![Image of Mesos cluster on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/mesos-webui.png)
|
||||
![Image of Mesos cluster on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/mesos-webui.png)
|
||||
|
||||
2. On top of page, click frameworks and notice your Marathon and Chronos frameworks
|
||||
|
||||
![Image of Mesos cluster frameworks on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/mesos-frameworks.png)
|
||||
![Image of Mesos cluster frameworks on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/mesos-frameworks.png)
|
||||
|
||||
3. On top of page, click agents and you can see your agents. On windows or linux jumpbox you can also drill down into the slave and see its logs.
|
||||
3. On top of page, click agents and you can see your agents. On windows jumpbox you can also drill down into the slave and see its logs.
|
||||
|
||||
![Image of Mesos agents on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/mesos-agents.png)
|
||||
![Image of Mesos agents on azure](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/mesos-agents.png)
|
||||
|
||||
5. browse and explore Marathon UI http://master0:8080 (or if using tunnel http://localhost:8080 )
|
||||
5. browse and explore Marathon UI http://<MasterhostName>:8080 (or if using tunnel http://localhost:8080 )
|
||||
|
||||
6. start a long running job in Marathon
|
||||
1. click "+New App"
|
||||
|
@ -88,25 +75,25 @@ This walk through is based the wonderful digital ocean tutorial: https://www.dig
|
|||
3. type "/bin/bash -c "for i in {1..5}; do echo MyFirstApp $i; sleep 1; done" for the command
|
||||
4. scroll to bottom and click create
|
||||
|
||||
![Image of Marathon new app dialog](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/marathon-newapp.png)
|
||||
![Image of Marathon new app dialog](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/marathon-newapp.png)
|
||||
|
||||
7. you will notice the new app change state from not running to running
|
||||
|
||||
![Image of the new application status](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/marathon-newapp-status.png)
|
||||
![Image of the new application status](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/marathon-newapp-status.png)
|
||||
|
||||
8. browse back to Mesos http://master0:5050. You will notice the running tasks and the completed tasks. Click on the host of the completed tasks and also look at the sandbox.
|
||||
8. browse back to Mesos http://<MasterHostname>:5050. You will notice the running tasks and the completed tasks. Click on the host of the completed tasks and also look at the sandbox.
|
||||
|
||||
![Image of Mesos completed tasks](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/mesos-completed-tasks.png)
|
||||
![Image of Mesos completed tasks](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/mesos-completed-tasks.png)
|
||||
|
||||
9. All nodes are running docker, so to run a docker app browse back to Marathon http://master0:8080, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to see that it has run:
|
||||
9. All nodes are running docker, so to run a docker app browse back to Marathon UI, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to see that it has run:
|
||||
|
||||
![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/marathon-docker.png)
|
||||
![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/marathon-docker.png)
|
||||
|
||||
## Chronos Walkthrough
|
||||
|
||||
1. from the jumpbox browse to http://master0:4400/, and verify you see the Marathon Web UI:
|
||||
1. from the jumpbox browse to http://<masterhostname>:4400/, and verify you see the Chronos Web UI:
|
||||
|
||||
![Image of Chronos UI](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/chronos-ui.png)
|
||||
![Image of Chronos UI](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/chronos-ui.png)
|
||||
|
||||
2. Click Add and fill in the following details:
|
||||
1. Name - "MyFirstApp"
|
||||
|
@ -114,15 +101,15 @@ This walk through is based the wonderful digital ocean tutorial: https://www.dig
|
|||
3. Owner, and Owner Name - you can put random information Here
|
||||
4. Schedule - Set to P"T1M" in order to run this every minute
|
||||
|
||||
![Image of adding a new scheduled operation in Chronos](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/chronos.png)
|
||||
![Image of adding a new scheduled operation in Chronos](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/chronos.png)
|
||||
|
||||
3. Click Create
|
||||
|
||||
4. Watch the task run, and then browse back to the Mesos UI http://master0:5050 and observe the output in the completed task.
|
||||
4. Watch the task run, and then browse back to the Mesos UI and observe the output in the completed task.
|
||||
|
||||
5. All nodes are running docker, so to run a docker app browse back to Chronos http://master0:4400, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to verify that it has run:
|
||||
5. All nodes are running docker, so to run a docker app browse back to Chronos UI, and create an application to run "sudo docker run hello-world". Once running browse back to Mesos in a similar fashion to the above instructions to verify that it has run:
|
||||
|
||||
![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/images/chronos-docker.png)
|
||||
![Image of setting up docker application in Marathon](https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/images/chronos-docker.png)
|
||||
|
||||
|
||||
# Sample Workloads
|
||||
|
@ -142,7 +129,7 @@ Try the following workloads to test your new mesos cluster. Run these on Marath
|
|||
|
||||
## Notes
|
||||
|
||||
* This version of Mesos is a non-HA(no Loadbalancer or Availabilitysets) with master, Agent node deployment USING ADMIN PASSWORD. SSHKeys are not supported at this moment
|
||||
* the installation log for the linux jumpbox, masters, and agents are in /var/log/azure/cluster-bootstrap.log
|
||||
* event though the VMs finish quickly Mesos can take 5-15 minutes to install, check /var/log/azure/cluster-bootstrap.log for the completion status.
|
||||
*NOT SUPPORTED yet: the linux jumpbox is based on https://github.com/anhowe/ubuntu-devbox and will take 1 hour to configure. Visit https://github.com/anhowe/ubuntu-devbox to learn how to know when setup is completed, and then how to access the desktop via VNC and an SSH tunnel.
|
||||
* This version of Mesos is a non-HA(no Loadbalancer or Availabilitysets) with master, Agent node deployment.
|
||||
* Refer https://help.ubuntu.com/community/SSH/OpenSSH/Keys#Generating_RSA_Keys for generating sshkeys for ubuntu
|
||||
* the installation log for the masters, and agents are in /var/log/azure/cluster-bootstrap.log
|
||||
* event though the VMs finish quickly Mesos can take 5-15 minutes to install, check /var/log/azure/cluster-bootstrap.log for the completion status.
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentparameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"sshRSAPublicKey": {
|
||||
"value": "GEN-SSH-PUB-KEY"
|
||||
},
|
||||
"agentCount": {
|
||||
"value": 1
|
||||
},
|
||||
"masterCount": {
|
||||
"value": 1
|
||||
},
|
||||
"agentVMSize": {
|
||||
"value": "Standard_A1"
|
||||
},
|
||||
"masterVMSize": {
|
||||
"value": "Standard_A2"
|
||||
},
|
||||
"setSSHKeysLinuxConfiguration": {
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,14 +6,14 @@
|
|||
"type": "string",
|
||||
"defaultValue": "adminuser",
|
||||
"metadata": {
|
||||
"description": "User name for the Linux Virtual Machines (SSH or Password)."
|
||||
"description": "User name for the Linux Virtual Machines (SSH or Password).Default value is adminuser"
|
||||
}
|
||||
},
|
||||
"linuxAdminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Linux Virtual Machine. Not Required. If not set, you must provide a SSH key."
|
||||
"description": "Password for the Linux Virtual Machine. Default value is 'Subscription#<subscription id>'. Not Required. If not set, you must provide a SSH key."
|
||||
}
|
||||
},
|
||||
"sshRSAPublicKey": {
|
||||
|
@ -27,14 +27,14 @@
|
|||
"type": "string",
|
||||
"defaultValue": "adminuser",
|
||||
"metadata": {
|
||||
"description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported)."
|
||||
"description": "User name for the Windows Jumpbox Virtual Machine (Password Only Supported).Default value is adminuser"
|
||||
}
|
||||
},
|
||||
"windowsAdminPassword": {
|
||||
"type": "securestring",
|
||||
"defaultValue": "",
|
||||
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]",
|
||||
"metadata": {
|
||||
"description": "Password for the Windows Jumpbox Virtual Machine."
|
||||
"description": "Password for the Windows Jumpbox Virtual Machine. Default value is 'Subscription#<subscription id>'."
|
||||
}
|
||||
},
|
||||
"agentVMSize": {
|
||||
|
@ -119,14 +119,7 @@
|
|||
"description": "This is the windows sku used by the windows jumpbox"
|
||||
}
|
||||
},
|
||||
"disablePasswordAuthentication": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "This setting controls whether password auth is disabled for Linux VMs provisioned by this template. Default is true which disables password and makes SSH key required."
|
||||
}
|
||||
},
|
||||
"setLinuxConfigurationForVMCreate": {
|
||||
"setSSHKeysLinuxConfiguration": {
|
||||
"type": "int",
|
||||
"defaultValue": 0,
|
||||
"allowedValues": [ 0, 1 ],
|
||||
|
@ -134,13 +127,6 @@
|
|||
"description": "This setting controls whether Linux configuration with SSH Key is passed in VM PUT Payload. Defaults to 1. If SSH Key is blank, this must be set to 0."
|
||||
}
|
||||
},
|
||||
"nameSuffix": {
|
||||
"type": "string",
|
||||
"defaultValue": "0",
|
||||
"metadata": {
|
||||
"description": "A UNIQUE string to be included in the names of resources created. Defaults to 0. Can not be blank."
|
||||
}
|
||||
},
|
||||
"vmsPerStorageAccount": {
|
||||
"type": "int",
|
||||
"defaultValue": 40,
|
||||
|
@ -148,19 +134,12 @@
|
|||
"description": "This specifies the number of VMs per storage accounts"
|
||||
}
|
||||
},
|
||||
"postInstallScriptURI": {
|
||||
"type": "string",
|
||||
"defaultValue": "disabled",
|
||||
"metadata": {
|
||||
"description": "After installation, this specifies a script to download and install. To disabled, set value to 'disabled'."
|
||||
}
|
||||
},
|
||||
"configureScriptsRootLocation": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The root location for all the configuring scripts"
|
||||
},
|
||||
"defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/101-mesos-windows-jumpbox/parts/"
|
||||
"defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mesos-windows-jumpbox/parts/"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -172,9 +151,11 @@
|
|||
"storage": "2015-05-01-preview",
|
||||
"compute": "2015-06-15"
|
||||
},
|
||||
"jumpboxEndpointDNSName": "[concat('jumpbox', variables('nameSuffix'))]",
|
||||
"masterEndpointDNSName": "[concat('master', variables('nameSuffix'))]",
|
||||
"agentEndpointDNSName": "[concat('agent', variables('nameSuffix'))]",
|
||||
"orchestratorName": "mesos",
|
||||
"nameSuffix": "[replace(replace(substring(tolower(uniqueString(resourceGroup().id)),0,5), '-', ''), '.','')]",
|
||||
"jumpboxEndpointDNSName": "[tolower(concat('jumpbox', variables('nameSuffix')))]",
|
||||
"masterEndpointDNSName": "[tolower(concat('master', variables('nameSuffix')))]",
|
||||
"agentEndpointDNSName": "[tolower(concat('agent', variables('nameSuffix')))]",
|
||||
"agentCount": "[parameters('agentCount')]",
|
||||
"masterCount": "[parameters('masterCount')]",
|
||||
"agentVMSize": "[parameters('agentVMSize')]",
|
||||
|
@ -189,18 +170,13 @@
|
|||
"windowsAdminUsername": "[parameters('windowsAdminUsername')]",
|
||||
"windowsAdminPassword": "[parameters('windowsAdminPassword')]",
|
||||
"vmsPerStorageAccount": "[parameters('vmsPerStorageAccount')]",
|
||||
"postInstallScriptURI": "[parameters('postInstallScriptURI')]",
|
||||
|
||||
"nameSuffix": "[tolower(parameters('nameSuffix'))]",
|
||||
"storageLocation": "[resourceGroup().location]",
|
||||
|
||||
"sshKeyPath": "[concat('/home/', variables('adminUsername'), '/.ssh/authorized_keys')]",
|
||||
"disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]",
|
||||
"setLinuxConfigurationForVMCreate": "[parameters('setLinuxConfigurationForVMCreate')]",
|
||||
"linuxConfigurations": [
|
||||
{ },
|
||||
{
|
||||
"disablePasswordAuthentication": "[variables('disablePasswordAuthentication')]",
|
||||
"disablePasswordAuthentication": true,
|
||||
"ssh": {
|
||||
"publicKeys": [
|
||||
{
|
||||
|
@ -211,11 +187,7 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"linuxConfiguration": "[variables('linuxConfigurations')[variables('setLinuxConfigurationForVMCreate')]]",
|
||||
|
||||
"orchestratorName": "mesos",
|
||||
|
||||
|
||||
"linuxConfiguration": "[variables('linuxConfigurations')[parameters('setSSHKeysLinuxConfiguration')]]",
|
||||
"jumpboxPublicIPAddressName": "[concat(variables('orchestratorName'), '-jumpbox-ip-', '-', variables('nameSuffix'))]",
|
||||
|
||||
"marathonEnabled": true,
|
||||
|
@ -228,8 +200,8 @@
|
|||
|
||||
"virtualNetworkName": "[concat(variables('orchestratorName'), '-vnet-', variables('nameSuffix'))]",
|
||||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
|
||||
"subnetName": "[concat(variables('orchestratorName'), '-subnet')]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"subnetName": "[concat(variables('orchestratorName'), '-subnet-', variables('nameSuffix'))]",
|
||||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
|
||||
"addressPrefix": "10.0.0.0/16",
|
||||
"subnetPrefix": "10.0.0.0/18",
|
||||
"baseSubnet": "[split(variables('subnetPrefix'),'0/18')[0]]",
|
||||
|
@ -278,7 +250,7 @@
|
|||
"agentStorageAccountName": "[concat(variables('storageAccountBaseName'),'agent', variables('nameSuffix'))]",
|
||||
"omsStorageAccount": "none",
|
||||
"omsStorageAccountKey": "none",
|
||||
"clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('swarmEnabled'),' ',variables('marathonEnabled'),' ',variables('chronosEnabled'),' ',variables('omsStorageAccount'),' ',variables('omsStorageAccountKey'),' ', variables('adminUsername'),' ',variables('postInstallScriptURI'), ' ', variables('baseSubnet'))]",
|
||||
"clusterInstallParameters": "[concat(variables('masterCount'), ' ',variables('masterVMNamePrefix'), ' ',variables('masterFirstAddr'), ' ',variables('swarmEnabled'),' ',variables('marathonEnabled'),' ',variables('chronosEnabled'),' ',variables('omsStorageAccount'),' ',variables('omsStorageAccountKey'),' ', variables('adminUsername'),' ', 'disabled', ' ', variables('baseSubnet'))]",
|
||||
"jumpboxNSGName": "[concat(variables('orchestratorName'), '-jumpbox-nsg-', variables('nameSuffix'))]",
|
||||
"jumpboxNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('jumpboxNSGName'))]",
|
||||
"jumpboxAddr": 4,
|
||||
|
@ -292,14 +264,10 @@
|
|||
"setBrowserFirstTabDefaultSuffix": "0:5050",
|
||||
"DisableIeEsc": ";Set-ItemProperty -Path HKLM:'\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}' -Name IsInstalled -Value 0 -Force; Set-ItemProperty -Path HKLM:'\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}' -Name IsInstalled -Value 0 -Force;\"",
|
||||
"jumpboxWindowsCustomScript": "[concat(variables('setBrowserFirstTabDefaultPrefix'),variables('masterVMNamePrefix'),variables('setBrowserFirstTabDefaultSuffix'),variables('DisableIeEsc'))]",
|
||||
"jumpboxScriptName": "hostnameResolution.ps1",
|
||||
"jumpboxHostnameFix": "[concat('powershell -ExecutionPolicy Unrestricted -file hostnameResolution.ps1', ' ', variables('masterVMNamePrefix'), ' ', variables('agentVMNamePrefix'), ' ', variables('masterFirstAddr'),' ', variables('agentFirstAddr'), ' ', parameters('masterCount'), ' ', parameters('agentCount'), ' ', variables('baseSubnet'))]",
|
||||
|
||||
"masterNSGName": "[concat(variables('orchestratorName'), '-master-nsg-', variables('nameSuffix'))]",
|
||||
"masterNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('masterNSGName'))]",
|
||||
"masterVMNamePrefix": "[concat(variables('orchestratorName'), '-masterVM-', variables('nameSuffix'), '-')]",
|
||||
"masterFirstAddr": 5,
|
||||
"azureStackDNSIP": "192.168.100.2",
|
||||
"agentNSGName": "[concat(variables('orchestratorName'), '-agent-nsg-', variables('nameSuffix'))]",
|
||||
"agentNSGID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('agentNSGName'))]",
|
||||
"agentFirstAddr": 20,
|
||||
|
@ -328,10 +296,7 @@
|
|||
"addressPrefix": "[variables('subnetPrefix')]"
|
||||
}
|
||||
}
|
||||
],
|
||||
"dhcpOptions": {
|
||||
"dnsServers": [ "[variables('azureStackDNSIP')]" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -375,32 +340,6 @@
|
|||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule2",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Outbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -419,9 +358,6 @@
|
|||
"networkSecurityGroup": {
|
||||
"id": "[variables('jumpboxNSGID')]"
|
||||
},
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[ variables('azureStackDNSIP')]" ]
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipConfig",
|
||||
|
@ -496,8 +432,8 @@
|
|||
"typeHandlerVersion": "1.4",
|
||||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"fileUris": [ "[concat(parameters('configureScriptsRootLocation'), variables('jumpboxScriptName'))]" ],
|
||||
"commandToExecute": "[concat(variables('jumpboxWindowsCustomScript'), variables('jumpboxHostnamefix'))]"
|
||||
"fileUris": [],
|
||||
"commandToExecute": "[variables('jumpboxWindowsCustomScript')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -521,32 +457,6 @@
|
|||
"priority": 200,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule2",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Outbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -568,10 +478,6 @@
|
|||
"networkSecurityGroup": {
|
||||
"id": "[variables('masterNSGID')]"
|
||||
},
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[ variables('azureStackDNSIP')]" ]
|
||||
},
|
||||
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipConfigNode",
|
||||
|
@ -653,7 +559,7 @@
|
|||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"fileUris": [ "[concat(parameters('configureScriptsRootLocation'), variables('mesosScriptName'))]", "[concat(parameters('configureScriptsRootLocation'), variables('nginxScriptName'))]" ],
|
||||
"commandToExecute": "[concat('/bin/bash -c \"/bin/bash configure-mesos-azurestack.sh ', variables('clusterInstallParameters'),' ', reference(concat(variables('masterVMNamePrefix'), 'nic-', copyIndex()), '2015-05-01-preview').ipConfigurations[0].properties.privateIPAddress ,' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]"
|
||||
"commandToExecute": "[concat('/bin/bash -c \"/bin/bash configure-mesos-azurestack.sh ', variables('clusterInstallParameters'), ' >> /var/log/azure/cluster-bootstrap.log 2>&1\"')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -718,32 +624,6 @@
|
|||
"priority": 230,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule1",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Inbound"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rule2",
|
||||
"properties": {
|
||||
"protocol": "*",
|
||||
"sourcePortRange": "*",
|
||||
"destinationPortRange": "*",
|
||||
"sourceAddressPrefix": "*",
|
||||
"destinationAddressPrefix": "*",
|
||||
"access": "Allow",
|
||||
"priority": 101,
|
||||
"direction": "Outbound"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -765,9 +645,6 @@
|
|||
"networkSecurityGroup": {
|
||||
"id": "[variables('agentNSGID')]"
|
||||
},
|
||||
"dnsSettings": {
|
||||
"dnsServers": [ "[ variables('azureStackDNSIP')]" ]
|
||||
},
|
||||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipConfigNode",
|
||||
|
@ -849,7 +726,7 @@
|
|||
"autoUpgradeMinorVersion": "true",
|
||||
"settings": {
|
||||
"fileUris": [ "[concat(parameters('configureScriptsRootLocation'), variables('mesosScriptName'))]", "[concat(parameters('configureScriptsRootLocation'), variables('nginxScriptName'))]" ],
|
||||
"commandToExecute": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash configure-mesos-azurestack.sh ', variables('clusterInstallParameters'),' ', reference(concat(variables('agentVMNamePrefix'), 'nic-', copyIndex()), '2015-05-01-preview').ipConfigurations[0].properties.privateIPAddress,' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]"
|
||||
"commandToExecute": "[concat('/usr/bin/nohup /bin/bash -c \"/bin/bash configure-mesos-azurestack.sh ', variables('clusterInstallParameters'),' >> /var/log/azure/cluster-bootstrap.log 2>&1 &\" &')]"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentparameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"agentCount": {
|
||||
"value": 1
|
||||
},
|
||||
"masterCount": {
|
||||
"value": 1
|
||||
},
|
||||
"agentVMSize": {
|
||||
"value": "Standard_A1"
|
||||
},
|
||||
"masterVMSize": {
|
||||
"value": "Standard_A2"
|
||||
},
|
||||
"setSSHKeysLinuxConfiguration": {
|
||||
"value": 0
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
## Configure the environment with the Add-AzureRmEnvironment cmdlt
|
||||
$endptOut = Invoke-RestMethod "$("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())/metadata/endpoints?api-version=1.0"
|
||||
$envName = "AzureStackCloud"
|
||||
Add-AzureRmEnvironment -Name ($envName) `
|
||||
-ActiveDirectoryEndpoint ($ActiveDirectoryEndpoint = $($endptOut.authentication.loginEndpoint) + "5454420b-2e38-4b9e-8b56-1712d321cf33" + "/") `
|
||||
-ActiveDirectoryServiceEndpointResourceId ($ActiveDirectoryServiceEndpointResourceId = $($endptOut.authentication.audiences[0])) `
|
||||
-ResourceManagerEndpoint ($ResourceManagerEndpoint = $("https://api.$env:USERDNSDOMAIN".ToLowerInvariant())) `
|
||||
-GalleryEndpoint ($GalleryEndpoint = $endptOut.galleryEndpoint) `
|
||||
-GraphEndpoint ($GraphEndpoint = $endptOut.graphEndpoint) `
|
||||
-StorageEndpointSuffix ($StorageEndpointSuffix="$($env:USERDNSDOMAIN)".ToLowerInvariant()) `
|
||||
-AzureKeyVaultDnsSuffix ($AzureKeyVaultDnsSuffix="vault.$($env:USERDNSDOMAIN)".ToLowerInvariant())
|
||||
|
||||
## Authenticate a user to the environment (you will be prompted during authentication)
|
||||
$privateEnv = Get-AzureRmEnvironment $envName
|
||||
$privateAzure = Add-AzureRmAccount -Environment $privateEnv -Verbose
|
||||
Select-AzureRmProfile -Profile $privateAzure
|
||||
|
||||
## Select an existing subscription where the deployment will take place
|
||||
Get-AzureRmSubscription -SubscriptionName "SUBSCRIPTION_NAME" | Select-AzureRmSubscription
|
||||
|
||||
# Set Deployment Variables
|
||||
$myNum = "001" #Modify this per deployment
|
||||
$RGName = "myRG$myNum"
|
||||
$myLocation = "local"
|
||||
|
||||
$templateFile= "azuredeploy.json"
|
||||
$templateParameterFile= "azuredeploy.parameters.json"
|
||||
# For SSHKeys use below parameters.json.Fix the GEN-* values before proceeding to next steps
|
||||
#$templateParameterFile= "azuredeploy-sshkeys.parameters.json"
|
||||
|
||||
# Create Resource Group for Template Deployment
|
||||
New-AzureRmResourceGroup -Name $RGName -Location $myLocation
|
||||
|
||||
# Deploy Template
|
||||
New-AzureRmResourceGroupDeployment `
|
||||
-ResourceGroupName $RGName `
|
||||
-TemplateFile $templateFile `
|
||||
-TemplateParameterFile $templateParameterFile
|
До Ширина: | Высота: | Размер: 207 KiB После Ширина: | Высота: | Размер: 207 KiB |
До Ширина: | Высота: | Размер: 32 KiB После Ширина: | Высота: | Размер: 32 KiB |
До Ширина: | Высота: | Размер: 123 KiB После Ширина: | Высота: | Размер: 123 KiB |
До Ширина: | Высота: | Размер: 65 KiB После Ширина: | Высота: | Размер: 65 KiB |
До Ширина: | Высота: | Размер: 19 KiB После Ширина: | Высота: | Размер: 19 KiB |
До Ширина: | Высота: | Размер: 18 KiB После Ширина: | Высота: | Размер: 18 KiB |
До Ширина: | Высота: | Размер: 49 KiB После Ширина: | Высота: | Размер: 49 KiB |