5.1 - Web Apps and Functions
In this section we will cover the following topics:
- App Service
- Function Apps
- Logic Apps
- Application Load Balancers and CDN
App Service
Excercise 5.1.1
Expect to spend 45 minutes on this excercise
-
Create a new Resource Group.
- Deploy an App Service Plan
- Create an Azure App Service Plan
- Use Linux OS and the Standard SKU
- Configure autoscaling for the App Service Plan
- Scale-out when CPU saturation goes above 70%
- Remember to create a scale-in rule
- Create an Azure Web App for Containers
- Create a new Web App
- Deploy it to the App Service Plan from the previous step of this excercise
- Use Linux OS and Docker Container for Publish
- Select the default quickstart image or any other image from the docker hub
- Test your new app
- Find the URL that you can use
- Remember that it might be on port 80, not 443!
- Create an Azure Web App for Code
- Create a new Web App
- Deploy it to the App Service Plan from the previous step of this lab
- Use Linux OS, Code for Publish, and the latest PHP as the runtime stack
- Deploy a sample application
- Fork this repo https://github.com/rwiankowski/php-docs-hello-world into your GitHub account (or use something of your own if you have a PHP app for demo purpose)
- In your new App Service, create a new Deployment Slot. I will be calling it Staging.
- In the Staging Slot, use the Deployment Centre to set up deployed using the External Git Provider
- Select the “App Service Build Service” (or KUDU) for the build provider
- Test the App
- Once the app is deployed to the staging slot, browse it
- Then take a look at the production slot
- Change slots, check again
- It GitHub, make some changes to the code
- Browse the production slot again
- Browse the staging slot again
Function Apps
Logic Apps
Application Load Balancers and CDN
Excercise 5.1.2
Expect to spend 30 minutes on this excercise
- Prepare your Dev Environment
- If you don’t have it yet, install VS Code
- Install the Azure Functions extension
- Log into Azure using the extension
- Create a new Function App
- Use the Azure extension to create a new Function App in your subscription
- Use Python 3.11,
- Add a function to the Function App
- Create a new Function Project
- Select Python, v2 programming model and an HTTP trigger
- Use whatever authentication you prefer, Anonymous is OK
- Deploy the Function
- Explore the function_app.py file, ensure the HTTP trigger function is there
- If yes, use the extension to deploy the App to the resource you created in step 3
- Once deployed, find the URL to call your function and test it.
< Part 5 Index | Home - Course Contents | 5.2 - Running Containers in Azure > |