- Azure Cloud Service Deployment Slots
- Azure Cloud Service Add Deployment Slots
- Azure Cloud Service Price
- Azure Web App Deployment Slots
- Public Cloud Azure Deployment Planning Se…
Azure Cloud Service - Deploy Cloud Service, using Azure Management Portal. As per the screenshot, given below, the updated package has been uploaded to the Staging Slot. The URL of the staging slot will be http:///cloudapp.net. May 16, 2017 Understanding Deployment Slots — TL; DR. Azure makes it easy, to create deployment slots for App Services. Unlike with other providers. Azure customers can easily perform the following steps: Deploy the web application to an online deployment slot. Run the tests on a deployment slot, within the live environment that potential testers are. In Azure App Services, you can very easily add a deployment slot. This is actually a full-fledged App Service, in this case a Web App, that sits next to you original Web App. This sample script creates an app in App Service with an additional deployment slot called 'staging', and then deploys a sample app to the 'staging' slot. If you don't have an Azure subscription, create a free account before you begin. Use Azure Cloud Shell. Azure hosts Azure Cloud Shell, an interactive shell environment that you can use through your browser. You can use either Bash or PowerShell with Cloud Shell to work with Azure services.
In the Cloud Services area of the Azure portal, you can:
- Update a service role or a deployment.
- Promote a staged deployment to production.
- Link resources to your cloud service so that you can see the resource dependencies and scale the resources together.
- Delete a cloud service or a deployment.
For more information about how to scale your cloud service, see Configure auto-scaling for a cloud service in the portal.
Update a cloud service role or deployment
If you need to update the application code for your cloud service, use Update on the cloud service blade. You can update a single role or all roles. To update, you can upload a new service package or service configuration file.
- In the Azure portal, select the cloud service you want to update. This step opens the cloud service instance blade.
- On the blade, select Update.
- Update the deployment with a new service package file (.cspkg) and service configuration file (.cscfg).
- Optionally, update the storage account and the deployment label.
- If any roles have only one role instance, select the Deploy even if one or more roles contain a single instance check box to enable the upgrade to proceed.Azure can guarantee only 99.95 percent service availability during a cloud service update if each role has at least two role instances (virtual machines). With two role instances, one virtual machine processes client requests while the other is updated.
- Select the Start deployment check box to apply the update after the upload of the package has finished.
- Select OK to begin updating the service.
Swap deployments to promote a staged deployment to production
When you decide to deploy a new release of a cloud service, stage and test your new release in your cloud service staging environment. Use Swap to switch the URLs by which the two deployments are addressed and promote a new release to production.
You can swap deployments from the Cloud Services page or the dashboard.
- In the Azure portal, select the cloud service you want to update. This step opens the cloud service instance blade.
- On the blade, select Swap.
- The following confirmation prompt opens:
- After you verify the deployment information, select OK to swap the deployments.The deployment swap happens quickly because the only thing that changes is the virtual IP addresses (VIPs) for the deployments.To save compute costs, you can delete the staging deployment after you verify that your production deployment is working as expected.
Common questions about swapping deployments
What are the prerequisites for swapping deployments?
There are two key prerequisites for a successful deployment swap:
- If you want to use a static IP address for your production slot, you must reserve one for your staging slot as well. Otherwise, the swap fails.
- All instances of your roles must be running before you can perform the swap. You can check the status of your instances on the Overview blade of the Azure portal. Alternatively, you can use the Get-AzureRole command in Windows PowerShell.
Note that guest OS updates and service healing operations also can cause deployment swaps to fail. For more information, see Troubleshoot cloud service deployment problems.
Does a swap incur downtime for my application? How should I handle it?
As described in the previous section, a deployment swap is typically fast because it's just a configuration change in the Azure load balancer. In some cases, it can take 10 or more seconds and result in transient connection failures. To limit impact to your customers, consider implementing client retry logic.
Delete deployments and a cloud service
Before you can delete a cloud service, you must delete each existing deployment.
To save compute costs, you can delete the staging deployment after you verify that your production deployment is working as expected. You are billed for compute costs for deployed role instances that are stopped.
Use the following procedure to delete a deployment or your cloud service.
- In the Azure portal, select the cloud service you want to delete. This step opens the cloud service instance blade.
- On the blade, select Delete.
- To delete the entire cloud service, select the Cloud service and its deployments check box. Or you can choose either the Production deployment or the Staging deployment check box.
- Select Delete at the bottom.
- To delete the cloud service, select Delete cloud service. Then, at the confirmation prompt, select Yes.
Note
When a cloud service is deleted and verbose monitoring is configured, you must delete the data manually from your storage account. For information about where to find the metrics tables, see Introduction to cloud service monitoring.
Find more information about failed deployments
The Overview blade has a status bar at the top. When you select the bar, a new blade opens and displays any error information. If the deployment doesn't contain any errors, the information blade is blank.
Azure Cloud Service Deployment Slots
Next steps
- General configuration of your cloud service.
- Learn how to deploy a cloud service.
- Configure a custom domain name.
- Configure SSL certificates.
This article includes frequently asked questions about deployment issues for Microsoft Azure Cloud Services. You can also consult the Cloud Services VM Size page for size information.
If your Azure issue is not addressed in this article, visit the Azure forums on MSDN and Stack Overflow. You can post your issue in these forums, or post to @AzureSupport on Twitter. You also can submit an Azure support request. To submit a support request, on the Azure support page, select Get support.
Why does deploying a cloud service to the staging slot sometimes fail with a resource allocation error if there is already an existing deployment in the production slot?
If a cloud service has a deployment in either slot, the entire cloud service is pinned to a specific cluster. This means that if a deployment already exists in the production slot, a new staging deployment can only be allocated in the same cluster as the production slot.
Allocation failures occur when the cluster where your cloud service is located does not have enough physical compute resources to satisfy your deployment request.
For help with mitigating such allocation failures, see Cloud Service allocation failure: Solutions.
Why does scaling up or scaling out a cloud service deployment sometimes result in allocation failure?
When a cloud service is deployed, it usually gets pinned to a specific cluster. This means scaling up/out an existing cloud service must allocate new instances in the same cluster. If the cluster is nearing capacity or the desired VM size/type is not available, the request may fail.
For help with mitigating such allocation failures, see Cloud Service allocation failure: Solutions.
Why does deploying a cloud service into an affinity group sometimes result in allocation failure?
A new deployment to an empty cloud service can be allocated by the fabric in any cluster in that region, unless the cloud service is pinned to an affinity group. Deployments to the same affinity group will be attempted on the same cluster. If the cluster is nearing capacity, the request may fail.
For help with mitigating such allocation failures, see Cloud Service allocation failure: Solutions.
Why does changing VM size or adding a new VM to an existing cloud service sometimes result in allocation failure?
Azure Cloud Service Add Deployment Slots
The clusters in a datacenter may have different configurations of machine types (for example, A series, Av2 series, D series, Dv2 series, G series, H series, etc.). But not all the clusters would necessarily have all the kinds of VMs. For example, if you try to add a D series VM to a cloud service that is already deployed in an A series-only cluster, you will experience an allocation failure. This will also happen if you try to change VM SKU sizes (for example, switching from an A series to a D series).
For help with mitigating such allocation failures, see Cloud Service allocation failure: Solutions.
To check the sizes available in your region, see Microsoft Azure: Products available by region.
Azure Cloud Service Price
Why does deploying a cloud service sometime fail due to limits/quotas/constraints on my subscription or service?
Deployment of a cloud service may fail if the resources that are required to be allocated exceed the default or maximum quota allowed for your service at the region/datacenter level. For more information, see Cloud Services limits.
You could also track the current usage/quota for your subscription at the portal: Azure portal => Subscriptions => <appropriate subscription> => “Usage + quota”.
Resource usage/consumption-related information can also be retrieved via the Azure Billing APIs. See Azure Resource Usage API (Preview).
How can I change the size of a deployed cloud service VM without redeploying it?
You cannot change the VM size of a deployed cloud service without redeploying it. The VM size is built into the CSDEF, which can only be updated with a redeploy.
For more information, see How to update a cloud service.
Why am I not able to deploy Cloud Services through Service Management APIs or PowerShell when using Azure Resource Manager Storage account?
Azure Web App Deployment Slots
Since the Cloud Service is a Classic resource that is not directly compatible with the Azure Resource Manager model, you can't associate it with the Azure Resource Manager Storage accounts. Here are few options:
- Deploying through REST API.When you deploy through Service Management REST API, you could get around the limitation by specifying a SAS URL to the blob storage, which will work with both Classic and Azure Resource Manager Storage account. Read more about the 'PackageUrl' property here.
- Deploying through Azure portal.This will work from the Azure portal as the call goes through a proxy/shim that allows communication between Azure Resource Manager and Classic resources.
Why does Azure portal require me to provide a storage account for deployment?
In the classic portal, the package was uploaded to the management API layer directly, and then the API layer would temporarily put the package into an internal storage account. This process causes performance and scalability problems because the API layer was not designed to be a file upload service. In the Azure portal (Resource Manager deployment model), we have bypassed the interim step of first uploading to the API layer, resulting in faster and more reliable deployments.
Public Cloud Azure Deployment Planning Se…
As for the cost, it is very small and you can reuse the same storage account across all deployments. You can use the storage cost calculator to determine the cost to upload the service package (CSPKG), download the CSPKG, then delete the CSPKG.