mirror of
https://github.com/MicrosoftLearning/AZ-104-MicrosoftAzureAdministrator.git
synced 2026-02-06 16:49:09 +00:00
Merge pull request #243 from jmenne/improvedTemplates
#232 Improved Templates and updated Labfiles
This commit is contained in:
commit
35552e1f63
15
Allfiles/Labs/04/az104-04-vms-loop-parameters .json
Normal file
15
Allfiles/Labs/04/az104-04-vms-loop-parameters .json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"vmSize": {
|
||||||
|
"value": "Standard_D2s_v3"
|
||||||
|
},
|
||||||
|
"adminUsername": {
|
||||||
|
"value": "Student"
|
||||||
|
},
|
||||||
|
"adminPassword": {
|
||||||
|
"value": "Pa55w.rd1234"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
162
Allfiles/Labs/04/az104-04-vms-loop-template.json
Normal file
162
Allfiles/Labs/04/az104-04-vms-loop-template.json
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"vmSize": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "Standard_D2s_v3",
|
||||||
|
"metadata": {
|
||||||
|
"description": "VM size"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vmName": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "az104-04-vm",
|
||||||
|
"metadata": {
|
||||||
|
"description": "VM name Prefix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vmCount": {
|
||||||
|
"type": "int",
|
||||||
|
"defaultValue": 2,
|
||||||
|
"metadata": {
|
||||||
|
"description": "Number of VMs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"adminUsername": {
|
||||||
|
"type": "string",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Admin username"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"adminPassword": {
|
||||||
|
"type": "securestring",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Admin password"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"virtualNetworkName": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "az104-04-vnet1",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Virtual network name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"nic": "az104-04-nic",
|
||||||
|
"virtualNetworkName": "[parameters('virtualNetworkName')]",
|
||||||
|
"subnetName": "subnet",
|
||||||
|
"subnet0Name": "subnet0",
|
||||||
|
"subnet1Name": "subnet1",
|
||||||
|
"computeApiVersion": "2018-06-01",
|
||||||
|
"networkApiVersion": "2018-08-01"
|
||||||
|
},
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"name": "[concat(parameters('vmName'),copyIndex())]",
|
||||||
|
"copy": {
|
||||||
|
"name": "VMcopy",
|
||||||
|
"count": "[parameters('vmCount')]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Compute/virtualMachines",
|
||||||
|
"apiVersion": "[variables('computeApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Creating VMs",
|
||||||
|
"dependsOn": [
|
||||||
|
"[concat(variables('nic'),copyIndex())]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"osProfile": {
|
||||||
|
"computerName": "[concat(parameters('vmName'),copyIndex())]",
|
||||||
|
"adminUsername": "[parameters('adminUsername')]",
|
||||||
|
"adminPassword": "[parameters('adminPassword')]",
|
||||||
|
"windowsConfiguration": {
|
||||||
|
"provisionVmAgent": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hardwareProfile": {
|
||||||
|
"vmSize": "[parameters('vmSize')]"
|
||||||
|
},
|
||||||
|
"storageProfile": {
|
||||||
|
"imageReference": {
|
||||||
|
"publisher": "MicrosoftWindowsServer",
|
||||||
|
"offer": "WindowsServer",
|
||||||
|
"sku": "2019-Datacenter",
|
||||||
|
"version": "latest"
|
||||||
|
},
|
||||||
|
"osDisk": {
|
||||||
|
"createOption": "fromImage"
|
||||||
|
},
|
||||||
|
"dataDisks": []
|
||||||
|
},
|
||||||
|
"networkProfile": {
|
||||||
|
"networkInterfaces": [
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"primary": true
|
||||||
|
},
|
||||||
|
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nic'),copyIndex()))]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Network/virtualNetworks",
|
||||||
|
"name": "[variables('virtualNetworkName')]",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Virtual Network",
|
||||||
|
"properties": {
|
||||||
|
"addressSpace": {
|
||||||
|
"addressPrefixes": [
|
||||||
|
"10.40.0.0/22"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"subnets": [
|
||||||
|
{
|
||||||
|
"name": "[variables('subnet0Name')]",
|
||||||
|
"properties": {
|
||||||
|
"addressPrefix": "10.40.0.0/24"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[variables('subnet1Name')]",
|
||||||
|
"properties": {
|
||||||
|
"addressPrefix": "10.40.1.0/24"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[concat(variables('nic'),copyIndex())]",
|
||||||
|
"copy":{
|
||||||
|
"name": "nicCopy",
|
||||||
|
"count": "[parameters('vmCount')]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Network/networkInterfaces",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Primary NIC",
|
||||||
|
"dependsOn": [
|
||||||
|
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"ipConfigurations": [
|
||||||
|
{
|
||||||
|
"name": "ipconfig1",
|
||||||
|
"properties": {
|
||||||
|
"subnet": {
|
||||||
|
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), concat(variables('subnetName'),copyIndex()))]"
|
||||||
|
},
|
||||||
|
"privateIPAllocationMethod": "Dynamic"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": {}
|
||||||
|
}
|
||||||
15
Allfiles/Labs/05/az104-05-vnetvm-loop-parameters.json
Normal file
15
Allfiles/Labs/05/az104-05-vnetvm-loop-parameters.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"vmSize": {
|
||||||
|
"value": "Standard_D2s_v3"
|
||||||
|
},
|
||||||
|
"adminUsername": {
|
||||||
|
"value": "Student"
|
||||||
|
},
|
||||||
|
"adminPassword": {
|
||||||
|
"value": "Pa55w.rd1234"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
202
Allfiles/Labs/05/az104-05-vnetvm-loop-template.json
Normal file
202
Allfiles/Labs/05/az104-05-vnetvm-loop-template.json
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"vmSize": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "Standard_D2s_v3",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Virtual machine size"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"location1": {
|
||||||
|
"type": "string",
|
||||||
|
"metadata": {
|
||||||
|
"description": "First Azure Region"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"location2": {
|
||||||
|
"type": "string",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Second Azure Region"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"adminUsername": {
|
||||||
|
"type": "string",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Admin username"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"adminPassword": {
|
||||||
|
"type": "securestring",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Admin password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"locationNames": "[createArray(parameters('location1'),parameters('location1'),parameters('location2'))]",
|
||||||
|
"vmName": "az104-05-vm",
|
||||||
|
"nicName": "az104-05-nic",
|
||||||
|
"subnetName": "subnet0",
|
||||||
|
"VnetName": "az104-05-vnet",
|
||||||
|
"pipName": "az104-05-pip",
|
||||||
|
"nsgName": "az104-05-nsg",
|
||||||
|
"computeApiVersion": "2018-06-01",
|
||||||
|
"networkApiVersion": "2018-08-01"
|
||||||
|
},
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"name": "[concat(variables('vmName'),copyIndex())]",
|
||||||
|
"copy": {
|
||||||
|
"name": "VMcopy",
|
||||||
|
"count": "[length(variables('locationNames'))]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Compute/virtualMachines",
|
||||||
|
"apiVersion": "[variables('computeApiVersion')]",
|
||||||
|
"location": "[variables('locationNames')[copyIndex()]]",
|
||||||
|
"dependsOn": [
|
||||||
|
"[concat(variables('nicName'),copyIndex())]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"osProfile": {
|
||||||
|
"computerName": "[concat(variables('vmName'),copyIndex())]",
|
||||||
|
"adminUsername": "[parameters('adminUsername')]",
|
||||||
|
"adminPassword": "[parameters('adminPassword')]",
|
||||||
|
"windowsConfiguration": {
|
||||||
|
"provisionVmAgent": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hardwareProfile": {
|
||||||
|
"vmSize": "[parameters('vmSize')]"
|
||||||
|
},
|
||||||
|
"storageProfile": {
|
||||||
|
"imageReference": {
|
||||||
|
"publisher": "MicrosoftWindowsServer",
|
||||||
|
"offer": "WindowsServer",
|
||||||
|
"sku": "2019-Datacenter",
|
||||||
|
"version": "latest"
|
||||||
|
},
|
||||||
|
"osDisk": {
|
||||||
|
"createOption": "fromImage"
|
||||||
|
},
|
||||||
|
"dataDisks": []
|
||||||
|
},
|
||||||
|
"networkProfile": {
|
||||||
|
"networkInterfaces": [
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"primary": true
|
||||||
|
},
|
||||||
|
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('nicName'),copyIndex()))]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Network/virtualNetworks",
|
||||||
|
"name": "[concat(variables('VnetName'),copyIndex())]",
|
||||||
|
"copy": {
|
||||||
|
"name": "VNetCopy",
|
||||||
|
"count": "[length(variables('locationNames'))]"
|
||||||
|
},
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[variables('locationNames')[copyIndex()]]",
|
||||||
|
"comments": "Virtual Network",
|
||||||
|
"properties": {
|
||||||
|
"addressSpace": {
|
||||||
|
"addressPrefixes": [
|
||||||
|
"[concat('10.5',copyIndex(),'.0.0/22')]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"subnets": [
|
||||||
|
{
|
||||||
|
"name": "[variables('subnetName')]",
|
||||||
|
"properties": {
|
||||||
|
"addressPrefix": "[concat('10.5',copyIndex(),'.0.0/24')]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[concat(variables('nicName'),copyIndex())]",
|
||||||
|
"copy": {
|
||||||
|
"name": "nicCopy",
|
||||||
|
"count": "[length(variables('locationNames'))]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Network/networkInterfaces",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[variables('locationNames')[copyIndex()]]",
|
||||||
|
"comments": "Primary NIC",
|
||||||
|
"dependsOn": [
|
||||||
|
"[concat(variables('pipName'),copyIndex())]",
|
||||||
|
"[concat(variables('nsgName'),copyIndex())]",
|
||||||
|
"[concat(variables('VnetName'),copyIndex())]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"ipConfigurations": [
|
||||||
|
{
|
||||||
|
"name": "ipconfig1",
|
||||||
|
"properties": {
|
||||||
|
"subnet": {
|
||||||
|
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', concat(variables('VnetName'),copyIndex()), variables('subnetName'))]"
|
||||||
|
},
|
||||||
|
"privateIPAllocationMethod": "Dynamic",
|
||||||
|
"publicIpAddress": {
|
||||||
|
"id": "[resourceId('Microsoft.Network/publicIpAddresses', concat(variables('pipName'),copyIndex()))]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"networkSecurityGroup": {
|
||||||
|
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', concat(variables('nsgName'),copyIndex()))]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[concat(variables('pipName'),copyIndex())]",
|
||||||
|
"copy": {
|
||||||
|
"name": "pipCopy",
|
||||||
|
"count": "[length(variables('locationNames'))]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Network/publicIpAddresses",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[variables('locationNames')[copyIndex()]]",
|
||||||
|
"comments": "Public IP for Primary NIC",
|
||||||
|
"properties": {
|
||||||
|
"publicIpAllocationMethod": "Dynamic"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[concat(variables('nsgName'),copyIndex())]",
|
||||||
|
"copy": {
|
||||||
|
"name": "nsgCopy",
|
||||||
|
"count": "[length(variables('locationNames'))]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Network/networkSecurityGroups",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[variables('locationNames')[copyIndex()]]",
|
||||||
|
"comments": "Network Security Group (NSG) for Primary NIC",
|
||||||
|
"properties": {
|
||||||
|
"securityRules": [
|
||||||
|
{
|
||||||
|
"name": "default-allow-rdp",
|
||||||
|
"properties": {
|
||||||
|
"priority": 1000,
|
||||||
|
"sourceAddressPrefix": "*",
|
||||||
|
"protocol": "Tcp",
|
||||||
|
"destinationPortRange": "3389",
|
||||||
|
"access": "Allow",
|
||||||
|
"direction": "Inbound",
|
||||||
|
"sourcePortRange": "*",
|
||||||
|
"destinationAddressPrefix": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": {}
|
||||||
|
}
|
||||||
15
Allfiles/Labs/06/az104-06-vms-loop-parameters.json
Normal file
15
Allfiles/Labs/06/az104-06-vms-loop-parameters.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"vmSize": {
|
||||||
|
"value": "Standard_D2s_v3"
|
||||||
|
},
|
||||||
|
"adminUsername": {
|
||||||
|
"value": "Student"
|
||||||
|
},
|
||||||
|
"adminPassword": {
|
||||||
|
"value": "Pa55w.rd1234"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
237
Allfiles/Labs/06/az104-06-vms-loop-template.json
Normal file
237
Allfiles/Labs/06/az104-06-vms-loop-template.json
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"vmSize": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "Standard_D2s_v3",
|
||||||
|
"metadata": {
|
||||||
|
"description": "VM size"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vmName": {
|
||||||
|
"type": "string",
|
||||||
|
"defaultValue": "az104-06-vm",
|
||||||
|
"metadata": {
|
||||||
|
"description": "VM name Prefix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vmCount": {
|
||||||
|
"type": "int",
|
||||||
|
"defaultValue": 4,
|
||||||
|
"metadata": {
|
||||||
|
"description": "Number of VMs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"adminUsername": {
|
||||||
|
"type": "string",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Admin username"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"adminPassword": {
|
||||||
|
"type": "securestring",
|
||||||
|
"metadata": {
|
||||||
|
"description": "Admin password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"vmExtensionName": "customScriptExtension",
|
||||||
|
"nic": "az104-06-nic",
|
||||||
|
"virtualNetworkNames": "[createArray('az104-06-vnet01','az104-06-vnet01','az104-06-vnet2','az104-06-vnet3')]",
|
||||||
|
"virtualNetworkNamestbc": "[createArray('az104-06-vnet01','az104-06-vnet2','az104-06-vnet3')]",
|
||||||
|
"VNetPrefixes":"[createArray('10.60','10.62','10.63')]",
|
||||||
|
"nsgNames": "[createArray('az104-06-nsg01','az104-06-nsg01','az104-06-nsg2','az104-06-nsg3')]",
|
||||||
|
"nsgNamestbc": "[createArray('az104-06-nsg01','az104-06-nsg2','az104-06-nsg3')]",
|
||||||
|
"subnetName": "subnet",
|
||||||
|
"subnetRefs": "[createArray(0,1,0,0)]",
|
||||||
|
"computeApiVersion": "2018-06-01",
|
||||||
|
"networkApiVersion": "2018-08-01"
|
||||||
|
},
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"name": "[concat(parameters('vmName'),copyIndex())]",
|
||||||
|
"copy": {
|
||||||
|
"name": "VMcopy",
|
||||||
|
"count": "[parameters('vmCount')]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Compute/virtualMachines",
|
||||||
|
"apiVersion": "[variables('computeApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Creating VMs",
|
||||||
|
"dependsOn": [
|
||||||
|
"[concat(variables('nic'),copyIndex())]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"osProfile": {
|
||||||
|
"computerName": "[concat(parameters('vmName'),copyIndex())]",
|
||||||
|
"adminUsername": "[parameters('adminUsername')]",
|
||||||
|
"adminPassword": "[parameters('adminPassword')]",
|
||||||
|
"windowsConfiguration": {
|
||||||
|
"provisionVmAgent": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hardwareProfile": {
|
||||||
|
"vmSize": "[parameters('vmSize')]"
|
||||||
|
},
|
||||||
|
"storageProfile": {
|
||||||
|
"imageReference": {
|
||||||
|
"publisher": "MicrosoftWindowsServer",
|
||||||
|
"offer": "WindowsServer",
|
||||||
|
"sku": "2019-Datacenter",
|
||||||
|
"version": "latest"
|
||||||
|
},
|
||||||
|
"osDisk": {
|
||||||
|
"createOption": "fromImage"
|
||||||
|
},
|
||||||
|
"dataDisks": []
|
||||||
|
},
|
||||||
|
"networkProfile": {
|
||||||
|
"networkInterfaces": [
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"primary": true
|
||||||
|
},
|
||||||
|
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nic'),copyIndex()))]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Compute/virtualMachines/extensions",
|
||||||
|
"name": "[concat(concat(parameters('vmName'),copyIndex()), '/', variables('vmExtensionName'))]",
|
||||||
|
"copy": {
|
||||||
|
"name": "Extopy",
|
||||||
|
"count": "[parameters('vmCount')]"
|
||||||
|
},
|
||||||
|
"apiVersion": "[variables('computeApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"dependsOn": [
|
||||||
|
"[concat('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'),copyIndex()))]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"publisher": "Microsoft.Compute",
|
||||||
|
"type": "CustomScriptExtension",
|
||||||
|
"typeHandlerVersion": "1.7",
|
||||||
|
"autoUpgradeMinorVersion": true,
|
||||||
|
"settings": {
|
||||||
|
"commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $('Hello World from ' + $env:computername)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Network/virtualNetworks",
|
||||||
|
"name": "[variables('virtualNetworkNamestbc')[copyIndex()]]",
|
||||||
|
"copy": {
|
||||||
|
"name": "VnetCopy",
|
||||||
|
"count": "[length(variables('virtualNetworkNamestbc'))]"
|
||||||
|
},
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Virtual Network",
|
||||||
|
"properties": {
|
||||||
|
"addressSpace": {
|
||||||
|
"addressPrefixes": [
|
||||||
|
"[concat(variables('VNetPrefixes')[copyIndex()],'.0.0/22')]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"subnets": [
|
||||||
|
{
|
||||||
|
"name": "[concat(variables('subnetName'),'0')]",
|
||||||
|
"properties": {
|
||||||
|
"addressPrefix": "[concat(variables('VNetPrefixes')[copyIndex()],'.0.0/24')]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "type": "Microsoft.Network/virtualNetworks/subnets",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Virtual Network Subnet for VNet01",
|
||||||
|
"name": "az104-06-vnet01/subnet1",
|
||||||
|
"properties": {
|
||||||
|
"addressPrefix": "10.60.1.0/24"
|
||||||
|
},
|
||||||
|
"dependsOn": [
|
||||||
|
"Microsoft.Network/virtualNetworks/az104-06-vnet01"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[concat(variables('nic'),copyIndex())]",
|
||||||
|
"copy":{
|
||||||
|
"name": "nicCopy",
|
||||||
|
"count": "[parameters('vmCount')]"
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Network/networkInterfaces",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Primary NIC",
|
||||||
|
"dependsOn": [
|
||||||
|
"[variables('nsgNames')[copyindex()]]",
|
||||||
|
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkNames')[copyIndex()])]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"ipConfigurations": [
|
||||||
|
{
|
||||||
|
"name": "ipconfig1",
|
||||||
|
"properties": {
|
||||||
|
"subnet": {
|
||||||
|
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkNames')[copyIndex()], concat(variables('subnetName'),variables('subnetRefs')[copyindex()]))]"
|
||||||
|
},
|
||||||
|
"privateIPAllocationMethod": "Dynamic"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"networkSecurityGroup": {
|
||||||
|
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgNames')[copyIndex()])]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[variables('nsgNamestbc')[copyIndex()]]",
|
||||||
|
"copy": {
|
||||||
|
"name": "nsgCopy",
|
||||||
|
"count": 3
|
||||||
|
},
|
||||||
|
"type": "Microsoft.Network/networkSecurityGroups",
|
||||||
|
"apiVersion": "[variables('networkApiVersion')]",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"comments": "Network Security Group (NSG) for Primary NIC",
|
||||||
|
"properties": {
|
||||||
|
"securityRules": [
|
||||||
|
{
|
||||||
|
"name": "default-allow-rdp",
|
||||||
|
"properties": {
|
||||||
|
"priority": 1000,
|
||||||
|
"sourceAddressPrefix": "*",
|
||||||
|
"protocol": "Tcp",
|
||||||
|
"destinationPortRange": "3389",
|
||||||
|
"access": "Allow",
|
||||||
|
"direction": "Inbound",
|
||||||
|
"sourcePortRange": "*",
|
||||||
|
"destinationAddressPrefix": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default-allow-http",
|
||||||
|
"properties": {
|
||||||
|
"priority": 1100,
|
||||||
|
"sourceAddressPrefix": "*",
|
||||||
|
"protocol": "Tcp",
|
||||||
|
"destinationPortRange": "80",
|
||||||
|
"access": "Allow",
|
||||||
|
"direction": "Inbound",
|
||||||
|
"sourcePortRange": "*",
|
||||||
|
"destinationAddressPrefix": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": {}
|
||||||
|
}
|
||||||
@ -88,7 +88,7 @@ In this task, you will deploy Azure virtual machines into different subnets of t
|
|||||||
|
|
||||||
>**Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and click **Create storage**.
|
>**Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and click **Create storage**.
|
||||||
|
|
||||||
1. In the toolbar of the Cloud Shell pane, click the **Upload/Download files** icon, in the drop-down menu, click **Upload** and upload the files **\\Allfiles\\Labs\\04\\az104-04-vms-template.json** and **\\Allfiles\\Labs\\04\\az104-04-vms-parameters.json** into the Cloud Shell home directory.
|
1. In the toolbar of the Cloud Shell pane, click the **Upload/Download files** icon, in the drop-down menu, click **Upload** and upload the files **\\Allfiles\\Labs\\04\\az104-04-vms-loop-template.json** and **\\Allfiles\\Labs\\04\\az104-04-vms-loop-parameters.json** into the Cloud Shell home directory.
|
||||||
|
|
||||||
>**Note**: You might need to upload each file separately.
|
>**Note**: You might need to upload each file separately.
|
||||||
|
|
||||||
@ -99,8 +99,8 @@ In this task, you will deploy Azure virtual machines into different subnets of t
|
|||||||
|
|
||||||
New-AzResourceGroupDeployment `
|
New-AzResourceGroupDeployment `
|
||||||
-ResourceGroupName $rgName `
|
-ResourceGroupName $rgName `
|
||||||
-TemplateFile $HOME/az104-04-vms-template.json `
|
-TemplateFile $HOME/az104-04-vms-loop-template.json `
|
||||||
-TemplateParameterFile $HOME/az104-04-vms-parameters.json
|
-TemplateParameterFile $HOME/az104-04-vms-loop-parameters.json
|
||||||
```
|
```
|
||||||
|
|
||||||
>**Note**: This method of deploying ARM templates uses Azure PowerShell. You can perform the same task by running the equivalent Azure CLI command **az deployment create** (for more information, refer to [Deploy resources with Resource Manager templates and Azure CLI](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-cli).
|
>**Note**: This method of deploying ARM templates uses Azure PowerShell. You can perform the same task by running the equivalent Azure CLI command **az deployment create** (for more information, refer to [Deploy resources with Resource Manager templates and Azure CLI](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-cli).
|
||||||
@ -163,7 +163,6 @@ In this task, you will configure static assignment of public and private IP addr
|
|||||||
|
|
||||||
>**Note**: You will need both IP addresses in the last task of this lab.
|
>**Note**: You will need both IP addresses in the last task of this lab.
|
||||||
|
|
||||||
|
|
||||||
#### Task 4: Configure network security groups
|
#### Task 4: Configure network security groups
|
||||||
|
|
||||||
In this task, you will configure network security groups in order to allow for restricted connectivity to Azure virtual machines.
|
In this task, you will configure network security groups in order to allow for restricted connectivity to Azure virtual machines.
|
||||||
@ -275,13 +274,14 @@ In this task, you will configure DNS name resolution within a virtual network by
|
|||||||
```powershell
|
```powershell
|
||||||
nslookup az104-04-vm1.contoso.org
|
nslookup az104-04-vm1.contoso.org
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Verify that the output of the command includes the private IP address of **az104-04-vm1** (**10.40.1.4**).
|
1. Verify that the output of the command includes the private IP address of **az104-04-vm1** (**10.40.1.4**).
|
||||||
|
|
||||||
#### Task 6: Configure Azure DNS for external name resolution
|
#### Task 6: Configure Azure DNS for external name resolution
|
||||||
|
|
||||||
In this task, you will configure external DNS name resolution by using Azure public DNS zones.
|
In this task, you will configure external DNS name resolution by using Azure public DNS zones.
|
||||||
|
|
||||||
1. In the web browser, open a new tab and navigate to https://www.godaddy.com/domains/domain-name-search.
|
1. In the web browser, open a new tab and navigate to <https://www.godaddy.com/domains/domain-name-search>.
|
||||||
|
|
||||||
1. Use the domain name search to identify a domain name which is not in use.
|
1. Use the domain name search to identify a domain name which is not in use.
|
||||||
|
|
||||||
@ -335,18 +335,20 @@ In this task, you will configure external DNS name resolution by using Azure pub
|
|||||||
|
|
||||||
1. In the Azure portal, open the **PowerShell** session in **Cloud Shell** by clicking on the icon in the top right of the Azure Portal.
|
1. In the Azure portal, open the **PowerShell** session in **Cloud Shell** by clicking on the icon in the top right of the Azure Portal.
|
||||||
|
|
||||||
1. From the Cloud Shell pane, run the following to test external name resolution of the **az104-04-vm0** DNS record set in the the newly created DNS zone (replace the placeholder `[Name server 1]` with the name of **Name server 1** you noted earlier in this task and the `[domain name] placeholder with the name of the DNS domain you created earlier in this task):
|
1. From the Cloud Shell pane, run the following to test external name resolution of the **az104-04-vm0** DNS record set in the the newly created DNS zone (replace the placeholder `[Name server 1]` with the name of **Name server 1** you noted earlier in this task and the `[domain name]` placeholder with the name of the DNS domain you created earlier in this task):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
nslookup az104-04-vm0.[domain name] [Name server 1]
|
nslookup az104-04-vm0.[domain name] [Name server 1]
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Verify that the output of the command includes the public IP address of **az104-04-vm0**.
|
1. Verify that the output of the command includes the public IP address of **az104-04-vm0**.
|
||||||
|
|
||||||
1. From the Cloud Shell pane, run the following to test external name resolution of the **az104-04-vm1** DNS record set in the the newly created DNS zone (replace the placeholder `[Name server 1]` with the name of **Name server 1** you noted earlier in this task and the `[domain name] placeholder with the name of the DNS domain you created earlier in this task):
|
1. From the Cloud Shell pane, run the following to test external name resolution of the **az104-04-vm1** DNS record set in the the newly created DNS zone (replace the placeholder `[Name server 1]` with the name of **Name server 1** you noted earlier in this task and the `[domain name]` placeholder with the name of the DNS domain you created earlier in this task):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
nslookup az104-04-vm1.[domain name] [Name server 1]
|
nslookup az104-04-vm1.[domain name] [Name server 1]
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Verify that the output of the command includes the public IP address of **az104-04-vm1**.
|
1. Verify that the output of the command includes the public IP address of **az104-04-vm1**.
|
||||||
|
|
||||||
#### Clean up resources
|
#### Clean up resources
|
||||||
@ -373,9 +375,9 @@ In this task, you will configure external DNS name resolution by using Azure pub
|
|||||||
|
|
||||||
In this lab, you have:
|
In this lab, you have:
|
||||||
|
|
||||||
- Created and configured a virtual network
|
+ Created and configured a virtual network
|
||||||
- Deployed virtual machines into the virtual network
|
+ Deployed virtual machines into the virtual network
|
||||||
- Configured private and public IP addresses of Azure VMs
|
+ Configured private and public IP addresses of Azure VMs
|
||||||
- Configured network security groups
|
+ Configured network security groups
|
||||||
- Configured Azure DNS for internal name resolution
|
+ Configured Azure DNS for internal name resolution
|
||||||
- Configured Azure DNS for external name resolution
|
+ Configured Azure DNS for external name resolution
|
||||||
|
|||||||
@ -35,68 +35,37 @@ In this task, you will deploy three virtual machines, each into a separate virtu
|
|||||||
|
|
||||||
>**Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and click **Create storage**.
|
>**Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and click **Create storage**.
|
||||||
|
|
||||||
1. In the toolbar of the Cloud Shell pane, click the **Upload/Download files** icon, in the drop-down menu, click **Upload** and upload the files **\\Allfiles\\Labs\\05\\az104-05-vnetvm-template.json** and **\\Allfiles\\Labs\\05\\az104-05-vnetvm-parameters.json** into the Cloud Shell home directory.
|
1. In the toolbar of the Cloud Shell pane, click the **Upload/Download files** icon, in the drop-down menu, click **Upload** and upload the files **\\Allfiles\\Labs\\05\\az104-05-vnetvm-loop-template.json** and **\\Allfiles\\Labs\\05\\az104-05-vnetvm-loop-parameters.json** into the Cloud Shell home directory.
|
||||||
|
|
||||||
1. From the Cloud Shell pane, run the following to create the first resource group that will be hosting the first virtual network and the pair of virtual machines (replace the `[Azure_region_1]` placeholder with the name of an Azure region where you intend to deploy these Azure virtual machines):
|
1. From the Cloud Shell pane, run the following to create the resource group that will be hosting the lab environment. The first two virtual networks and a pair of virtual machines will be deployed in `[Azure_region_1]`. The third virtual network and the third virtual machine will be deployed in the same resource group but another `[Azure_region_2]`. (replace the `[Azure_region_1]` and `[Azure_region_2]` placeholder with the names of two different Azure regions where you intend to deploy these Azure virtual machines):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$location = '[Azure_region_1]'
|
$location1 = '[Azure_region_1]'
|
||||||
|
|
||||||
$rgName = 'az104-05-rg0'
|
$location2 = '[Azure_region_2]'
|
||||||
|
|
||||||
New-AzResourceGroup -Name $rgName -Location $location
|
|
||||||
```
|
|
||||||
>**Note**: In order to identify Azure regions, from a PowerShell session in Cloud Shell, run **(Get-AzLocation).Location**
|
|
||||||
|
|
||||||
1. From the Cloud Shell pane, run the following to create the first virtual network and deploy a virtual machine into it by using the template and parameter files you uploaded:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
New-AzResourceGroupDeployment `
|
|
||||||
-ResourceGroupName $rgName `
|
|
||||||
-TemplateFile $HOME/az104-05-vnetvm-template.json `
|
|
||||||
-TemplateParameterFile $HOME/az104-05-vnetvm-parameters.json `
|
|
||||||
-nameSuffix 0 `
|
|
||||||
-AsJob
|
|
||||||
```
|
|
||||||
1. From the Cloud Shell pane, run the following to create the second resource group that will be hosting the second virtual network and the second virtual machine
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$rgName = 'az104-05-rg1'
|
$rgName = 'az104-05-rg1'
|
||||||
|
|
||||||
New-AzResourceGroup -Name $rgName -Location $location
|
New-AzResourceGroup -Name $rgName -Location $location1
|
||||||
```
|
```
|
||||||
1. From the Cloud Shell pane, run the following to create the second virtual network and deploy a virtual machine into it by using the template and parameter files you uploaded:
|
|
||||||
|
>**Note**: In order to identify Azure regions, from a PowerShell session in Cloud Shell, run **(Get-AzLocation).Location**
|
||||||
|
|
||||||
|
1. From the Cloud Shell pane, run the following to create the three virtual networks and deploy virtual machines into them by using the template and parameter files you uploaded:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
New-AzResourceGroupDeployment `
|
New-AzResourceGroupDeployment `
|
||||||
-ResourceGroupName $rgName `
|
-ResourceGroupName $rgName `
|
||||||
-TemplateFile $HOME/az104-05-vnetvm-template.json `
|
-TemplateFile $HOME/az104-05-vnetvm-loop-template.json `
|
||||||
-TemplateParameterFile $HOME/az104-05-vnetvm-parameters.json `
|
-TemplateParameterFile $HOME/az104-05-vnetvm-loop-parameters.json `
|
||||||
-nameSuffix 1 `
|
-location1 $location1 `
|
||||||
|
-location2 $location2 `
|
||||||
-AsJob
|
-AsJob
|
||||||
```
|
```
|
||||||
1. From the Cloud Shell pane, run the following to create the third resource group that will be hosting the third virtual network and the third virtual machine (replace the `[Azure_region_2]` placeholder with the name of another Azure region where you can deploy Azure virtual machines, different from the Azure region you used for the other two deployments):
|
|
||||||
|
|
||||||
```powershell
|
>**Note**: Wait for the deployment to complete before proceeding to the next task. This should take about 2 minutes.
|
||||||
$location = '[Azure_region_2]'
|
|
||||||
|
|
||||||
$rgName = 'az104-05-rg2'
|
>**Note**: To verify the status of the deployment, you can examine the properties of the resource group you created in this task.
|
||||||
|
|
||||||
New-AzResourceGroup -Name $rgName -Location $location
|
|
||||||
```
|
|
||||||
1. From the Cloud Shell pane, run the following to create the third virtual network and deploy a virtual machine into it by using the template and parameter files you uploaded:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
New-AzResourceGroupDeployment `
|
|
||||||
-ResourceGroupName $rgName `
|
|
||||||
-TemplateFile $HOME/az104-05-vnetvm-template.json `
|
|
||||||
-TemplateParameterFile $HOME/az104-05-vnetvm-parameters.json `
|
|
||||||
-nameSuffix 2 `
|
|
||||||
-AsJob
|
|
||||||
```
|
|
||||||
>**Note**: Wait for the deployments to complete before proceeding to the next task. This should take about 2 minutes.
|
|
||||||
|
|
||||||
>**Note**: To verify the status of the deployments, you can examine the properties of the resource groups you created in this task.
|
|
||||||
|
|
||||||
1. Close the Cloud Shell pane.
|
1. Close the Cloud Shell pane.
|
||||||
|
|
||||||
@ -200,6 +169,7 @@ In this task, you will test connectivity between virtual machines on the three v
|
|||||||
```powershell
|
```powershell
|
||||||
Test-NetConnection -ComputerName 10.51.0.4 -Port 3389 -InformationLevel 'Detailed'
|
Test-NetConnection -ComputerName 10.51.0.4 -Port 3389 -InformationLevel 'Detailed'
|
||||||
```
|
```
|
||||||
|
|
||||||
>**Note**: The test uses TCP 3389 since this is this port is allowed by default by operating system firewall.
|
>**Note**: The test uses TCP 3389 since this is this port is allowed by default by operating system firewall.
|
||||||
|
|
||||||
1. Examine the output of the command and verify that the connection was successful.
|
1. Examine the output of the command and verify that the connection was successful.
|
||||||
@ -209,6 +179,7 @@ In this task, you will test connectivity between virtual machines on the three v
|
|||||||
```powershell
|
```powershell
|
||||||
Test-NetConnection -ComputerName 10.52.0.4 -Port 3389 -InformationLevel 'Detailed'
|
Test-NetConnection -ComputerName 10.52.0.4 -Port 3389 -InformationLevel 'Detailed'
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Switch back to the Azure portal on your lab computer and navigate back to the **Virtual machines** blade.
|
1. Switch back to the Azure portal on your lab computer and navigate back to the **Virtual machines** blade.
|
||||||
|
|
||||||
1. In the list of virtual machines, click **az104-05-vm1**.
|
1. In the list of virtual machines, click **az104-05-vm1**.
|
||||||
@ -228,6 +199,7 @@ In this task, you will test connectivity between virtual machines on the three v
|
|||||||
```powershell
|
```powershell
|
||||||
Test-NetConnection -ComputerName 10.52.0.4 -Port 3389 -InformationLevel 'Detailed'
|
Test-NetConnection -ComputerName 10.52.0.4 -Port 3389 -InformationLevel 'Detailed'
|
||||||
```
|
```
|
||||||
|
|
||||||
>**Note**: The test uses TCP 3389 since this is this port is allowed by default by operating system firewall.
|
>**Note**: The test uses TCP 3389 since this is this port is allowed by default by operating system firewall.
|
||||||
|
|
||||||
1. Examine the output of the command and verify that the connection was successful.
|
1. Examine the output of the command and verify that the connection was successful.
|
||||||
@ -256,6 +228,6 @@ In this task, you will test connectivity between virtual machines on the three v
|
|||||||
|
|
||||||
In this lab, you have:
|
In this lab, you have:
|
||||||
|
|
||||||
- Provisioned the lab environment
|
+ Provisioned the lab environment
|
||||||
- Configured local and global virtual network peering
|
+ Configured local and global virtual network peering
|
||||||
- Tested intersite connectivity
|
+ Tested intersite connectivity
|
||||||
|
|||||||
@ -32,7 +32,7 @@ In this lab, you will:
|
|||||||
|
|
||||||
#### Task 1: Provision the lab environment
|
#### Task 1: Provision the lab environment
|
||||||
|
|
||||||
In this task, you will deploy four virtual machines into the same Azure region. The first two will reside in a hub virtual network, while each of the remaining to will reside in a separate spoke virtual network.
|
In this task, you will deploy four virtual machines into the same Azure region. The first two will reside in a hub virtual network, while each of the remaining two will reside in a separate spoke virtual network.
|
||||||
|
|
||||||
1. Sign in to the [Azure portal](https://portal.azure.com).
|
1. Sign in to the [Azure portal](https://portal.azure.com).
|
||||||
|
|
||||||
@ -42,9 +42,9 @@ In this task, you will deploy four virtual machines into the same Azure region.
|
|||||||
|
|
||||||
>**Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and click **Create storage**.
|
>**Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and click **Create storage**.
|
||||||
|
|
||||||
1. In the toolbar of the Cloud Shell pane, click the **Upload/Download files** icon, in the drop-down menu, click **Upload** and upload the files **\\Allfiles\\Labs\\06\\az104-06-vms-template.json**, **\\Allfiles\\Labs\\06\\az104-06-vm-template.json**, and **\\Allfiles\\Labs\\06\\az104-06-vm-parameters.json** into the Cloud Shell home directory.
|
1. In the toolbar of the Cloud Shell pane, click the **Upload/Download files** icon, in the drop-down menu, click **Upload** and upload the files **\\Allfiles\\Labs\\06\\az104-06-vms-loop-template.json** and **\\Allfiles\\Labs\\06\\az104-06-vms-loop-parameters.json** into the Cloud Shell home directory.
|
||||||
|
|
||||||
1. From the Cloud Shell pane, run the following to create the first resource group that will be hosting the first virtual network and the pair of virtual machines (replace the `[Azure_region]` placeholder with the name of an Azure region where you intend to deploy Azure virtual machines)(you can use the "(Get-AzLocation).Location" cmdlet to get the region list):
|
1. From the Cloud Shell pane, run the following to create the first resource group that will be hosting the lab environment (replace the `[Azure_region]` placeholder with the name of an Azure region where you intend to deploy Azure virtual machines)(you can use the "(Get-AzLocation).Location" cmdlet to get the region list):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$location = '[Azure_region]'
|
$location = '[Azure_region]'
|
||||||
@ -53,53 +53,20 @@ In this task, you will deploy four virtual machines into the same Azure region.
|
|||||||
|
|
||||||
New-AzResourceGroup -Name $rgName -Location $location
|
New-AzResourceGroup -Name $rgName -Location $location
|
||||||
```
|
```
|
||||||
1. From the Cloud Shell pane, run the following to create the first virtual network and deploy a pair of virtual machines into it by using the template and parameter files you uploaded:
|
|
||||||
|
1. From the Cloud Shell pane, run the following to create the three virtual networks and four virtual machines into them by using the template and parameter files you uploaded:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
New-AzResourceGroupDeployment `
|
New-AzResourceGroupDeployment `
|
||||||
-ResourceGroupName $rgName `
|
-ResourceGroupName $rgName `
|
||||||
-TemplateFile $HOME/az104-06-vms-template.json `
|
-TemplateFile $HOME/az104-06-vms-loop-template.json `
|
||||||
-TemplateParameterFile $HOME/az104-06-vm-parameters.json `
|
-TemplateParameterFile $HOME/az104-06-vms-loop-parameters.json `
|
||||||
-AsJob
|
-AsJob
|
||||||
```
|
```
|
||||||
|
|
||||||
1. From the Cloud Shell pane, run the following to create the second resource group that will be hosting the second virtual network and the third virtual machine
|
>**Note**: Wait for the deployment to complete before proceeding to the next task. This should take about 5 minutes.
|
||||||
|
|
||||||
```powershell
|
>**Note**: To verify the status of the deployment, you can examine the properties of the resource group you created in this task.
|
||||||
$rgName = 'az104-06-rg2'
|
|
||||||
|
|
||||||
New-AzResourceGroup -Name $rgName -Location $location
|
|
||||||
```
|
|
||||||
1. From the Cloud Shell pane, run the following to create the second virtual network and deploy a virtual machine into it by using the template and parameter files you uploaded:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
New-AzResourceGroupDeployment `
|
|
||||||
-ResourceGroupName $rgName `
|
|
||||||
-TemplateFile $HOME/az104-06-vm-template.json `
|
|
||||||
-TemplateParameterFile $HOME/az104-06-vm-parameters.json `
|
|
||||||
-nameSuffix 2 `
|
|
||||||
-AsJob
|
|
||||||
```
|
|
||||||
1. From the Cloud Shell pane, run the following to create the third resource group that will be hosting the third virtual network and the fourth virtual machine:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$rgName = 'az104-06-rg3'
|
|
||||||
|
|
||||||
New-AzResourceGroup -Name $rgName -Location $location
|
|
||||||
```
|
|
||||||
1. From the Cloud Shell pane, run the following to create the third virtual network and deploy a virtual machine into it by using the template and parameter files you uploaded:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
New-AzResourceGroupDeployment `
|
|
||||||
-ResourceGroupName $rgName `
|
|
||||||
-TemplateFile $HOME/az104-06-vm-template.json `
|
|
||||||
-TemplateParameterFile $HOME/az104-06-vm-parameters.json `
|
|
||||||
-nameSuffix 3 `
|
|
||||||
-AsJob
|
|
||||||
```
|
|
||||||
>**Note**: Wait for the deployments to complete before proceeding to the next task. This should take about 5 - 15 minutes.
|
|
||||||
|
|
||||||
>**Note**: To verify the status of the deployments, you can examine the properties of the resource groups you created in this task.
|
|
||||||
|
|
||||||
1. Close the Cloud Shell pane.
|
1. Close the Cloud Shell pane.
|
||||||
|
|
||||||
@ -216,7 +183,7 @@ In this task, you will test transitivity of virtual network peering by using Net
|
|||||||
| Setting | Value |
|
| Setting | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Subscription | the name of the Azure subscription you are using in this lab |
|
| Subscription | the name of the Azure subscription you are using in this lab |
|
||||||
| Resource group | **az104-06-rg2** |
|
| Resource group | **az104-06-rg1** |
|
||||||
| Source type | **Virtual machine** |
|
| Source type | **Virtual machine** |
|
||||||
| Virtual machine | **az104-06-vm2** |
|
| Virtual machine | **az104-06-vm2** |
|
||||||
| Destination | **Specify manually** |
|
| Destination | **Specify manually** |
|
||||||
@ -281,7 +248,7 @@ In this task, you will configure and test routing between the two spoke virtual
|
|||||||
| Setting | Value |
|
| Setting | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Subscription | the name of the Azure subscription you are using in this lab |
|
| Subscription | the name of the Azure subscription you are using in this lab |
|
||||||
| Resource group | **az104-06-rg2** |
|
| Resource group | **az104-06-rg1** |
|
||||||
| Location | the name of the Azure region in which you created the virtual networks |
|
| Location | the name of the Azure region in which you created the virtual networks |
|
||||||
| Name | **az104-06-rt23** |
|
| Name | **az104-06-rt23** |
|
||||||
| Propagate gateway routes | **No** |
|
| Propagate gateway routes | **No** |
|
||||||
@ -323,7 +290,7 @@ In this task, you will configure and test routing between the two spoke virtual
|
|||||||
| Setting | Value |
|
| Setting | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Subscription | the name of the Azure subscription you are using in this lab |
|
| Subscription | the name of the Azure subscription you are using in this lab |
|
||||||
| Resource group | **az104-06-rg3** |
|
| Resource group | **az104-06-rg1** |
|
||||||
| Region | the name of the Azure region in which you created the virtual networks |
|
| Region | the name of the Azure region in which you created the virtual networks |
|
||||||
| Name | **az104-06-rt32** |
|
| Name | **az104-06-rt32** |
|
||||||
| Propagate gateway routes | **No** |
|
| Propagate gateway routes | **No** |
|
||||||
@ -365,7 +332,7 @@ In this task, you will configure and test routing between the two spoke virtual
|
|||||||
| Setting | Value |
|
| Setting | Value |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Subscription | the name of the Azure subscription you are using in this lab |
|
| Subscription | the name of the Azure subscription you are using in this lab |
|
||||||
| Resource group | **az104-06-rg2** |
|
| Resource group | **az104-06-rg1** |
|
||||||
| Source type | **Virtual machine** |
|
| Source type | **Virtual machine** |
|
||||||
| Virtual machine | **az104-06-vm2** |
|
| Virtual machine | **az104-06-vm2** |
|
||||||
| Destination | **Specify manually** |
|
| Destination | **Specify manually** |
|
||||||
@ -375,7 +342,6 @@ In this task, you will configure and test routing between the two spoke virtual
|
|||||||
|
|
||||||
1. Click **Check** and wait until results of the connectivity check are returned. Verify that the status is **Reachable**. Review the network path and note that the traffic was routed via **10.60.0.4**, assigned to the **az104-06-nic0** network adapter. If status is **Unreachable**, you should restart az104-06-vm0.
|
1. Click **Check** and wait until results of the connectivity check are returned. Verify that the status is **Reachable**. Review the network path and note that the traffic was routed via **10.60.0.4**, assigned to the **az104-06-nic0** network adapter. If status is **Unreachable**, you should restart az104-06-vm0.
|
||||||
|
|
||||||
|
|
||||||
> **Note**: This is expected, since the traffic between spoke virtual networks is now routed via the virtual machine located in the hub virtual network, which functions as a router.
|
> **Note**: This is expected, since the traffic between spoke virtual networks is now routed via the virtual machine located in the hub virtual network, which functions as a router.
|
||||||
|
|
||||||
> **Note**: You can use **Network Watcher** to view topology of the network.
|
> **Note**: You can use **Network Watcher** to view topology of the network.
|
||||||
@ -600,9 +566,9 @@ In this task, you will implement an Azure Application Gateway in front of the tw
|
|||||||
|
|
||||||
In this lab, you have:
|
In this lab, you have:
|
||||||
|
|
||||||
- Provisioned the lab environment
|
+ Provisioned the lab environment
|
||||||
- Configured the hub and spoke network topology
|
+ Configured the hub and spoke network topology
|
||||||
- Tested transitivity of virtual network peering
|
+ Tested transitivity of virtual network peering
|
||||||
+ Task 4: Configure routing in the hub and spoke topology
|
+ Task 4: Configure routing in the hub and spoke topology
|
||||||
+ Task 5: Implement Azure Load Balancer
|
+ Task 5: Implement Azure Load Balancer
|
||||||
+ Task 6: Implement Azure Application Gateway
|
+ Task 6: Implement Azure Application Gateway
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user