New or existing App service plan in Azure deployment - azure

When I publish an api to azure from visual studio I see an existing app-service plan and also an option to create a new plan. The api I am going deploy will be used by the web application which was deployed using the existing service.
I have the following questions:
If I use the existing plan what would happen to the sites which are
already deployed using that plan?
Should I create new or use
existing?
Cost-wise which is the best option?

By using the same service plan to host the web app and the api, nothing will happen to the existing website besides you won't have any extra cost. The web apps will share the same resources.
If you create a new service plan for you api, you will have extra cost depending on the pricing tier you need.
The choice can depend on your scaling needs. If you need to define differents scaling plan for the api and the web app, it's a good idea to use two services plan, if not an unique service plan can be used.

Related

Change App Service Plan from Isolated to Isolated V2 Plan for a Web App

We want to change the App Service Plan of an existing Azure Web App, from Isolated Service Plan to Isolated "v2" Service Plan. There are no changes in Subscription, Resource Group or Region. One condition for us is, we want to continue using same the Web App with the Plan alone changed. Please let me if this possible and how can we change this.
I could see the "Change App Service Plan" option in Azure Portal but I am unable to exactly find it out regarding the Plan change by dabbling in it.
We are able to create the required Isolated V2 Plan separately but we are unable to switch the Web App to the new Plan so far.
Referring the Microsoft documentation, I keep coming across that different kinds of App Service Environments(ASE) are used for the above Plans, it is not clear due to different ASEs, the Plan change is possible or not.
For quick reference, I have sketched out my query below:
Azure Web App : Web-App-1
App Service Plan : Isolated Service Plan
to
Azure Web App : Web-App-1
App Service Plan : Isolated V2 Service Plan
(Same Region, Subscription and Resource Group)
when you try and change to the new ASP, Azure will perform a check to see if it is a valid move, so as long as you can see it in the destination combo box uner the change app service plan option you can try and let azure evaulate if the move is possible.
If you cannot see it as a destination then you might be able to clone the ASP because the two ASP's you have might be in a different webspace which you cannot do anything about.
Change App Service Plan from Isolated to Isolated V2 Plan for a Web App
I keep coming across that different kinds of App Service Environments(ASE) are used for the above Plans, it is not clear due to different ASEs, the Plan change is possible or not.
The private environment used with an Isolated plan is called the App Service Environment v2 and with Isolated v2 Service Plan is called the App Service Environment v3.
Apps can only move between plans that are created in the same webspace, where webspace is a internal deployment unit of App Service Plan.
Apps cannot be moved between plans in different App Service Environments.
Make sure you created the App Service Environment v3 to change your web app to Isolated V2 SKU.
To know more information on changing the app service plans along with its SKU Sizes and its limitations, please refer this Microsoft Documentation and regarding the app service environments versions of Isolated Plans, refer App Service pricing.

Azure Deployment Slots with multiple websites hosted under one App Service plan

I am in the process of moving multiple websites to Azure under one Premium App Service plan. Following the instructions provided here https://dotnetthoughts.net/deploying-multiple-application-in-webapp/ I was able to host multiple sites under one App Service Plan but I am struggling to figure out how I can make use of Deployment Slots for multiple sites. It looks like there is only one "Production" Slot per App Service plan which means I can only swap a Deployment Slot with the only Production Slot. Does someone know how each website can have a Production Slot and a corresponding "Testing" Slot?
You can have multiple web apps under a single Azure App Service Plan. Meanwhile, under every web app(App Service), you can create multiple slots and you can have production and staging for every web app separately.
Each App Service plan tier supports a different number of deployment slots. Azure App Service Plan Premium (v2) supports = 20 and standard supports = 5 deployment slots.
Based on your requirement you can put all your apps in one App Service plan and have multiple deployment slots. If you have multiple deployment slots for an app, all deployment slots also run on the same VM instances.
Since you pay for the computing resources your App Service plan allocates, you can potentially save money by putting multiple apps into one App Service plan. You can continue to add apps to an existing plan as long as the plan has enough resources to handle the load. However, note that the apps in the same App Service plan all share the same compute resources. Overloading an App Service plan can potentially cause downtime for your new and existing apps.
You don't get charged for using the App Service features that are available to you (configuring custom domains, SSL certificates, deployment slots, backups, etc.)
Checkout this document for more details: https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots

Can Azure Functions live on the same App Service as a WebAPI, for example?

I want to consolidate a collection of Azure Functions and a WebAPI on the same App Service. Can't figure out the best way to go about it and be able to manage both solutions in the portal.
An App Service plan supports multiple resources deployed to it: Function apps, Api apps, Web apps, etc. There shouldn't be any issue doing this.
Each app deployed to a service plan will get its own uri and local storage, but will share the app service plan's capacity (e.g. if you have an S2 plan running on 3 instances, all of your deployed apps to that App Service plan will run on all 3 instances, utilizing the resources of the S2-based instances).
Instances of the same app share disk resources. Your different apps are isolated from each other.
You can't run them in the same site (ie, with the same URL like mysite.azurewebsites.net). Although you could use Function Proxies to forward out part of the function url namespace to the WebAPI. Your azure function and WebAPI would be 2 separate entities in the portal, similar to having 2 separate WebAPIs.
As others have said, this is possible.
For the function app, you need to choose "app service plan", not "consumption based".
You also need to have an app service plan which isn't on the Free or Shared tier. i.e. it has to be a minimum of B1 - no minutes/hour usage limits.

Can Azure CloudServices (Web Role) be provisioned using ARM Template? [duplicate]

My understanding so far on PaaS deployment using WebRoles or Worker Roles-
Spinning Web roles or Worker roles will create Cloud service to manage it.
However, in ARM resource group, their is no concept of Cloud service, then how are web & worker roles managed in ARM resource group?
Also I tried adding the webroles via JSON Outline in VS 2015, but no option to add webroles. So not sure if you can deploy webroles via JSON template?
Any information will be of great help.
Cloud Services have been around since the beginning of Azure.
To the deploy or manage them, you have to use the old APIs (Azure Service Management).
As far as I know, they won't be migrated to the new APIs (Azure Resource Manager), but you could use Virtual Machine Scale Sets instead.
Azure Resource Manager Web apps rely on the concept of App Service Plans, rather than cloud services. Basically this is the underlying VM(s) that the service runs on. You can specify the size and number of servers that make up the App Service plan, and then deploy on to those as a single unit.
You create an App service plan, then run web / worker roles inside that (as well as Logic, API, Functions)
As far as Web / Worker roles are concerned, App Service Plans do not draw a distinction between the two. You simply deploy code to it and it will run it however it is packaged. See here
The concept of cloud services simply don't exist within the Azure Resource Management model.
You can find a template for deploying a Web App here

How to create or see existing App Service Plans in Azure portal and modify them?

I am trying to determine Azure portal provides any option to create an App Service Plan in a separate step (not while creating the website) and to modify them.
Currently I am creating App Service Plans in the WebSite creation step and modify them in WebSite's Scale option.
Is there any way to create them separately and see a list of available
App Service Plans?
Do websites created within an App Service Plan share the resources in it (CPU, Memory etc)?
What exactly happens when there is an auto scale up?
a.) Will it create a new instance of the App Service Plan and replicate all the websites within it?
b.) or will it create a new instance of the website and share the resources of same App Service Plan?
I am confused because, the App Service Settings (pricing tiers, scale-up option etc) are seen in websites scale option.
Please clarify my doubts.
Thanks in advance.
See page 8 of Developing Microsoft Azure Solutions Exam Reference for 70-532.
"Web hosting plans are created as part of website creation and are not created directly"
Even though this book was published in Feb 2015 some of the terminology is already out of date. It's an "application service plan", not "web hosting plan". And they call what is now known as a "web app" a "website".
Here is an awesome blog post about setting up azure web apps and deployment slots and hosting plans. It goes over what's shared and how to migrate between application service plans about halfway through.
Found this article which explains about App Service Plans in detail.

Resources