diff --git a/Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-parameters.json b/Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-parameters.json new file mode 100644 index 0000000..a8c8591 --- /dev/null +++ b/Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-parameters.json @@ -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" + } + } +} diff --git a/Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-template.json b/Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-template.json new file mode 100644 index 0000000..c998729 --- /dev/null +++ b/Days/Cloud/01VirtualNetworking/Mod04_90DaysOfDevOps-vms-loop-template.json @@ -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": {} +} \ No newline at end of file diff --git a/Days/Cloud/01VirtualNetworking/Module4_90DaysOfDevOps.ps1 b/Days/Cloud/01VirtualNetworking/Module4_90DaysOfDevOps.ps1 new file mode 100644 index 0000000..e3be017 --- /dev/null +++ b/Days/Cloud/01VirtualNetworking/Module4_90DaysOfDevOps.ps1 @@ -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 \ No newline at end of file diff --git a/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps-vms-loop-parameters.json b/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps-vms-loop-parameters.json new file mode 100644 index 0000000..fabe43e --- /dev/null +++ b/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps-vms-loop-parameters.json @@ -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" + } + } +} \ No newline at end of file diff --git a/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps-vms-loop-template.json b/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps-vms-loop-template.json new file mode 100644 index 0000000..730971b --- /dev/null +++ b/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps-vms-loop-template.json @@ -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": "90day-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": "90day-vm-nic", + "virtualNetworkNames": "[createArray('90day-vm-vnet01','90day-vm-vnet01','90day-vm-vnet2','90day-vm-vnet3')]", + "virtualNetworkNamestbc": "[createArray('90day-vm-vnet01','90day-vm-vnet2','90day-vm-vnet3')]", + "VNetPrefixes":"[createArray('10.60','10.62','10.63')]", + "nsgNames": "[createArray('90day-vm-nsg01','90day-vm-nsg01','90day-vm-nsg2','90day-vm-nsg3')]", + "nsgNamestbc": "[createArray('90day-vm-nsg01','90day-vm-nsg2','90day-vm-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": "90day-vm-vnet01/subnet1", + "properties": { + "addressPrefix": "10.60.1.0/24" + }, + "dependsOn": [ + "Microsoft.Network/virtualNetworks/90day-vm-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": {} +} \ No newline at end of file diff --git a/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps.ps1 b/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps.ps1 new file mode 100644 index 0000000..321b327 --- /dev/null +++ b/Days/Cloud/02TrafficManagement/Mod06_90DaysOfDevOps.ps1 @@ -0,0 +1,21 @@ +$rgName = '90DaysOfDevOps' + +New-AzResourceGroupDeployment ` + -ResourceGroupName $rgName ` + -TemplateFile C:\Users\micha\demo\90DaysOfDevOps\Days\Cloud\02TrafficManagement\Mod06_90DaysOfDevOps-vms-loop-template.json ` + -TemplateParameterFile C:\Users\micha\demo\90DaysOfDevOps\Days\Cloud\02TrafficManagement\Mod06_90DaysOfDevOps-vms-loop-parameters.json + + $location = (Get-AzResourceGroup -ResourceGroupName $rgName).location + $vmNames = (Get-AzVM -ResourceGroupName $rgName).Name + + foreach ($vmName in $vmNames) { + Set-AzVMExtension ` + -ResourceGroupName $rgName ` + -Location $location ` + -VMName $vmName ` + -Name 'networkWatcherAgent' ` + -Publisher 'Microsoft.Azure.NetworkWatcher' ` + -Type 'NetworkWatcherAgentWindows' ` + -TypeHandlerVersion '1.4' + } + \ No newline at end of file diff --git a/Days/Cloud/03Storage/LICENSE b/Days/Cloud/03Storage/LICENSE new file mode 100644 index 0000000..183d56b --- /dev/null +++ b/Days/Cloud/03Storage/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Days/Cloud/03Storage/Mod07_90DaysOfDevOps-vm-parameters.json b/Days/Cloud/03Storage/Mod07_90DaysOfDevOps-vm-parameters.json new file mode 100644 index 0000000..fabe43e --- /dev/null +++ b/Days/Cloud/03Storage/Mod07_90DaysOfDevOps-vm-parameters.json @@ -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" + } + } +} \ No newline at end of file diff --git a/Days/Cloud/03Storage/Mod07_90DaysOfDevOps-vm-template.json b/Days/Cloud/03Storage/Mod07_90DaysOfDevOps-vm-template.json new file mode 100644 index 0000000..46ab60b --- /dev/null +++ b/Days/Cloud/03Storage/Mod07_90DaysOfDevOps-vm-template.json @@ -0,0 +1,172 @@ +{ + "$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" + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Admin username" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Admin password" + } + } + }, + "variables": { + "vmName": "90Days-vm0", + "nicName": "90Days-nic0", + "virtualNetworkName": "90Days-vnet0", + "publicIPAddressName": "90Days-pip0", + "nsgName": "90Days-nsg0", + "vnetIpPrefix": "10.70.0.0/22", + "subnetIpPrefix": "10.70.0.0/24", + "subnetName": "subnet0", + "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "computeApiVersion": "2018-06-01", + "networkApiVersion": "2018-08-01" + }, + "resources": [ + { + "name": "[variables('vmName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "[variables('computeApiVersion')]", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[variables('nicName')]" + ], + "properties": { + "osProfile": { + "computerName": "[variables('vmName')]", + "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', variables('nicName'))]" + } + ] + } + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[resourceGroup().location]", + "comments": "Virtual Network", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vnetIpPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetIpPrefix')]" + } + } + ] + } + }, + { + "name": "[variables('nicName')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[resourceGroup().location]", + "comments": "Primary NIC", + "dependsOn": [ + "[variables('publicIpAddressName')]", + "[variables('nsgName')]", + "[variables('virtualNetworkName')]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + } + } + }, + { + "name": "[variables('publicIpAddressName')]", + "type": "Microsoft.Network/publicIpAddresses", + "apiVersion": "[variables('networkApiVersion')]", + "location": "[resourceGroup().location]", + "comments": "Public IP for Primary NIC", + "properties": { + "publicIpAllocationMethod": "Dynamic" + } + }, + { + "name": "[variables('nsgName')]", + "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": "*" + } + } + ] + } + } + ], + "outputs": {} +} diff --git a/Days/Cloud/03Storage/Mod07_90DaysOfDevOps.ps1 b/Days/Cloud/03Storage/Mod07_90DaysOfDevOps.ps1 new file mode 100644 index 0000000..02d76c8 --- /dev/null +++ b/Days/Cloud/03Storage/Mod07_90DaysOfDevOps.ps1 @@ -0,0 +1,7 @@ +$rgName = '90DaysOfDevOps' + +New-AzResourceGroupDeployment ` + -ResourceGroupName $rgName ` + -TemplateFile C:\Users\micha\demo\90DaysOfDevOps\Days\Cloud\03Storage\Mod07_90DaysOfDevOps-vm-template.json ` + -TemplateParameterFile C:\Users\micha\demo\90DaysOfDevOps\Days\Cloud\03Storage\Mod07_90DaysOfDevOps-vm-parameters.json ` + -AsJob diff --git a/Days/Cloud/04Serverless/Mod09a_90DaysOfDevOps.ps1 b/Days/Cloud/04Serverless/Mod09a_90DaysOfDevOps.ps1 new file mode 100644 index 0000000..58914a9 --- /dev/null +++ b/Days/Cloud/04Serverless/Mod09a_90DaysOfDevOps.ps1 @@ -0,0 +1,7 @@ +$rgName = '90DaysOfDevOps' + +$webapp = Get-AzWebApp -ResourceGroupName $rgName + + +#The following following will start an infinite loop that sends the HTTP requests to the web app +while ($true) { Invoke-WebRequest -Uri $webapp.DefaultHostName } \ No newline at end of file diff --git a/Days/Images/2022-02-03_08-02-12.png b/Days/Images/2022-02-03_08-02-12.png new file mode 100644 index 0000000..bb4de28 Binary files /dev/null and b/Days/Images/2022-02-03_08-02-12.png differ diff --git a/Days/Images/Day34_Cloud1.png b/Days/Images/Day34_Cloud1.png new file mode 100644 index 0000000..44f5488 Binary files /dev/null and b/Days/Images/Day34_Cloud1.png differ diff --git a/Days/Images/Day34_Cloud10.png b/Days/Images/Day34_Cloud10.png new file mode 100644 index 0000000..7dd9794 Binary files /dev/null and b/Days/Images/Day34_Cloud10.png differ diff --git a/Days/Images/Day34_Cloud11.png b/Days/Images/Day34_Cloud11.png new file mode 100644 index 0000000..40ecccf Binary files /dev/null and b/Days/Images/Day34_Cloud11.png differ diff --git a/Days/Images/Day34_Cloud12.png b/Days/Images/Day34_Cloud12.png new file mode 100644 index 0000000..c8bf697 Binary files /dev/null and b/Days/Images/Day34_Cloud12.png differ diff --git a/Days/Images/Day34_Cloud13.png b/Days/Images/Day34_Cloud13.png new file mode 100644 index 0000000..38259bf Binary files /dev/null and b/Days/Images/Day34_Cloud13.png differ diff --git a/Days/Images/Day34_Cloud14.png b/Days/Images/Day34_Cloud14.png new file mode 100644 index 0000000..0b89b4e Binary files /dev/null and b/Days/Images/Day34_Cloud14.png differ diff --git a/Days/Images/Day34_Cloud15.png b/Days/Images/Day34_Cloud15.png new file mode 100644 index 0000000..a2a4c61 Binary files /dev/null and b/Days/Images/Day34_Cloud15.png differ diff --git a/Days/Images/Day34_Cloud16.png b/Days/Images/Day34_Cloud16.png new file mode 100644 index 0000000..41c39b9 Binary files /dev/null and b/Days/Images/Day34_Cloud16.png differ diff --git a/Days/Images/Day34_Cloud17.png b/Days/Images/Day34_Cloud17.png new file mode 100644 index 0000000..9576665 Binary files /dev/null and b/Days/Images/Day34_Cloud17.png differ diff --git a/Days/Images/Day34_Cloud18.png b/Days/Images/Day34_Cloud18.png new file mode 100644 index 0000000..0ee30dd Binary files /dev/null and b/Days/Images/Day34_Cloud18.png differ diff --git a/Days/Images/Day34_Cloud19.png b/Days/Images/Day34_Cloud19.png new file mode 100644 index 0000000..0a1f83f Binary files /dev/null and b/Days/Images/Day34_Cloud19.png differ diff --git a/Days/Images/Day34_Cloud2.png b/Days/Images/Day34_Cloud2.png new file mode 100644 index 0000000..4d72d5e Binary files /dev/null and b/Days/Images/Day34_Cloud2.png differ diff --git a/Days/Images/Day34_Cloud20.png b/Days/Images/Day34_Cloud20.png new file mode 100644 index 0000000..a8a3880 Binary files /dev/null and b/Days/Images/Day34_Cloud20.png differ diff --git a/Days/Images/Day34_Cloud21.png b/Days/Images/Day34_Cloud21.png new file mode 100644 index 0000000..dbcd416 Binary files /dev/null and b/Days/Images/Day34_Cloud21.png differ diff --git a/Days/Images/Day34_Cloud22.png b/Days/Images/Day34_Cloud22.png new file mode 100644 index 0000000..8dba20d Binary files /dev/null and b/Days/Images/Day34_Cloud22.png differ diff --git a/Days/Images/Day34_Cloud23.png b/Days/Images/Day34_Cloud23.png new file mode 100644 index 0000000..e94b5b9 Binary files /dev/null and b/Days/Images/Day34_Cloud23.png differ diff --git a/Days/Images/Day34_Cloud24.png b/Days/Images/Day34_Cloud24.png new file mode 100644 index 0000000..8598856 Binary files /dev/null and b/Days/Images/Day34_Cloud24.png differ diff --git a/Days/Images/Day34_Cloud25.png b/Days/Images/Day34_Cloud25.png new file mode 100644 index 0000000..0f05ef4 Binary files /dev/null and b/Days/Images/Day34_Cloud25.png differ diff --git a/Days/Images/Day34_Cloud26.png b/Days/Images/Day34_Cloud26.png new file mode 100644 index 0000000..13c51a6 Binary files /dev/null and b/Days/Images/Day34_Cloud26.png differ diff --git a/Days/Images/Day34_Cloud27.png b/Days/Images/Day34_Cloud27.png new file mode 100644 index 0000000..a0b4191 Binary files /dev/null and b/Days/Images/Day34_Cloud27.png differ diff --git a/Days/Images/Day34_Cloud28.png b/Days/Images/Day34_Cloud28.png new file mode 100644 index 0000000..ce87573 Binary files /dev/null and b/Days/Images/Day34_Cloud28.png differ diff --git a/Days/Images/Day34_Cloud29.png b/Days/Images/Day34_Cloud29.png new file mode 100644 index 0000000..bf92aa2 Binary files /dev/null and b/Days/Images/Day34_Cloud29.png differ diff --git a/Days/Images/Day34_Cloud3.png b/Days/Images/Day34_Cloud3.png new file mode 100644 index 0000000..c62f1df Binary files /dev/null and b/Days/Images/Day34_Cloud3.png differ diff --git a/Days/Images/Day34_Cloud30.png b/Days/Images/Day34_Cloud30.png new file mode 100644 index 0000000..fd8fd54 Binary files /dev/null and b/Days/Images/Day34_Cloud30.png differ diff --git a/Days/Images/Day34_Cloud31.png b/Days/Images/Day34_Cloud31.png new file mode 100644 index 0000000..1254816 Binary files /dev/null and b/Days/Images/Day34_Cloud31.png differ diff --git a/Days/Images/Day34_Cloud32.png b/Days/Images/Day34_Cloud32.png new file mode 100644 index 0000000..5173df1 Binary files /dev/null and b/Days/Images/Day34_Cloud32.png differ diff --git a/Days/Images/Day34_Cloud33.png b/Days/Images/Day34_Cloud33.png new file mode 100644 index 0000000..80db7c7 Binary files /dev/null and b/Days/Images/Day34_Cloud33.png differ diff --git a/Days/Images/Day34_Cloud34.png b/Days/Images/Day34_Cloud34.png new file mode 100644 index 0000000..61fdcc3 Binary files /dev/null and b/Days/Images/Day34_Cloud34.png differ diff --git a/Days/Images/Day34_Cloud35.png b/Days/Images/Day34_Cloud35.png new file mode 100644 index 0000000..986fc23 Binary files /dev/null and b/Days/Images/Day34_Cloud35.png differ diff --git a/Days/Images/Day34_Cloud36.png b/Days/Images/Day34_Cloud36.png new file mode 100644 index 0000000..575fca1 Binary files /dev/null and b/Days/Images/Day34_Cloud36.png differ diff --git a/Days/Images/Day34_Cloud4.png b/Days/Images/Day34_Cloud4.png new file mode 100644 index 0000000..fbccbc5 Binary files /dev/null and b/Days/Images/Day34_Cloud4.png differ diff --git a/Days/Images/Day34_Cloud5.png b/Days/Images/Day34_Cloud5.png new file mode 100644 index 0000000..da4a3b2 Binary files /dev/null and b/Days/Images/Day34_Cloud5.png differ diff --git a/Days/Images/Day34_Cloud6.png b/Days/Images/Day34_Cloud6.png new file mode 100644 index 0000000..fff595e Binary files /dev/null and b/Days/Images/Day34_Cloud6.png differ diff --git a/Days/Images/Day34_Cloud7.png b/Days/Images/Day34_Cloud7.png new file mode 100644 index 0000000..af4b727 Binary files /dev/null and b/Days/Images/Day34_Cloud7.png differ diff --git a/Days/Images/Day34_Cloud8.png b/Days/Images/Day34_Cloud8.png new file mode 100644 index 0000000..83a4174 Binary files /dev/null and b/Days/Images/Day34_Cloud8.png differ diff --git a/Days/Images/Day34_Cloud9.png b/Days/Images/Day34_Cloud9.png new file mode 100644 index 0000000..443cdff Binary files /dev/null and b/Days/Images/Day34_Cloud9.png differ diff --git a/Days/day34.md b/Days/day34.md index 5b5e434..5ef1f6a 100644 --- a/Days/day34.md +++ b/Days/day34.md @@ -4,16 +4,184 @@ The last 6 days have been focused on Microsoft Azure and the public cloud in gen I mentioned at the very beginning about getting a foundational knowledge of the public cloud and choosing one provider to at least begin with, if you are dancing between different clouds then I believe you can get lost quite easily whereas choosing one you get to understand the fundamentals and when you have those it is quite easy to jump into the other clouds and accelerate your learning. -In this final session, I am going to be picking and choosing my hands-on scenarios from this page here which is a reference created by Microsoft and is used for preparations for the [AZ-104 Microsoft Azure Administrator](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/) There are some here such as Containers and Kubernetes that we have not covered in any detail as of yet so I don't want to jump in there just yet. +In this final session, I am going to be picking and choosing my hands-on scenarios from this page here which is a reference created by Microsoft and is used for preparations for the [AZ-104 Microsoft Azure Administrator](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/) + +There are some here such as Containers and Kubernetes that we have not covered in any detail as of yet so I don't want to jump in there just yet. In previous posts, we have created most of Modules 1,2 and 3. ### Virtual Networking +Following [Module 04](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_04-Implement_Virtual_Networking.html): + +I went through the above and changed a few namings for the purpose of #90DaysOfDevOps. I also instead of using the Cloud Shell went ahead and logged in with my new user created on previous days with the Azure CLI on my Windows machine. + +You can do this using the `az login` which will open a browser and let you authenticate to your account. + +I have then created a PowerShell script and some references from the module to use to build out some of the tasks below. You can find the associated files in this folder. + (Cloud\01VirtualNetworking) + + Please make sure you change the file location in the script to suit your environment. + +At this first stage we have no virtual network or virtual machines created in our environment, I only have a cloudshell storage location configured in my resource group. + +I first of all run my [PowerShell script](Cloud/01VirtualNetworking/Module4_90DaysOfDevOps.ps1) + + ![](Images/Day34_Cloud1.png) + +- Task 1: Create and configure a virtual network + + ![](Images/Day34_Cloud2.png) + +- Task 2: Deploy virtual machines into the virtual network + + ![](Images/Day34_Cloud3.png) + +- Task 3: Configure private and public IP addresses of Azure VMs + + ![](Images/Day34_Cloud4.png) + +- Task 4: Configure network security groups + +![](Images/Day34_Cloud5.png) +![](Images/Day34_Cloud6.png) + +- Task 5: Configure Azure DNS for internal name resolution + +![](Images/Day34_Cloud7.png) +![](Images/Day34_Cloud8.png) ### Network Traffic Management +Following [Module 06](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_06-Implement_Network_Traffic_Management.html): + +Next walkthrough, from the last one we have gone into our resource group and deleted our resources, if you had not set up the user account like me to only have access to that one resource group you could follow the module changing the name to `90Days*` this will delete all resources and resource group. This will be my process for each of the following lab. + +For this lab I have also created a PowerShell script and some references from the module to use to build out some of the tasks below. You can find the associated files in this folder. + (Cloud\02TrafficManagement) + + +- Task 1: Provision the lab environment + +I first of all run my [PowerShell script](Cloud/02TrafficManagement/Mod06_90DaysOfDevOps.ps1) + +![](Images/Day34_Cloud9.png) + +- Task 2: Configure the hub and spoke network topology + +![](Images/Day34_Cloud10.png) + +- Task 3: Test transitivity of virtual network peering + +For this my 90DaysOfDevOps group did not have access to the Network Watcher because of permissions, I expect this is because Network Watchers are one of those resources that are not tied to a resource group which is where our RBAC was covered for this user. I added the East US Network Watcher contributer role to the 90DaysOfDevOps group. + +![](Images/Day34_Cloud11.png) +![](Images/Day34_Cloud12.png) +![](Images/Day34_Cloud13.png) + +^ This is expected, since the two spoke virtual networks are not peered with each other (virtual network peering is not transitive). + +- Task 4: Configure routing in the hub and spoke topology + +I had another issue here with my account not being able to run the script as my user within the group 90DaysOfDevOps which I am unsure of so I did jump back into my main admin account. The 90DaysOfDevOps group is an owner of everything in the 90DaysOfDevOps Resource Group so would love to understand why I cannot run a command inside the VM? + +![](Images/Day34_Cloud14.png) +![](Images/Day34_Cloud15.png) + +I then was able to go back into my michael.cade@90DaysOfDevOps.com account and continue this section. Here we are running the same test again but now with the result being reachable. + +![](Images/Day34_Cloud16.png) + +- Task 5: Implement Azure Load Balancer + +![](Images/Day34_Cloud17.png) +![](Images/Day34_Cloud18.png) + +- Task 6: Implement Azure Application Gateway + +![](Images/Day34_Cloud19.png) +![](Images/Day34_Cloud20.png) ### Azure Storage +Following [Module 07](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_07-Manage_Azure_Storage.html): -### Virtual Machines +For this lab I have also created a PowerShell script and some references from the module to use to build out some of the tasks below. You can find the associated files in this folder. + (Cloud\03Storage) -### Serverless (Implement Web Apps) \ No newline at end of file +- Task 1: Provision the lab environment + +I first of all run my [PowerShell script](Cloud/03Storage/Mod07_90DaysOfDeveOps.ps1) + +![](Images/Day34_Cloud21.png) + +- Task 2: Create and configure Azure Storage accounts + +![](Images/Day34_Cloud22.png) + +- Task 3: Manage blob storage + +![](Images/Day34_Cloud23.png) + +- Task 4: Manage authentication and authorization for Azure Storage + +![](Images/Day34_Cloud24.png) +![](Images/Day34_Cloud25.png) + +I was a little impatient waiting for this to be allowed but it did work eventually. + +![](Images/Day34_Cloud26.png) + + +- Task 5: Create and configure an Azure Files shares + +On the run command this would not work with michael.cade@90DaysOfDevOps.com so I used my elevated account. + +![](Images/Day34_Cloud27.png) +![](Images/Day34_Cloud28.png) +![](Images/Day34_Cloud29.png) + + +- Task 6: Manage network access for Azure Storage + +![](Images/Day34_Cloud30.png) + +### Serverless (Implement Web Apps) +Following [Module 09a](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_09a-Implement_Web_Apps.html): + + +- Task 1: Create an Azure web app + +![](Images/Day34_Cloud31.png) + +- Task 2: Create a staging deployment slot + +![](Images/Day34_Cloud34.png) + +- Task 3: Configure web app deployment settings + +![](Images/Day34_Cloud33.png) + +- Task 4: Deploy code to the staging deployment slot + +![](Images/Day34_Cloud32.png) + +- Task 5: Swap the staging slots + +![](Images/Day34_Cloud35.png) + +- Task 6: Configure and test autoscaling of the Azure web app + +This script I am using can be found in (Cloud/05Serverless) + +![](Images/Day34_Cloud36.png) + +This wraps up the section on Microsoft Azure and the public cloud in general. I will say that I had lots of fun attacking and working through this scenarios. + +## Resources + +- [Hybrid Cloud and MultiCloud](https://www.youtube.com/watch?v=qkj5W98Xdvw) +- [Microsoft Azure Fundamentals](https://www.youtube.com/watch?v=NKEFWyqJ5XA&list=WL&index=130&t=12s) +- [Google Cloud Digital Leader Certification Course](https://www.youtube.com/watch?v=UGRDM86MBIQ&list=WL&index=131&t=10s) +- [AWS Basics for Beginners - Full Course](https://www.youtube.com/watch?v=ulprqHHWlng&t=5352s) + +Next we will be diving into version control systems, specifically around git and then also code repository overviews and we will be choosing GitHub as this is my preferred option. + +See you on [Day 35](day35.md) \ No newline at end of file diff --git a/README.md b/README.md index d44ba61..3bb4f72 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,11 @@ This will not cover all things DevOps but it will cover the areas that I feel wi - [✔️] ☁️ 31 > [Microsoft Azure Compute Models](Days/day31.md) - [✔️] ☁️ 32 > [Microsoft Azure Storage & Database Models](Days/day32.md) - [✔️] ☁️ 33 > [Microsoft Azure Networking Models + Azure Management](Days/day33.md) -- [🚧] ☁️ 34 > [Microsoft Azure Hands-On Scenarios](Days/day34.md) +- [✔️] ☁️ 34 > [Microsoft Azure Hands-On Scenarios](Days/day34.md) ### Use Git Effectively -- [] 📚 35 > [](Days/day35.md) +- [🚧] 📚 35 > [](Days/day35.md) - [] 📚 36 > [](Days/day36.md) - [] 📚 37 > [](Days/day37.md) - [] 📚 38 > [](Days/day38.md)