Skip to content

Latest commit

 

History

History
321 lines (184 loc) · 11.7 KB

File metadata and controls

321 lines (184 loc) · 11.7 KB

Module 6: Backing Azure Solutions with Azure Storage

Lab Answer Key: Deploying Azure Storage to Support Other Workloads in Azure

Before we start

  1. Ensure that you are logged in to your Windows 10 Virtual Machine using the following credentials:

    • Username: Admin

    • Password: Pa55w.rd

  2. Observe the Taskbar located at the bottom of your Windows 10 desktop. The Taskbar contains the icons for the common applications we will use in the labs:

    Note: You can also find shortcuts to these applications on the Desktop and in the Start Menu.

Exercise 1: Create Virtual Machine Resources

Task 1: Open the Azure Portal

  1. On the Taskbar, click the Microsoft Edge icon.

  2. In the open browser window, navigate to the Azure Portal (https://portal.azure.com).

  3. Enter the email address of your Microsoft account.

  4. Click the Next button.

  5. Enter the password for your Microsoft account.

  6. Click the Sign in button.

Task 2: Create Resource Group

  1. At the top of the portal, click the Cloud Shell icon to open a new shell instance.

  2. In the Cloud Shell command prompt at the bottom of the portal, type in the following command and press Enter to create a new resource group:

    az group create --name MOD06VMDK --location eastus
    
  3. Type in the following command and press Enter to show the details of your resource group:

    az group show --name MOD06VMDK
    

Task 3: Create Virtual Network (VNET)

  1. Type in the following command and press Enter to create a new Virtual Network:

    az network vnet create --resource-group MOD06VMDK --name ComputeNetwork --location eastus
    
  2. Type in the following command and press Enter to view your new Virtual Network in the list of networks using this command:

    az network vnet list
    
  3. Type in the following command and press Enter to get a list of ids for Virtual Networks in your subscription:

    az network vnet list --query [*].{AzureId:id} --out tsv
    
  4. Type in the following command and press Enter to create a new Subnet:

    az network vnet subnet create --resource-group MOD06VMDK --name ComputeSubnet --vnet-name ComputeNetwork --address-prefix 10.0.1.0/24
    
  5. Type in the following command and press Enter to view a list of Subnets associated with your Virtual Network:

    az network vnet subnet list --resource-group MOD06VMDK --vnet-name ComputeNetwork
    
  6. Type in the following command and press Enter to show the details of your newly created Subnet:

    az network vnet subnet show --resource-group MOD06VMDK --vnet-name ComputeNetwork --name ComputeSubnet
    

Task 4: Create Public IP Address (PIP)

  1. Type in the following command and press Enter to create a new Public IP Address:

    az network public-ip create --resource-group MOD06VMDK --name ComputePIP --location eastus --allocation-method Dynamic
    
  2. Type in the following command and press Enter to view a list of all Public IP Addresses in your subscription:

    az network public-ip list
    

Task 5: Create Network Security Group (NSG)

  1. Type in the following command and press Enter to create a new Network Security Group:

    az network nsg create --resource-group MOD06VMDK --name ComputeNSG --location eastus 
    
  2. Type in the following command and press Enter to view a list of all Network Security Groups in your subscription:

    az network nsg list
    
  3. Type in the following command and press Enter to create a new Network Security Group Rule:

    az network nsg rule create --resource-group MOD06VMDK --nsg-name ComputeNSG --name ComputeRule --access Allow --protocol Tcp --direction Inbound --priority 100 --source-address-prefix Internet --source-port-range "*" --destination-address-prefix "*" --destination-port-range 3389
    
  4. Type in the following command and press Enter to view a list of Rules associated with your Network Security Group:

    az network nsg rule list --resource-group MOD06VMDK --nsg-name ComputeNSG 
    

Task 6: Create Network Interface Card (NIC)

  1. Type in the following command and press Enter to create a new Network Interface Card:

    az network nic create --resource-group MOD06VMDK --name ComputeNIC --location eastus --subnet ComputeSubnet --vnet-name ComputeNetwork
    
  2. Type in the following command and press Enter to view the details of your newly created Network Interface Card:

    az network nic show --resource-group MOD06VMDK --name ComputeNIC
    
  3. Type in the following command and press Enter to update the Network Interface Card by applying a Network Security Group:

    az network nic update --resource-group MOD06VMDK --name ComputeNIC --network-security-group ComputeNSG 
    
  4. Type in the following command and press Enter to bind a Public IP Address to the Network Interface Card:

    az network nic ip-config create --resource-group MOD06VMDK --name ComputeConfig --nic-name ComputeNIC --public-ip-address ComputePIP
    
  5. Type in the following command and press Enter to view the updated details of your Network Interface Card:

    az network nic show --resource-group MOD06VMDK --name ComputeNIC
    
  6. Type in the following command and press Enter to view a list of Public IP Addresses bound to the Network Interface Card:

    az network nic ip-config list --resource-group MOD06VMDK --nic-name ComputeNIC
    
  7. Type in the following command and press Enter to view a table showing all resources in your Resource Group:

    az resource list --resource-group MOD06VMDK --query "[*].{Name:name, ReferenceUri:id}" --out table
    
  8. Record the unique Id and name for each of the four resources you created within the MOD06VMDK Resource Group.

  9. Close the Cloud Shell prompt at the bottom of the portal.

Review: In this exercise, you created a Public IP Address, Network Interface Card, Network Security Group and Virtual Network for use with a Virtual Machine.

Exercise 2: Create Virtual Machine with Storage Account using ARM

Task 1: Deploy Virtual Machine using ARM Template

  1. On the left side of the portal, click the Create a resource link.

  2. At the top of the New blade, locate the Search the Marketplace field.

  3. Enter the text Template Deployment into the search field and press Enter.

  4. In the Everything search results blade, select the Template deployment result.

  5. In the Template deployment blade, click the Create button.

  6. In the Custom deployment blade, click the Build your own template in the editor link.

  7. In the Edit template blade, click the Load file link.

  8. In the Open file dialog that appears, navigate to the Allfiles (F):\Mod06\Labfiles\Starter folder.

  9. Select the storageaccount.json file.

  10. Click the Open button.

  11. Back in the Edit template blade, click the Save button to persist the template.

  12. Back in the Custom deployment blade, perform the following actions:

    a. Leave the Subscription field set to it's default value.

    a. In the Resource group section, select the Use Existing option.

    a. In the Resource group section, locate the list and select the value MOD06VMDK option.

    a. In the Network Interface Card Id field, enter the referenceUri you recorded of the Network Interface Card named ComputeNIC created earlier in this lab.

    a. In the Terms and Conditions section, select the I agree to the terms and conditions stated above checkbox.

    a. Click the Purchase button.

  13. Wait for the creation task to complete before moving on with this lab.

Review: In this exercise, you deployed an ARM template that used the existing networking resources when creating a VM while maintaining the VM's hard disk as a separately managed resource.

Exercise 3: Create Virtual Machine with Managed Disk using ARM

Task 1: Delete Previously Created Virtual Machine

  1. On the left side of the portal, click the Resource groups link.

  2. In the Resource groups blade, locate and select the MOD06VMDK Resource Group link.

  3. In the MOD06VMDK blade, select the Virtual Machine you recently created.

  4. In the Virtual machine blade, click the Delete button at the top of the blade.

  5. In the confirmation dialog, click the Yes button.

  6. Wait for the deletion task to complete before moving on with this lab.

Task 2: Deploy Virtual Machine using ARM Template

  1. On the left side of the portal, click the Create a resource link.

  2. At the top of the New blade, locate the Search the Marketplace field.

  3. Enter the text Template Deployment into the search field and press Enter.

  4. In the Everything search results blade, select the Template deployment result.

  5. In the Template deployment blade, click the Create button.

  6. In the Custom deployment blade, click the Build your own template in the editor link.

  7. In the Edit template blade, click the Load file link.

  8. In the Open file dialog that appears, navigate to the Allfiles (F):\Mod06\Labfiles\Starter folder.

  9. Select the manageddisk.json file.

  10. Click the Open button.

  11. Back in the Edit template blade, click the Save button to persist the template.

  12. Back in the Custom deployment blade, perform the following actions:

    a. Leave the Subscription field set to it's default value.

    a. In the Resource group section, select the Use Existing option.

    a. In the Resource group section, locate the list and select the value MOD06VMDK option.

    a. In the Location field, select the East US location.

    a. In the Network Interface Card Id field, enter the referenceUri you recorded of the Network Interface Card named ComputeNIC created earlier in this lab.

    a. In the Terms and Conditions section, select the I agree to the terms and conditions stated above checkbox.

    a. Click the Purchase button.

  13. Wait for the creation task to complete before moving on with this lab.

Review: In this exercise, you deployed an ARM template that used the existing networking resources when creating a VM but used a new Storage Account for the VM's hard disk.

Exercise 4: Cleanup Subscription

Task 1: Open Cloud Shell

  1. At the top of the portal, click the Cloud Shell icon to open a new shell instance.

  2. In the Cloud Shell command prompt at the bottom of the portal, type in the following command and press Enter to list all resource groups in the subscription:

    az group list
    

Task 2: Delete Resource Groups

  1. Type in the following command and press Enter to delete the MOD06VMDK Resource Group:

    az group delete --name MOD06VMDK --no-wait --yes
    
  2. Close the Cloud Shell prompt at the bottom of the portal.

Task 3: Close Active Applications

  1. Close the currently running Microsoft Edge application.

Review: In this exercise, you "cleaned up your subscription" by removing the Resource Groups used in this lab.