Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand

Deploying the Web Role

Posted by JP on October 14, 2011


After developing the web role, we have to package it and deploy to the cloud. The entire steps in this are:

  • Create Web Role
  • Create Package
  • Deploy to Cloud

Creating the web role is performed in the previous article. Now we need to do the following steps.

Create Package

For creating the package, right click on the project context menu and click Package.

clip_image002

Now as dialog box will be appearing, leave the default options selected and click the Package button on the dialog.

clip_image004

After performing the packaging, the folder containing package is opened in a new explorer window automatically.

clip_image006

There are two files in the folder as shown above:

  • Configuration File
  • Service Package File

The Configuration file contains the instance count, application setting entries etc.

Deploy to Cloud

The deploying part contains deploying the package file and the configuration file. For deploying the files, we need to sign in to the Windows Azure Portal.

After signing in, click on the New Hosted Service button from the left top panel. The following dialog box appears.

clip_image008

Detailing Input Fields in Dialog Box

The subscription list automatically selects the default subscription (trial).

In the service name text box, enter a name for the service.

In the service URL prefix text box, enter a unique prefix name.

In the region, select an appropriate region of deployment.

Enter an appropriate deployment name in the final text box.

Select Package

Now, we need to specify the Package location and Configuration file. Use the Browse locally… button for these and select the files from your local machine.

After specifying all the inputs, click the Ok button. (In case of instance warning box, click Yes to override it for time being)

Now you can see that the entry is shown as preparing to upload in the list.

clip_image010

Waiting for Upload Operation

We need to wait a few minutes for the upload operation to be completed. After the upload operation is completed the instance will be started.

After all the operations are completed the status will turn to ready as show in the image below:

clip_image012

Getting the Deployed Url

For viewing the deployed web role we need to get the url. For this select the Deployment 1 row from the list above.

clip_image014

From the property pane on the right we can see the DNS name.

Viewing the Deployed Web Role

Clicking on the DNS name link from the properties the web role will get opened in the browser as shown below (please note the staging url)

clip_image016

Summary

In this article we have seen how to package and deploy a web role to windows azure hosting.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s