forked from MichaelCade/90DaysOfDevOps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc32dce
commit 2387b7c
Showing
50 changed files
with
851 additions
and
5 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-parameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 changes: 162 additions & 0 deletions
162
Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "90day-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": "90daysofdevops", | ||
"metadata": { | ||
"description": "Virtual network name" | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"nic": "90daysofdevops", | ||
"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": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$rgName = '90DaysOfDevOps' | ||
|
||
New-AzResourceGroupDeployment ` | ||
-ResourceGroupName $rgName ` | ||
-TemplateFile C:\Users\micha\demo\90DaysOfDevOps\Days\Cloud\01VirtualNetworking\Mod04_90DaysOfDevOps-vms-loop-template.json ` | ||
-TemplateParameterFile C:\Users\micha\demo\90DaysOfDevOps\Days\Cloud\01VirtualNetworking\Mod04_90DaysOfDevOps-vms-loop-parameters.json |
15 changes: 15 additions & 0 deletions
15
Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps-vms-loop-parameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} |
Oops, something went wrong.