Day 90: Azure Cloud Service with Web Role and Worker Role for IT Pros (Part 2)

Welcome to Day 90 of the “100 Days of DevOps with PowerShell”! For background on our goals in this series, see Announcing the “100 Days of DevOps with PowerShell” Series here at SCC. If this is the first time you are viewing an article of the series and you are new to DevOps and PowerShell Desired State Configuration (DSC), I encourage you to read through the previous installments, particularly Day 1.

Assumptions

This article assumes the following are true:

 

Objectives

In this installment, we will continue our work from last week with the Contoso Ads sample application, this time deploying this simple Azure Cloud Service with Web Role and Worker Role to your Azure subscription using Visual Studio. This post is the second of four parts in this series-within-a-series:

The idea here is to allow you to work with a sample cloud service you can practice with that includes a variety of Azure components (Worker Role, Web Role, Azure SQL, etc.) so you as an IT Pro preparing for the world of DevOps can get comfortable with Azure PaaS and in this case, Visual Studio 2013 for deployment.

Preparing to Deploy the Solution to Azure

Before deploying the Contoso Ads sample application (Cloud Service with Web and Worker Roles with Azure SQL DB backend), you have to configure components in your Azure subscription through the portal. You will also need to configure a few settings within the application in Visual Studio. The high level steps are:

  • Create an Azure cloud service
  • Create an Azure SQL database
  • Create an Azure storage account
  • Configure the solution to use your Azure SQL database when it runs in Azure
  • Configure the solution to use your Azure storage account when it runs in Azure
  • Deploy the project to your Azure cloud service

Complete the step-by-step instructions for configuring the Contoso Ads solution following the instructions at http://azure.microsoft.com/en-us/documentation/articles/cloud-services-dotnet-get-started/#deploy-the-application-to-azure. Go step through those one-by-one to prepare for deployment before continuing. NOTE: I named my cloud service and storage account ContosoAdsXX (where XX was the first numeric combination that was not already taken) so my deployed resources are easy to find.

Deploy the Solution to Azure

To deploy the solution, return to Visual Studio and from the View menu, select Solution Explorer. Right click the ContosoAdsCloudService node and select Publish. image Complete the fields in the Settings screen Publish Azure Application wizard (shown below). With applications Azure Cloud Services (PaaS), you have two deployment slots: Production and Staging. In this case, I chose Production for the environment. Because we are now deploying to Azure rather than locally (as we did in Day 86), Service configuration should be “Cloud”. SNAGHTMLbb1e7f1 On the Summary screen, review your selections and click Publish. Deployment progress is shown in the Microsoft Azure Activity Log at the bottom of your Visual Studio interface. If you leave the instance count for the Web and Worker Roles at 1, the deployment takes around 5 minutes in my experience. image When complete, click the Open in Server Explorer link to view the deployment details in Azure within your Visual Studio interface. image Click the URL under the Website URL in the Microsoft Azure Activity Log section of your Visual Studio interface to launch the Contoso Ads application. image

Conclusion

That’s it for the second installment of this four part mini-series on Azure Cloud Services, Web and Roles. I hope you are getting more comfortable with the Visual Studio interface and Microsoft Azure PaaS application concepts in the process. In the next installment (Day 91), you will take the next step, build a package and explore how to deploy this solution to Azure with PowerShell!

Previous Installments

To see the previous installments in this series, visit “100 Days of DevOps with PowerShell”.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.