• No results found

Lab Setup

In document 20533B-ENU-TrainerHandbook (Page 45-48)

Estimated Time: 60 minutes Virtual Machine: 20533B-MIA-CL1 User name: Student

Password: Pa$$w0rd

Before starting this lab, ensure that you have performed the Preparing the Environment demonstration tasks at the beginning of the first lesson in this module, and that the setup script has completed.

Exercise 1: Using Azure Portals

Scenario

The IT department at A. Datum uses an on-premises, web-based asset management application that consists of a Microsoft ASP.NET website and a Microsoft SQL Server database. In addition, invoice documents for all IT purchases are stored in a file share. You plan to explore options for migrating the asset management application and invoice document store to Microsoft Azure by creating a website, database, and storage account in Azure. You also want to check the latest billing information for your subscription.

Note: The Microsoft Azure portals are continually improved, and the user interface may have been updated since this lab was written. Your instructor will make you aware of any differences between the steps described in the lab and the current Azure portal.

The main tasks for this exercise are as follows:

1. Use the Full Azure Management Portal.

2. Use the New Azure Preview Portal.

3. Manage Your Azure Subscription.

 Task 1: Use the Full Azure Management Portal

1. Ensure that the MSL-TMG1 and 20533B-MIA-CL1 virtual machines are both running, and then log on to 20533B-MIA-CL1 as Student with the password Pa$$w0rd.

2. Sign in to the full Azure management portal using the Microsoft account that is associated with your Azure subscription.

MCT USE ONL Y. STUDENT USE PROHIBITED

1-26 Introduction to Microsoft Azure

3. Create a new website using the Custom Create option. The website should:

o Have a unique, valid URL name.

o Be located in the region nearest your current location.

o Include a free 20 MB database named AssetsDB on a new SQL Database server in the same region that has an administrative login named Student with the password Pa$$w0rd.

4. After the website has been created and is running, view the dashboard for the AssetsDB SQL database and review the summary information there.

 Task 2: Use the New Azure Preview Portal

1. Switch to the new Azure preview portal and browse the resource groups that have been created automatically for the website and SQL database you created in the previous task.

2. View the contents of the resource group created for the SQL database.

3. Create a new storage account with a unique name in the same location and resource group as the SQL database.

4. After the storage account has been created, view the resource group that was created for the SQL database and verify that it now also contains the new storage group.

5. Switch back to the full portal and verify that the new storage account is displayed in the ALL ITEMS page (you may need to refresh the page).

 Task 3: Manage Your Azure Subscription

1. In the full portal, view your bill and review the summary of usage and billing.

2. Note: If your account has been recently created, the subscriptions page may display an error.

If you see this error, return to this page later to view billing information.

3. View the available preview features.

4. Close Internet Explorer.

Results: At the end of this exercise, you should have created a website and a SQL database in your Azure subscription and used Azure PowerShell to obtain information about them.

Exercise 2: Using Azure PowerShell

Scenario

Now that you have explored the Azure portals and created some basic objects, you want to configure your local PowerShell environment to work with your Azure subscription, and use it to retrieve information about the services you have created.

The main tasks for this exercise are as follows:

1. Connect PowerShell to Your Azure Subscription.

2. Manage Azure Services.

3. Manage Resource Groups.

4. Reset the Environment.

MCT USE ONL Y. STUDENT USE PROHIBITED

Implementing Microsoft Azure Infrastructure Solutions 1-27

 Task 1: Connect PowerShell to Your Azure Subscription

1. Start the Microsoft Azure PowerShell interactive scripting environment (ISE) as Administrator.

2. Add your Azure account to the local PowerShell environment by using Azure AD authentication.

3. Verify that your account and subscription are connected to the local PowerShell environment.

 Task 2: Manage Azure Services

1. In the Windows PowerShell ISE, open the following script:

o D:\Labfiles\Lab01\Starter\ExampleCommands.ps1

2. In the script, replace the comments in the first foreach loop so that the code gets all storage accounts and displays each account’s name and the status of the primary replica. Execute your foreach loop.

3. In the script, replace the comments in the second foreach loop so that the code gets all websites and displays each site’s name and state. Execute your foreach loop

4. In the script, replace the comments in the third foreach loop so that the code gets all SQL Database servers and, for each server, gets all the databases. Execute your foreach loop.

 Task 3: Manage Resource Groups

1. In the PowerShell ISE, execute a command that switches to resource manager mode.

2. In the ExampleCommands.ps1 script, replace the comments in the fourth foreach loop so that the code gets all resource groups. Execute your foreach loop. When you have finished, close Windows PowerShell ISE without saving any files.

 Task 4: Reset the Environment

1. On the taskbar, right-click Microsoft Azure PowerShell, and then click Run as administrator. In the User Account Control dialog, click Yes.

2. Type the following command, and then press Enter:

Reset-Azure

3. When prompted, sign in using the Microsoft account associated with your Azure subscription.

Note: This script may remove Azure services in your subscription. It is therefore recommended that you use an Azure trial pass that was provisioned specifically for this course, and not your own Azure account.

The script will take 5-10 minutes to reset your Microsoft Azure environment, ready for the next lab.

The script removes all storage, VMs, virtual networks, cloud services, and resource groups.

Important: The script may not be able to get exclusive access to a storage account to delete it (you will see an error, if this occurs). If you find objects remaining after the reset script is complete, you can re-run Reset-Azure script, or use the full Azure Management Portal to manually delete all the objects in your Azure subscription, with the exception of the default directory.

Results: At the end of this exercise, you should have written PowerShell commands that retrieve information about the services and resource groups in your Azure subscription.

Question: In the lab, you created an Azure website, SQL database, and a storage account to which the on-premises asset management application in the scenario could be migrated.

What other options for migrating this application to Azure might you consider?

MCT USE ONL Y. STUDENT USE PROHIBITED

1-28 Introduction to Microsoft Azure

In document 20533B-ENU-TrainerHandbook (Page 45-48)