IT-Camp Azure Labs–Lab 5 Building Application Workloads – Deploy Data Access App–Step-By-Step

Direct answer

IT-Camp Azure Labs Lab Home Page… Includes DOCx and PPTx http://ITProGuru.com/AZLab2 Description and Live links to Series Lab 1: Building Foundation Virtual Network Storage Cloud Service Lab 2: Building Workloads Build Domain Controller Create SQL Server (SQL) Lab 3: Working with Identity Create Azure Active Directory Lab 4: Build Application & SQL Workloads Create Application […]

IT-Camp Azure Labs

Lab Home Page… Includes DOCx and PPTx

http://ITProGuru.com/AZLab2

Description and Live links to Series

Lab 5: Building Application Workloads – Deploy Data Access App

Configure endpoints for WEBFE01

In this task, you will configure the required public endpoints for WEBFE01.

Perform the following tasks in the Azure management portal.

  1. In the Azure management portal, click in VIRTUAL MACHINES.
  2. Click WEBFE01, and then click ENDPOINTS.
  3. Click ADD.
  4. In ADD ENDPOINT, click the Next arrow.
  5. In Name, select HTTP, and then click the Completed button.
  6. Click ADD.
  7. In ADD ENDPOINT, click the Next arrow.
  8. In Name, select HTTPS, and then click the Completed button.
  9. You will have to wait for the endpoint to be created then continue
  10. Click ADD.
  11. In ADD ENDPOINT, click the Next arrow.
  12. In NAME, type Custom5000.
  13. In PUBLIC PORT and PRIVATE PORT, type 5000, and then click the Completed button.
  14. Click ADD.
  15. In ADD ENDPOINT, click the Next arrow.
  16. In NAME, type Custom5001.
  17. In PUBLIC PORT and PRIVATE PORT, type 5001, and then click the Completed button.
  18. Click Dismiss Completed in Azure Portal after all are done

Configure firewall ports for WEBFE01

Next, you must enable WEBFE01 to communicate internally within the service. While general IP connectivity is provided by DHCP, both servers are workgroup members and have the public firewall profile enabled. You will enable Application ports and PING traffic on WEBFE01.

Perform the following tasks in an RDP connection to WEBFE01.

  1. In your RDP session to WEBFE01, open Server Manager.
  2. Click Local Server.
  3. Next to Windows Firewall, click Public: On.
  4. In Windows Firewall, click Advanced settings.
  5. In Windows Firewall with Advanced Security, click Inbound Rules, and then click New Rule.
  6. In Rule Type, click Port, and then click Next.
  7. In Specific local ports, type 80, 443, 5000, 5001, and then click Next.
  8. On the Action page, click Next.
  9. On the Profile page, click Next.
  10. In Name, type Allow WebApp, and then click Finish.
  11. In Windows Firewall with Advanced Security, click Inbound Rules, and then click New Rule.
  12. In Rule Type, click Custom, and then click Next.
  13. On the Program page, click Next. (All programs should be selected)
  14. On the Protocol and Ports page, in Protocol type, select ICMPv4, and then click Next.
  15. On the Scope page, click Next.
  16. On the Action page, click Next.
  17. On the Profile page, click Next.
  18. In Name, type Allow PING, and then click Finish.
  19. Disconnect from the RDP session.

Remotely enable Internet Information Services on WEBFE01 using Windows PowerShell

In this task, you will use Windows PowerShell remoting to install Internet Information Services on WEBFE01. To perform this task, you will use standard Windows PowerShell remoting and administration commands; however, you must first install the Windows PowerShell remoting self-signed certificate installed in your WEBFE01VM. This is because Windows PowerShell remoting relies on HTTPS connections by default.

Perform the following tasks on your SQL01 Server.

  1. In the Azure management portal, click VIRTUAL MACHINES, click SQL01, and then click Dashboard. On the bottom bar, click CONNECT, and then click Open. Click Connect.
  2. When prompted, log on as sysadmin using Passw0rd! as the password. Click yes.
  3. Click on the Folder on the task bar to open Computer. Double-Click Data (C:) Click Home | New Folder type AzureManagement press Enter. You can then close the computer window and the Server Manager window to continue.
  4. Open a web browser on SQL01.
  5. You need to Add sites to your trusted sites.

Start – Click Internet Explorer – Click Tools (Gear in upper right corner) – Internet Options – Security Tab – Trusted Sites – Sites – Type: https://itcmaster.blob.core.windows.net then click Add Type: https://manage.windowsazure.com then click Add –Close – OK

  1. Download and Extract https://itcmaster.blob.core.windows.net/fy15q3/AzureManagement.zip to your SQL01 server in the C:AzureMangement Folder
  2. NOTE: you can just click OK to any security warnings you get
  3. Download https://itcmaster.blob.core.windows.net/fy15q3/AzureManagement.zip by typing the URL into the address bar on your SQL01 server. Click Save as then save to C:AzureMangement Folder
  4. Using File Explorer open the c:AzureManagement folder, right-click on the AzureManagement.zip file; select Extract All. Change the path to C: then click Extract. Close “Local Disk (C:) window. You should have a window up still that is showing you C:AzureManagement
  5. On SQL01, in Server Manager, on the Tools menu, click Windows PowerShell ISE.On the View menu, click Show Scripting pane.
  6. On your SQL01 server, run the C:AzureManagementWindowsAzurePowerShell.3f.3f.3fnew.exe file to install Azure Powershell Extentions
  1. Open Windows PowerShell ISE as Administrator. (Start – Type PowerShell ISE, Right-Click Windows PowerShell ISE – Click Run as Administrator)
  2. From the menu choose File Open to open the script file C:AzureManagementRemote PowerShell Certificate Configuration.
  3. Highlight the script under Part 1, and then press F8.
  4. In the presented web page, log on using your Microsoft Azure account, and then download the PublishSettings file that is presented.
  5. Save the PublishSettings file in the C:AzureManagement folder on the computer.
  6. In the script file, in part 2, replace the text ##Your Script File Path Here## with the full path to your downloaded file, such as “C:AzureManagementFree Trial-6-4-2014-credentials.publishsettings”.

NOTE: If there are spaces in your file name, you will have to wrap the path and filename in quotes (“) as shown in the example

  1. Highlight the script under Part 2, and then press F8.
  1. Highlight the script under Part 3, and then press F8. When prompted, type your unique ID.
  1. In Windows PowerShell, type the following command, and then press ENTER. Replace <ID> with your unique identifier.
  1. You are now presented with a list of ports that are open on WEBFE01. Using the output of the command above, identify the port used for Windows PowerShell.
  2. In Windows PowerShell (or in the PowerShell window of ISE), type the following command, and then press ENTER. Replace <ID> with your unique identifier. Replace <PORT> with the Windows PowerShell port from the previous command output.
  1. In the Password dialog box, type Passw0rd!, and then click OK. Note: if you changed the username and password when you created the machine, you will have to use the username and password you used to create the machine.
  2. In Windows PowerShell, type Hostname, and then press ENTER.
  1. In Windows PowerShell, type the following command, and then press ENTER. This will install a full IIS server.
  1. In Windows PowerShell, type the following command, and then press ENTER. This will restart IIS
  1. On your Local Laptop, using Internet Explorer, navigate to Error! Hyperlink reference not valid. where <ID> is your unique identifier.

Deploy and test the Contoso Data Access sample site

In this task, you will deploy a sample site. The sample web site simulates the types of tasks the Contoso production application performs, and will prove that the Azure infrastructure meets the base technical requirements of the production system.

Perform the following tasks in RDP sessions to WEBFE01.

  1. Switch to the RDP session for WEBFE01.
  2. Using File Explorer, navigate to c:inetpubwwwroot.
  3. Delete all files and folders in this folder.
  4. Using File Explorer, navigate to Navigate to C:AzureMangementWebsite.
  5. Copy all Files and folders from C:AzureMangementWebsite[Website] to C:inetpubwwwroot.
  1. Open the Web.Config file in Notepad, and then locate the following lines.

This connection string provided by the developer of the application assumes a locally installed SQL database, and assumes the locally logged on user has permission to access the database. This is not appropriate for a distributed web application and you will be updating the database location, name, and the credentials used.

<connectionStrings> <add name=”AdventureWorksConnection” connectionString=”data source=.MSSQL14;initial catalog=AdventureWorks;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework” providerName=”System.Data.SqlClient” /> </connectionStrings>

  1. Edit the line so that it reads as follows. Changed information is highlighted in yellow, new information is highlighted in green, and removed information is highlighted in red (in above).

<connectionStrings> <add name=”AdventureWorksConnection” connectionString=”data source=SQL01;initial catalog=test;user id=DataManagementApp; password=Passw0rd!;multipleactiveresultsets=True;application name=EntityFramework” providerName=”System.Data.SqlClient” /> </connectionStrings>

  1. On your Local Laptop computer, using Internet Explorer, navigate to Error! Hyperlink reference not valid..

NOTE: You may have to refresh your browser.

  1. Under Data Management Login, type 12345, and then click Login.
  2. Click Product Listings.

Dan Stolts

Founder and Chief AI Officer of Just In Time AI, with an IT career that began in 1988 -- nearly four decades of experience. Over a decade of that career went into building ITProGuru into a 250,000-uniques/mo IT-community resource, and he now applies the same teach-first approach to AI systems that run real businesses. Full profile →