The focus of this workshop is to learn how to deploy, operate, and integrate Azure API Management with Azure Functions. In this exercise, we will run a script to provision all the infrastructure and cloud assets required for the remaining exercises.
There are two options to run the provisioning script:
- If you are familiar with Azure Cloud Shell or don't want to install the prerequisites on your computer, you can run the script directly from Azure Portal Cloud Shell servive.
- Otherwise, you can use your Azure CLI on your local machine.
Azure Functions Core Tools includes a version of the same runtime that powers Azure Functions runtime. You can run it on your local development computer. It also provides commands to create functions, connect to Azure, and deploy Functions projects.
Perform the following steps to provision the cloud resources:
-
Clone this repo to your local computer or to your Linux Azure Cloud Shell
-
Run the
serverless-apim-setup.sh
script:$ ./serverless-apim-setup.sh -s <SUBSCRIPTION ID>
For example, on Windows:
.\serverless-apim-setup.sh -s "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
This script doesn't require interactions. It will provision the following resources with a randomly-generated suffix:
- serverless-sample Resource Group
- serverlesssample Storage Account
- serverless-sample Application Insights
- serverless-sample-products Azure Function App
- serverless-sample-reviews Azure Function App
Output commands will be saved in
serverless-apim-setup.log
file in the main folder of this repo. All the services will be deployed in the East US region, unless you specify a different region in the location variable in theserverless-apim.sh
file. -
You should have all the services mentioned above deployed in your Azure subscription.
-
For each created Function App:
- Navigate to it in the Azure portal.
- Click on Application Insights in the menu on the left.
- Assign an existing resource - the newly created Application Insights service. You can refer to the official Azure documentation for details.