Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Developing Solutions for Microsoft Azure AZ-204 Exam Guide

You're reading from   Developing Solutions for Microsoft Azure AZ-204 Exam Guide A comprehensive guide to passing the AZ-204 exam

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781835085295
Length 428 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Paul Ivey Paul Ivey
Author Profile Icon Paul Ivey
Paul Ivey
Alex Ivanov Alex Ivanov
Author Profile Icon Alex Ivanov
Alex Ivanov
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Chapter 1: Azure and Cloud Fundamentals 2. Chapter 2: Implementing Azure App Service Web Apps FREE CHAPTER 3. Chapter 3: Implementing Containerized Solutions 4. Chapter 4: Implementing Azure Functions 5. Chapter 5: Developing Solutions That Use Cosmos DB Storage 6. Chapter 6: Developing Solutions That Use Azure Blob Storage 7. Chapter 7: Implementing User Authentication and Authorization 8. Chapter 8: Implementing Secure Azure Solutions 9. Chapter 9: Integrating Caching and Content Delivery within Solutions 10. Chapter 10: Monitoring and Troubleshooting Solutions by Using Application Insights 11. Chapter 11: Implementing API Management 12. Chapter 12: Developing Event-Based Solutions 13. Chapter 13: Developing Message-Based Solutions 14. Chapter 14: Accessing the Online Practice Resources 15. Other Books You May Enjoy

Exercise 1: Creating an App Service Plan

In this exercise, you will explore the Azure portal by creating an App Service plan. This will make it easier to understand the configuration options:

  1. Either navigate from https://portal.azure.com to Create a resource and select App Service plan or use the following URL to jump straight to it: https://portal.azure.com/#create/Microsoft.AppServicePlanCreate.
  2. Select your subscription from the Subscription dropdown and select an existing resource group from the Resource Group dropdown, if you have one that you’d like to use. Alternatively, select the option to create a new one.
  3. Enter the desired name for your App Service plan, select Windows for the Operating System option, and select your region, as shown in the following screenshot:
Figure 2.2: App Service plan details within the Azure portal

Figure 2.2: App Service plan details within the Azure portal

  1. Click on the Explore pricing plans link to be taken to a different kind of specification picker than you might be used to from other resource types. You’ll be able to see the different pricing tiers available and their respective VM compute resources using Hardware view, as shown in Figure 2.3:
Figure 2.3: App Service plan hardware view

Figure 2.3: App Service plan hardware view

From within Feature view, you can see the different features that are available for the various tiers, as shown in Figure 2.4:

Figure 2.4: App Service plan feature view

Figure 2.4: App Service plan feature view

  1. You are going to be making use of deployment slots, also known as staging slots, and autoscale in this chapter, so select the least expensive Production tier that provides these features. For this example, that’s Standard S1, as shown in the following figure:
Figure 2.5: Standard S1 production tier App Service plan feature view

Figure 2.5: Standard S1 production tier App Service plan feature view

  1. After selecting an appropriate App Service plan tier that includes staging slots and autoscale, click on Select.
  2. Notice that, depending on which tier you selected, the option to enable Zone redundancy is disabled. This is because that’s only available in higher tiers. Make a note of the SKU code, not the name. In this example, the SKU code is S1, not just Standard:
Figure 2.6: Pricing tier SKU code and zone redundancy options

Figure 2.6: Pricing tier SKU code and zone redundancy options

  1. Click on Review + Create and select Create to provision the new App Service plan. Once completed, go into your new App Service plan and look through the available settings. You will be able to see any apps running within the plan, storage use, networking settings, as well as horizontal and vertical scaling options.
  2. Open a session of your preferred terminal, make sure you’re logged in, and set it to the right subscription.
  3. Create a Linux App Service plan using the following CLI command:
    az appservice plan create -n "<plan name>" -g "<resource group>" --sku "<SKU code>" --is-linux

    Alternatively, use the following PowerShell command:

    New-AzAppServicePlan -Name "<plan name>" -ResourceGroupName "<resource group>" -Tier "<SKU code>" -Location "<region>" -Linux

    While the CLI accepts but doesn’t require a location, because it will inherit from the resource group, PowerShell requires the location to be specified.

Now that you have explored the App Service plans that provide the underlying compute resources for your apps, you can move on to App Service web apps and put these App Service plans to good use.

App Service Web Apps

Originally, App Service was only able to host web apps on Windows, but since 2017, App Service has been able to natively host web apps on Linux for supported application stacks. You can get a list of the available runtimes for Linux by using the following CLI command:

az webapp list-runtimes --os-type linux -o tsv

The versions you see relate to the built-in container images that App Service uses behind the scenes when you use a Linux App Service plan. If your application requires a runtime that isn’t supported, you can deploy the web app with a custom container image. If you want to use your own custom containers, you can specify the image source from various container image repository sources. As you won’t see any container examples in this chapter, you are not required to do that here.

You have been reading a chapter from
Developing Solutions for Microsoft Azure AZ-204 Exam Guide - Second Edition
Published in: May 2024
Publisher: Packt
ISBN-13: 9781835085295
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime