Deploy and run your Cloud Application project - Deploy Your Windows Azure project to Windows Azure


This article helps you to deploy and run your Cloud Application through Visual Studio 2008/2010.

Introduction

   
Before starting, refer to the articles how to create your first Cloud Application and how to setup


   Windows Azure platform or subscriptions.

   
By selecting second option (Deploy Your Windows Azure project to Windows Azure), we can

   directly publish your project to Windows Azure.

   We need to setup three important things before starting to publish the project to Windows Azure.

   1. A valid subscription ID (refer above article, how to setup Windows Azure subscription).

   2. A Hosted Services (We  need deployment environments like Staging and Production, so we can deploy your project)

   3. A Storage Account (During publish, the service package is first uploaded to a blob through the storage account to get deployed)

   Lets start publishing the project through Visual Studio 2008/2010. Login to https://windows.azure.com/ with your

  valid credentials.

Getting Started

   Step 1:

      
How to setup a Windows Azure Hosted Sevice

     Click on "New Hosted Service". Following window will open, enter details and select Deployment options as 
"Do not deploy". 

      This will just create an Hosted Service on Windows Azure instead of other deployments which not needed in this stage.
      
       1.png     2.png

        Now your Hosted Services are created.
   
        3.png

   Step 2:

      
How to setup a Windows Azure Storage Account

     Click on "New Storage Account", enter details and submit.

      4.png            5.png

      6.png 
      
      Now your Storage Account is created.      

   Step 3:

      Visual Studio needs to communicate with the Windows Azure to deploy the projects on Hosted Service, so we need to pass credentials.

      How to create Credentials

      Right click on the project and select "Publish". Select the second option from Deploy Window. Click Hosted Service: <Not connected> to expand.

       Under Credentials tab, either select Manage all available credentials or Add a new one. Click on "Add" link. A new authentication window will get opened.

       Select the tab and click on "Create" link. Enter a friendly name for the new Certificate which has your credential details and click "OK".
                            
       7.png
 

      
      Now the important part. We need to upload this credential certificate to the Windows Azure to get authenticated so that we can deploy our project successfully.

      Click on the link "Copy the full path" from Authentication window, second option. This will create and copy the credential certificate into the temp folder.

      Open a notepad and paste the temp folder path. The path looks as below.

      8.png

      9.png

      Now go back to (Windows Azure Management Portal - https://windows.azure.com/). Click on "Management Certificates" section and

      select "Add Certificates". A new window will open asking for the certificate path. Browse the path from temp folder and save. 

      This will create a new certificate. Now copy the subscription ID on right side of window and paste back to Visual Studio authentication 

      window tab 3 (above IMG 1) and click "OK".
   
      10.png

               11.png


               It will take a minute to process. After successful completion we can select the deployment environment and storage account from tabs and submit.

               12.png

               Now the deployment of your project has started on Windows Azure. This will take around 5 to 10 minutes. You must have an 

               Internet connection for all the above steps. You can view the ongoing process status in Visual Studio (Windows Azure  Activity Log)

               and also on portal. 

               13.png

               After successful deployment you can click on the URL (IMG 3) to access your application. Here we go: your website got opened.

Summary

      Hope everyone got deployed your application on Cloud and this article helped you. Please comment!