Use the Windows Azure SDK Tools to Package, Run, and Deploy an Application
Updated: November 13, 2013
You can use the tools in the Windows Azure SDK to run, test, debug, and fine-tune your application before you deploy it as a cloud service to Windows Azure. The Windows Azure SDK includes the following tools:
Windows Azure compute emulator – A tool that locally emulates the environment in which cloud services run.
Windows Azure storage emulator – A tool that locally emulates the services of Windows Azure storage.
CSPack – A tool that creates an application package that can be deployed to Windows Azure.
CSUpload – A tool that is used to upload VHD files and service certificates to Windows Azure.
CSEncrypt – A tool that is used to encrypt the password for remote desktop connections.
CSRun – A tool that is used to start the compute emulator with the appropriate application package.
DSinit - initializes Windows Azure storage emulator in the local environment.
For Windows Azure SDK support and retirement information, see Windows Azure SDK for .NET Support and Retirement Information.
Windows Azure Compute Emulator
The compute emulator is a local emulator of Windows Azure that you can use to build and test your application before deploying it to Windows Azure. Some differences exist between running an application in the compute emulator and running it as a cloud service in Windows Azure. For a list of these differences, see Differences Between the Compute Emulator and Windows Azure.
Running a Windows Azure Application Locally
After you install the Windows Azure SDK, you can run the compute emulator by using a menu choice in the Start menu, or you can use the CSRun Command-Line Tool.
Windows Azure Storage Emulator
The Windows Azure storage emulator is as local emulator for Windows Azure storage services that you can use to build and test your application before you deploy it as a cloud service to the Windows Azure. Some differences exist between using the storage emulator and using Windows Azure storage services. For a list of these differences, see Differences Between the Storage Emulator and Windows Azure Storage Services.
Running a Windows Azure Application with the Storage Emulator
You can start the storage emulator when you start the Windows Azure compute emulator by using the CSRun Command-Line Tool, or you can start the storage emulator separately by using a menu choice in the Start menu. Storage is automatically initialized by the storage emulator. You can use the DSInit Command-Line Tool to use a different database instance or to reinitialize the existing database.
Packaging a Windows Azure Application
An application for Windows Azure must include the code that runs in the application and the service model that is used by Windows Azure to define and configure your application to run in the environment. For more information about creating an application that runs as a cloud service, see Cloud Services. You create a ServiceDefinition.csdef file and ServiceConfiguration.cscfg file to define the service model of your application. For more information about creating these files, see Set Up a Cloud Service for Windows Azure.
The compute emulator and Windows Azure use a package file (.cspkg) to run the application. You can create the application package by using the CSPack Command-Line Tool.
Uploading Certificates and Encrypting Passwords for Remote Desktop Connections
If you have the need to use a remote desktop connection with your role instances, you must provide a service certificate and an encrypted password to enable the connection. You can use the CSUpload Command-Line Tool to upload the service certificate and you can use CSEncrypt Command-Line Tool to encrypt the password for the certificate.
Testing Applications in the Compute Emulator
You can use a variety of features to assist you in testing your application in the compute emulator.
Reduce the number of running instances for testing
You may be developing an application that uses many role instances of which Windows Azure can handle easily. Unfortunately, your development computer might not have enough computing power to handle all of the roles running at the same time in the compute emulator.
You can easily increase or decrease the number of instances of a role that is running by modifying the Instances element within the configuration file for the service.
Collect diagnostic data and trace the flow of your application
Windows Azure Diagnostics enables you to collect diagnostic data from a service. You can use diagnostic data for tasks like debugging and troubleshooting, measuring performance, monitoring resource usage, traffic analysis and capacity planning, and auditing. For more information about collecting diagnostic data, see Collect Logging Data by Using Windows Azure Diagnostics. You can view the status of running role instances in the user interface of the compute emulator. For more information, see Trace the Flow of Your Windows Azure Application.