Publishing to Windows Azure using Windows Azure Service Management API.

In many cases publishing to the Windows Azure is fairly straight forward and has become even more so with the completely integrated Windows Azure Service Management API.  Prior to the API being enabled you had to create a package and deploy the package manually to the Cloud by selecting your Package and Configuration file.  This is no longer the case with the Windows Azure Services Management API.

In addition, the Windows Services API seems to be a bit more integrated into Windows Azure.  This could just be my perception of the services, but it seems that when I “cancel” or want to stop an already existing publish that it work faster using the API.  I have also seen cases were the Cloud Services dashboard appears to be a bit behind with the status of the deployment.

In this post I will provide the information you will need in order to setup the Windows Azure Service Management API as this service requires the registration of a client side certificate and subscription ID.  Below you will find screenshots of each step and the final result of a publish using the Management API.

Note:

  • When publishing with the Management API it also provides an automatic label so that you can easily track your deployments.
  • Before you being the following steps below, please either open your Windows Azure project or Create a New One and then follow the steps below.

 

Figure 1.00 – Publish to Azure using the Management API – Publish

Right click on your Cloud Project and Click Publish

CloudPublish1.00

Figure 1.01 – Publish to Azure using the Management API – Add New Hosted Service Credential

In the publish Cloud Service Dialog click on the Credentials Dropdown and Click “Add”

CloudPublish1.01

Figure 1.02 – Publish to Azure using the Management API – Add New Hosted Service Credential

An authentication dialog will be shown prompting you “Select” or “Create” a certificate that will be used for authentication of the Management API.  I suggest you create a “New” certificate.

CloudPublish1.02

Figure 1.03 – Publish to Azure using the Management API – Create New Authentication Certificate

In the Authentication certificate dropdown click on “Create” 

CloudPublish1.03

Figure 1.04 – Publish to Azure using the Management API – Enter a Friendly Name for your Authentication Certificate

Enter a Friendly Name for your Authentication Certificate

CloudPublish1.04

Figure 1.05 – Publish to Azure using the Management API – Certificate Created.

Now that you have created the certificate the next step will be to upload the certificate to the Cloud and associate it with your Subscription. 

CloudPublish1.05

Figure 1.06 – Publish to Azure using the Management API – Copy Certificate Path

To save time click on the Copy Certificate Path link as shown below.

CloudPublish1.06

NOTE:

For these next steps you will need to login to your Windows Azure Account.

Figure 1.07 – Publish to Azure using the Management API – Managing My API Certificates

  1. Login to Windows Azure
  2. Click on your Azure Services
  3. Click on the Account Tab
  4. Click on the “Manage My API Certificates” Link

CloudPublish1.07

 

Figure 1.08 – Publish to Azure using the Management API – Paste the Copied Certificate Path

  1. Click in the Textbox Area or Click on the Browse button
  2. Paste in the path to the certificate your generated earlier.

CloudPublish1.08

 

Figure 1.09 – Publish to Azure using the Management API – Certificate Verification

Once you have uploaded your certificate you are just about finished.  Verify that your certificate was installed as shown below.

CloudPublish1.09

Figure 1.10 – Publish to Azure using the Management API – Certificate Verification

  1. Next click back on the Account Tab
  2. Then locate and select your Subscription ID
  3. Once you have selected your Subscription ID navigate back to your Visual Studio 2010 Windows Azure Project where the dialog is still shown and paste in the Subscription ID as shown below. 

CloudPublish1.10

Figure 1.11 – Publish to Azure using the Management API – Management API Services Enabled

Once you have completed the steps above the Management API Deployment Services should be connected to your Windows Azure Cloud Services and show you a list of available deployment options.

CloudPublish1.11

Note: When using the API by default the Deployment Wizard will add a Label so that you are able to track your deployments.

Figure 1.12 – Publish to Azure using the Management API – Deployment – Cancel

At this point you should be all set to use the Management API to publish your Cloud Application.  One of the nice features with using the Management API is the ability to Cancel/Stop or a deployment process.  While you can do this using the Azure Dashboard, I have found that using the API seems to be a bit more integrated or simply just work faster.  Judge for yourself, but this is a very nice feature that is completely seamless.

  CloudPublish1.12

Figure 1.13 – Publish to Azure using the Management API – Deployment Successful

At this point everything should be setup and enabled so that you can deployment you Cloud Application using the Windows Azure Management API.

CloudPublish1.13

 

Enjoy…..

Published Wednesday, November 17, 2010 11:47 PM by seaniannuzzi

Comments

# re: Publishing to Windows Azure using Windows Azure Service Management API.

Thursday, November 18, 2010 6:32 PM by fallen888

Nice.

# re: Publishing to Windows Azure using Windows Azure Service Management API.

Friday, November 19, 2010 4:05 PM by seaniannuzzi

Thought this would be a useful post.  I find using the management API is much better then having to create a package and perform the steps manually.