How to create and deploy an Azure Cloud Service (classic)

Cloud Services (classic) is now deprecated for all customers as on September 1st, 2024. Any existing running deployments will be stopped and shut down my Microsoft and the data will be permanantly lost. New deployments should use the new Azure Resource Manager based deployment model Azure Cloud Services (extended support).

The Azure portal provides two ways for you to create and deploy a cloud service: Quick Create and Custom Create.

This article explains how to use the Quick Create method to create a new cloud service and then use Upload to upload and deploy a cloud service package in Azure. When you use this method, the Azure portal makes available convenient links for completing all requirements as you go. If you're ready to deploy your cloud service when you create it, you can do both at the same time using Custom Create.

If you plan to publish your cloud service from Azure DevOps, use Quick Create, and then set up Azure DevOps publishing from the Azure Quickstart or the dashboard. For more information, see Continuous Delivery to Azure by Using Azure DevOps, or see help for the Quick Start page.

Concepts

Three components are required to deploy an application as a cloud service in Azure:

You can learn more about these components and how to create a package here.

Prepare your app

Before you can deploy a cloud service, you must create the cloud service package (.cspkg) from your application code and a cloud service configuration file (.cscfg). The Azure SDK provides tools for preparing these required deployment files. You can install the SDK from the Azure Downloads page, in the language in which you prefer to develop your application code.

Three cloud service features require special configurations before you export a service package:

To create a cloud service with deployments of web roles or worker roles, you must create the service package.

Before you begin

Create and deploy

  1. Sign in to the Azure portal.
  2. Choose Create a resource > Compute, and then scroll down to and select Cloud Service. Publish your cloud service1
  3. In the new Cloud Service pane, enter a value for the DNS name.
  4. Create a new Resource Group or select an existing one.
  5. Select a Location.
  6. Select Package, which opens the Upload a package pane. Fill in the required fields. If any of your roles contain a single instance, ensure Deploy even if one or more roles contain a single instance is selected.
  7. Make sure that Start deployment is selected.
  8. Select OK, which closes the Upload a package pane.
  9. If you don't have any certificates to add, choose Create. Publish your cloud service2

Upload a certificate

If your deployment package was configured to use certificates, you can upload the certificate now.

Publish your cloud service3

  1. Select Certificates, and on the Add certificates pane, select the TLS/SSL certificate .pfx file, and then provide the Password for the certificate,
  2. Select Attach certificate, and then choose OK on the Add certificates pane.
  3. Select Create on the Cloud Service pane. When the deployment reaches the Ready status, proceed to the next steps.

Verify your deployment completed successfully

CloudServices_QuickGlance

  1. Select the cloud service instance. The status should show that the service is Running.
  2. Under Essentials, select the Site URL to open your cloud service in a web browser.

Next steps