TechBubbles Microsoft Technology BLOG

Deploying Windows Azure Application Part2

 

In my previous post I have discussed about creating the service accounts which required to create to deploy the windows azure application. This post discusses the second step which is deploying the application management portal. Windows Azure tools for visual studio allows you to create and deploy the service package to Windows Azure using Visual Studio. image

Before deploying the application to the staging environment using management portal, generate the service package using the visual studio

1. Open the ServiceConfiguration.cscfg file in windows azure service project

replace the placeholders [YOUR_ACCOUNT_NAME] with the storage account name which you created in the step1 and [YOUR_ACCOUNT_KEY] with the primary key access value.

   1: <?xml version="1.0"?>

   2: <ServiceConfiguration serviceName="GuestBook" 

3: xmlns="http://schemas.microsoft.com/ServiceHosting/

2008/10/ServiceConfiguration">

   4:   <Role name="GuestBook_WebRole">

   5:     <Instances count="1" />

   6:     <ConfigurationSettings>

7: <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.

ConnectionString"

8: value="DefaultEndpointsProtocol=https;

AccountName=[YOUR_ACCOUNT_NAME];

   9:                AccountKey=[YOUR_ACCOUNT_KEY]" />

10: <Setting name="DataConnectionString"

value="DefaultEndpointsProtocol=https;

11: AccountName=[YOUR_ACCOUNT_NAME];

AccountKey=[YOUR_ACCOUNT_KEY]" />

  12:     </ConfigurationSettings>

  13:   </Role>

  14:   <Role name="GuestBook_WorkerRole">

  15:     <Instances count="1" />

  16:     <ConfigurationSettings>

17: <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.

ConnectionString"

18: value="DefaultEndpointsProtocol=https;

AccountName=[YOUR_ACCOUNT_NAME];

  19:                AccountKey=[YOUR_ACCOUNT_KEY]" />

  20:       <Setting name="DataConnectionString" 

21: value="DefaultEndpointsProtocol=https;

AccountName=[YOUR_ACCOUNT_NAME];

  22:                AccountKey=[YOUR_ACCOUNT_KEY]" />

  23:     </ConfigurationSettings>

  24:   </Role>

  25: </ServiceConfiguration>

2. Generate the package by right clicking on windows azure service project and say publish then you will get the below dialogue box
 
image

Select the option Create Service Package Only and say ok.

After successful generation of service package Visual Studio opens the files in windows explorer

3. Now open the windows azure management portal in browser. Select the Hosted Services that created and click on New Staging Deployment option from the ribbon

image

4. In create new deployment dialogue, select the package location which we have created in the step2. Supply the package file and service configuration file as shown below

image

5. Click Ok to start the deployment. The portal shows you the status of the deployment

image

6. Once the deployment finish, portal assigns a DNS name to the deployment that includes a unique identifier. Once you access the URL you can test the application and determine whether it is working fine or not.

7. Before testing your url , configure your service as shown below select your service from the hosted services and click the configure on the ribbon.

image

8. To increase the instances in configuration select the Edit Configuration option in deployment wizard

image

Click ok to update the configuration

Share this post :

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

Add Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud