Azure move function app to premium tier using APIM - azure

I'm trying to migrate a Azure Linux/Python function app from the consumption tier to a Elastic Premium tier. It turns out this is not so easy: https://github.com/Azure/Azure-Functions/issues/155 . You basically have to recreate the Function from scratch.
As my function is sitting behind a APIM I thought it might be possible to do this by:
Creating a new ASP with the correct tier
Deploy Function into new ASP
Switch the APIM back end of the API to the new function.
The trouble is I can't figure out how to do that last part. I can't seem to find where this is configured, or how to change it (via the portal or via CLI).
I've even done some splunking in the configs using the new resources front-end https://resources.azure.com/ and can't even find where the APIM configuration for the backends reside.

You just need to go to your APIM, click "APIs" tab, choose your api under "All APIs", click "..." button of your api then import another function app to your APIM api.
For example, I have a api under "All APIs" in my APIM. Its backend is a function app running with consumption plan. Like below screenshot:
Now I want to change the backend of the api to another function app which running with Elastic Premium tier. Just click "..." button of the api, and click "Import" like below screenshot:
Then choose "Function App" and select your new function app.

Related

joining an azure static web app on one repository with the API on another repository

I built a static web app and the html page is on one of my respositories. I built the API and it is on another repository. How do I link the two? Can I link the two? Or should I build a new static web app in the API repository?
You can link an existing Azure Functions app to an Azure Static Web Apps resource using 'Bring your own functions to Azure Static Web Apps'.
Example
Consider an existing Azure Functions app that exposes an endpoint via the following location.
https://my-functions-app.azurewebsites.net/api/getProducts
Once linked, you can access that same endpoint through the api path from your static web app, as shown in this example URL.
https://red-sea-123.azurestaticapps.net/api/getProducts
Both endpoint URLs point to the same function.
Link an existing Azure Functions app
Before you associate an existing Functions app, you first need to adjust to configuration of your static web app.
Set api_location value to an empty string ("") in the workflow
configuration file.
Open your Static Web Apps instance in the Azure portal.
From the Settings menu, select Functions.
From the Environment dropdown, select Production.
Next to the Functions source label, select Link to a Function app.
From the Subscription dropdown, select your Azure subscription name.
From the Function App dropdown, select the name of the existing
Functions app you want to link to your static web app.
Select the Link button.
Deployment
You're responsible for setting up a deployment workflow for your Azure Functions app.
See steps and more info here

Why is Consumption Plan not selectable for me when creating a new Function App?

I'm following the official Microsoft documentation to create my first Azure Function App. My problem is that I cannot create a Function App that uses the Consumption Plan instead of an App Service plan. I only have the option to select one of my App Service plans.
Can somebody explain why I do not have the option to choose the Consumption plan? It's the option I want to use because I think that this option is best for my project.
That's how it should be:
And that's how it looks in my portal:
As you can see the option to choose the "hosting plan" is completely missing for me.
Why is that the case and how can I create a Function app that uses the Consumption plan?

Azure Traffic Manager support with Azure Function Apps

I am trying to use Azure Traffic Manager (GTM) to geographically distribute load to function apps in each region.
I have tried adding an 'app service endpoint' and an 'external endpoint' (including adding the GTM name as a custom CNAME to the function app), but both result in "Error 404 - Web app not found.". The custom CNAME also never adds correctly.
According to the last comment on this post, the ability to do this should now be supported:
Setting up a custom domain with an Azure Function app
I am unable to comment back on the post as I am a new user.
I have tried adding an 'app service endpoint' and an 'external endpoint' (including adding the GTM name as a custom CNAME to the function app)
Azure Traffic Manager is only eligible for use with App Services at the 'Standard' level or above as mentioned here. If your function isn't host in an app plan at the 'Standard' level or above, Azure Traffic Manager will not work.
If you are not using 'Standard' or higher level app plan, Azure Functions Proxies would be a workaround for you. Please check following thread which discuss the similar problem.
Azure Functions Traffic Manager
Here is the quick reference from the answer provided by Dakota Kincer.
So the answer I arrived to after Traffic manager didntsupport Azure functions was to overall build 3 Azure functions. I built an East and a West that has my azure function code on it. Then I built a main Azure Function that has 0 code. It only has Azure proxies on it that route to my 2 other Azure Functions. The route is controlled by a variable in the proxy string that is help in the main API app settings. Using %myvariable% you can set part of the url. When I need to publish I switch the variable to the secondary URL location. Update the Primary and then switch the URL to its original primary location. This will have to work for now till traffic manager is integrated into functions or a better solution arises.
I am unable to comment back on the post as I am a new user.
You could modify your post if you want to provide more information.
Traffic Manager supports Azure functions monitoring. You can enable this by going to TM settings -> endpoints -> add endpoint -> choose Azure endpoint type -> App Service for Target resource type -> under Target Resource choose Function app which you want to monitor.
Most likely you want to be able to access function apps under specific domain domain, for example my-domain.com. For that under Custom Header Settings specify host:my-domain.com. You'll need to setup custom domain in function apps configuration too.

multiple app service plans with single (bizspark) subscription

We have BizSpark subscription with shared app service plan, where we are hosting our product. I need to host another version of the project for testing purpose, which fits into a free tier. I have checked the azure portals, but there is no provision to add a new service plan. does the BizSpark subscription support only one app service plan or am I missing anything?
Because an App Service services is an underlying component to other services, there isn't a simple way to directly create an App Service.
Since the only use case to create an App Service is to put something in it, the logic (I imagine) behind the Portals is that you create the resources you require and and it will create dependent resources within that process.
(Using the New Portal)
In order to create a new App Service plan, presuming you are deploying a new Web App. Click on New, Web + Mobile and then Web App.
When you click on Web App you will get this screen, if you fill in the details, and click App Service plan / Location at the bottom, you will be given the opportunity to select either an existing App Service or to create a new one.
The easiest solution would be to create a new Web app and when asked for App Service create a new one .. or use Azure Resource Manager template to achieve this: https://azure.microsoft.com/en-gb/documentation/templates/.
If it's another version of the App for testing purposes, why not use Deployment Slots? Slots have their custom URL separate from the Production app, separated configuration, domain bindings, it's like an App inside an App. You'll be able (if you want) to even swap the content of the Production environment with the Testing one for example.
And you don't incur in any extra cost because it runs on the resources of the current App Service :)

No pricing tiers?

I'm trying to work through a demo Mobile App project, using Azure's Mobile Services.
Create an iOS app
The instructions point me to Microsoft's Azure Portal, and they simply aren't working for me.
First problem was that the instructions for creating a database didn't seem to work, but I was able to step out and create a new database, and then select that successfully.
What has me stuck now is choosing the pricing tier. It shows a pane titled "Choose your pricing tier", but the pane is empty. No pricing tiers are visible.
Any idea as to what I need to do, in Azure, to configure pricing tiers?

Resources