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…

    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.






Array
Twitter Digg Delicious Stumbleupon Technorati Facebook Email

No comments yet... Be the first to leave a reply!