Deploy a Service in Azure
Updated: October 24, 2014
The Windows Azure SDK provides an environment and tools for developing services to be deployed to Windows Azure. You can use the Windows Azure compute emulator and storage emulator to debug your application and perform mixed-mode testing. Then use the CSPack Command-Line Tool to package the application for deployment to the Windows Azure staging or production environment.
The following figure shows the stages of service development and deployment.
The following sections explain each stage of the service deployment process:
Test your service locally by using the Windows Azure compute emulator
Debug your service in mixed mode
Package your service by using CSPack
Deploy your service by using the Management Portal
You can debug your service locally, without connecting to Windows Azure, by using the compute and storage emulators. The Windows Azure compute emulator simulates the Windows Azure fabric, letting you run and test your service locally to ensure that it writes adequate information to the log. After your service is deployed to the Windows Azure staging or production environment, logging messages and alerts is the only way to gather debugging information. You cannot attach a debugger to a service that is deployed in Windows Azure. For more information about using the compute emulator to debug your service, see Use the Azure SDK Tools to Package, Run, and Deploy an Application.
The storage emulator service simulates the Windows Azure storage services, letting you run and debug code that calls into the storage services and, together with the compute emulator, helps you test your service in the local environment. Once your service is running in the local development environment, you can change your configuration files to connect to Windows Azure and test against the production storage services in mixed mode.
When your service is connected to the Windows Azure production storage services it runs in mixed mode, meaning that the service executes in the compute emulator, but your data is hosted in Windows Azure. Once local testing is complete, using mixed mode lets you test your service in a staging environment.
After you debug your service in mixed mode, you are ready to package it for deployment to Windows Azure.
Once debugging is complete, use the CSPack Command-Line Tool to package your service for deployment to the Windows Azure staging or production environment. The cspack.exe utility generates a service package file that you can upload to Windows Azure by using the Windows Azure Management Portal. The default package name is
<service-name>.cspkg, but you can specify a different name if you choose.
If you have installed the Windows Azure Tools for Microsoft Visual Studio, you can package and deploy your service from within Visual Studio. For more information, see Publishing the Windows Azure Application from Visual Studio.
After you package your service, you can use the Windows Azure Management Portal to create a cloud service that you can deploy to the Windows Azure staging or production environment.
You will need to upload two files:
The service package file that you created with the cspack.exe utility.
The service configuration file, which provides configuration values for your service.
When you upload the service package and configuration file, you will be provided with an internal staging URL that you can use to test your service privately in the Windows Azure staging environment. When you are ready to put your service into production, swap the service from the staging URL to the production URL.
For additional information on creating and deploying a cloud service, see How to Create and Deploy a Cloud Service.
ConceptsManage Deployments in Azure