Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I pause an Azure App Service Plan?

Tags:

azure

I thought one of the advantages of Azure was that I could turn services on and off depending on when I want them to be available.

However I cant see how to pause my App Service Plan. Is it possible?

I want to use the S1 tier so that I can play with what it offers. However I want to be able to pause the cost accumulation when I am not using it.

I see from the app service pricing help that an app will still be billed for even though it is in the stopped state.

Yet the link also clearly states that I only pay for what I use. So how does that work?

like image 499
Kirsten Avatar asked Jan 14 '16 01:01

Kirsten


People also ask

How do I stop app service charge?

So there is only one way to stop the billing completely by moving you app service to a Free tier. In-order to do this go to the Scale up (App Service Plan) on the App service and scroll down to the bottom and select the F1 Free tier to apply the change.

Do you get charged for a stopped App Service Azure?

Each Plan can host multiple Web App, and stopping one Web App does not affect the billing for the Plan. To stop the billing, you have to either delete your App Hosting Plan or scale it down to Free.


2 Answers

If you put your hosting plan onto the free tier, you will stop being charged for it. However if you have things like deployment slots and certificates these will be deleted.

The ability to turn services on and off, is more to do with being able to scale services, so if you need 50 servers for an hour you can easily do that.

What you can do to make your solution temporary is to create a deployment script, using Powershell or Resource manager Templates then you can deploy your solution for exactly as long as you need it and then delete it again when you don't. In this sense you can turn your services on and off at a whim.

Azure provides building blocks for you to create the solution you need, it is up to you to figure out how to best use those building blocks to create the solution you seek.

Edited to answer extended question.

If you want to use the S1 pricing plan, and not have it charge when you are not using it, the only way of achieving that is by using automation. Fortunately, this is reasonably trivial to achieve.

If you look at this template it is pretty much all configured to deploy a website from Github to Azure on demand. If you edit that to configure it to your needs you can have a new Azure website online with 2 minutes of running the script.

Then you would have another script that deleted it once you had finished.

Doing it this way you would loose no functionality, and probably learn quite a bit about what is possible with Azure along the way.

App Service Plan

An app service plan is the hardware that a web app runs on. In the free and shared tier your web apps share an instance with other web apps. In the other tiers you have a dedicated virtual machine. It is this virtual machine that you pay for. In that case it is irrelevant whether or not you have web apps running on your app service or not, you still have a virtual machine running and you will be charged for that.

To change the App Service Plan via PowerShell, you can run the following command

Set-AzureRmAppServicePlan -ResourceGroupName $rg -Name $AppServicePlan -Tier Free 
like image 70
Michael B Avatar answered Oct 07 '22 08:10

Michael B


I was able to accomplish this using the dashboard by selecting the App Service Plan, clicking Scale up (App Service Plan), and then from there if you click Dev/Test you can select the Free tier.

like image 32
Eric Avatar answered Oct 07 '22 08:10

Eric