Publish and Deploy an Application on Windows Azure

In a previous article we looked at how to build a basic Azure application using Visual Studio. We now continue with how to publish and deploy that the application. For this demo we will be deploying a Web Role on Azure.

  1. In the Visual Studio Solution Explorer right click the cloud project and select Publish…
    screen1 Publish and Deploy an Application on Windows Azure
    This will result in Visual Studio rolling up the solution into a package containing two files – a .cspkg file which contains the code for the app and a .cscfg file which is the configuration settings for the app (as shown below). Once this is done, the Windows Azure developer portal will automatically be launched in the browser.


    Publish and Deploy an Application on Windows Azure

  2. In the online Windows Azure developer portal you will already have at least one project name – click on the appropriate project name. We now need to create a hosted service to run the application, so  click New Service:
    Publish and Deploy an Application on Windows Azure
  3. On the Create A New Service page you will be presented with two options – Storage Account and Hosted Services, as we are looking to host and run an application  -  click Hosted Services.
  4. Enter a Service Label which will enable you to identify this hosted service (this will not be visible to the public). The Service Description is optional.
  5. On the Create A Service page enter a Public Service Name for the app. You will also need to configure the Affinity Group settings. Most applications have several parts – databases, storage, processes etc. For optimum performance these should be located as geographically close as possible to eachother.If the application is simply a  standalone app which doesn’t require any other services click the No radio button, otherwise you should create a new Affinity Group and select a geographic region (which should be the region you expect the majority of your application’s traffic to come from). Click Create once this has been done.
    Publish and Deploy an Application on Windows Azure
  6. Azure will now create an environment for hosting the application and you will be shown the main Hosted Service page. Click Deploy…
  7. In the appropriate fields browse to the the configuration and code files which were created by Visual Studio. Enter a Service Deployment Name and click Deploy:
    Publish and Deploy an Application on Windows Azure
  8. The application has now been provisioned and configured but is not yet live and running. To start the application click Run. There will be a pause of several minutes while Azure starts the application. During this phase it will go through two intermediate stages – ‘Initalizing’ (which creates the instances for running the app) and  ‘Busy’ (which wires up the app to the load balancer and tests the app is available). Finally a ‘Ready’ status will finally be displayed and the application is now live.
  9. Click the ‘Web Site URL’ link to see the application running live.





Related Articles:

Twitter Digg Delicious Stumbleupon Technorati Facebook Email

7 Responses to “Publish and Deploy an Application on Windows Azure”

  1. Hi,

    Suppose I want to monitor my application performance and availabilty such that how CPU consumtion/Application Availablibty or other aspects realted to Performance and Service Avaialability ..
    Like we used to monitor by SCOM in .NET Framework/IIS Server etc.

    So in MS Cloud enviroment what features could we monitor ?

    Thanks
    Syed

  2. The Azure diagnostics API can monitor an Azure app (see my article here which introduces the API and runs through a very basic logging example) if this is combined with the Azure service management API (which can configuration elements such as instances) then you should have they monitoring/dynamic configuration that you are looking for.
    I’m planning an article on the service management API soon.

  3. This didn’t work for me.

    1) When I did the publish, I was presented with a page telling me I had to sign up for Windows Live.

    2) I signed up for Windows Live but it still does not work. Now when I publish, I am presented with a sign on screen to Windows Live. After signing on, I am told I have no projects.

  4. I’m not really sure what is happening on this Jon, but it is for sure a signing in or sign-up issue, and Azure is for sure not the easiest thing to sign-up for. If you are properly signed in you should be able to create projects and then have the projects appear in your listing, if this isn’t the case I would just contact Microsoft’s support.

  5. Thanks. Yes that was it. I had a terrible time getting the account to work correctly, but now your tutorial works great! Thanks for your help!!

Trackbacks/Pingbacks

  1. Azure Tutorial – Building a ‘Hello… « Azure Support - 31. Jan, 2010

    [...] That’s it! this has been an extremely brief run through and in later articles we will go into greater depth. Next, we can move on to Deploying the App on Azure. [...]

  2. Add Azure Storage to an Azure Application « Azure Support - 02. Feb, 2010

    [...] previously looked at Creating an Azure App in Visual Studio and then Deploying the App on Azure . The application we built was a very simple one requiring no storage, we now turn our attention to [...]