Developing Solutions for Microsoft Azure AZ-204 Exam Guide - Paul Ivey - E-Book

Developing Solutions for Microsoft Azure AZ-204 Exam Guide E-Book

Paul Ivey

0,0
32,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Get ready to delve into Microsoft Azure and build efficient cloud-based solutions with this updated second edition. Authored by seasoned Microsoft trainers, Paul Ivey and Alex Ivanov, this book offers a structured approach to mastering the AZ-204 exam topics while focusing on the intricacies of Azure development.
You’ll familiarize yourself with cloud fundamentals, understanding the core concepts of Azure and various cloud models. Next, you’ll gain insights into Azure App Service web apps, containers and container-related services in Azure, Azure Functions, and solutions using Cosmos DB and Azure Blob Storage. Later, you'll learn how to secure your cloud solutions effectively as well as how to implement message- and event-based solutions and caching. You’ll also explore how to monitor and troubleshoot your solutions effectively. To build on your skills, you’ll get hands-on with monitoring, troubleshooting, and optimizing Azure applications, ensuring peak performance and reliability. Moving ahead, you’ll be able to connect seamlessly to third-party services, harnessing the power of API management, event-based solutions, and message-based solutions.
By the end of this MS Azure book, you'll not only be well-prepared to pass the AZ-204 exam but also be equipped with practical skills to excel in Azure development projects.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 596

Veröffentlichungsjahr: 2024

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Developing Solutions for Microsoft Azure AZ-204 Exam Guide

Second Edition

A comprehensive guide to passing the AZ-204 exam

Paul Ivey

Alex Ivanov

Developing Solutions for Microsoft Azure AZ-204 Exam Guide

Second Edition

Copyright © 2024 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Authors: Paul Ivey and Alex Ivanov

Reviewer: Massimo Bonanni

Publishing Product Manager: Sneha Shinde

Editorial Director: Alex Mazonowicz

Development Editor: Richa Chauhan

Presentation Designer: Salma Patel

Editorial Board: Vijin Boricha, Megan Carlisle, Simon Cox, Ketan Giri, Saurabh Kadave, Alex Mazonowicz, Gandhali Raut, and Ankita Thakur

First Published: October 2022

Second Edition: May 2024

Production Reference: 1150524

Published by Packt Publishing Ltd.

Grosvenor House

11 St Paul’s Square

Birmingham

B3 1RB

ISBN: 978-1-83508-529-5

www.packtpub.com

Contributors

About the Authors

Paul Ivey, is an experienced engineer, architect, and trainer, specializing in Microsoft technologies, both on-premises and in the Azure cloud.

In his five years at Microsoft, Paul has been a secure infrastructure engineer and app innovation engineer and has helped hundreds of enterprise customers adopt DevOps practices and develop solutions for Azure. Paul is now a Microsoft Technical Trainer, providing training for Microsoft customers to help them with preparing to pass Azure exams, including the AZ-204 exam.

Originally from Devon in the UK, Paul currently lives in Cheltenham in the beautiful Cotswolds area of England. In his spare time, Paul is a keen PC gamer and enjoys traveling abroad to experience foreign sights, cultures, and food (mostly food).

LinkedIn profile: https://www.linkedin.com/in/paul-msft/

Alex Ivanov is an experienced cloud engineer with a primary focus on supporting companies in their journeys to adopt Azure services. Alex has worked for Microsoft for eight years as a cloud support engineer and four years as an Azure Technical Trainer.

Alex is an expert in software engineering and digital transformation who has helped many customers to migrate their solutions to Azure. His experience has helped him gain multiple certifications in software development, AI, and data platforms. As a professional trainer, Alex has already educated thousands of clients and helped them to prepare for and pass the Azure certification exams.

In his free time, while not being jumped on by his three kids, he enjoys camping, boating, running, and building RC models.

LinkedIn profile: https://www.linkedin.com/in/alex-ivanov-703520b2/

About the Reviewer

Massimo Bonanni is a renowned Italian trainer, speaker, and writer with a deep passion for all things tech.

With more than 25 years of experience in the IT sector, Massimo has cultivated a vast knowledge base and expertise that he has enthusiastically shared through over 200 technical sessions at conferences in the last 10 years. He founded and managed two communities in Italy, which fostered learning and discussion among tech enthusiasts.

Formerly recognized as a Microsoft Most Valuable Professional (MVP) in development tools and Windows development, he has also earned accolades as an Intel Black Belt and Intel Innovator.

He is also a Microsoft Certified Trainer and is working at Microsoft as a Technical Trainer, delivering courses for their customers and partners.

In his spare time, Massimo loves to create amazing things with (and trip over) Legos. He currently lives in Rome, the amazing eternal city!!

I would like to thank my wife Floriana and my family for their patience and the support they give me in my work. Without their contribution, everything would be much more difficult.

Table of Contents

Preface

1

Azure and Cloud Fundamentals

Making the Most Out of This Book – Your Certification and Beyond

Technical Requirements

Understanding the Benefits of Cloud Computing

Reviewing Cloud Deployment Models

Examining Cloud Service Models

Exploring the Core Concepts Of Azure

Regions and Availability Zones

Azure Resource Manager

Resource Providers and Resource Types

Azure CLI and Azure PowerShell

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

2

Implementing Azure App Service Web Apps

Technical Requirements

Exploring Azure App Service

App Service Plans

Exercise 1: Creating an App Service Plan

App Service Web Apps

Exercise 2: Creating a Basic Web App Using the Azure Portal

Authentication and Authorization

Exercise 3: Configuring App Service

Networking Features

Configuring App Settings and Logging

Application Settings

Exercise 4: Configuring Applications in App Service

Logging

Exercise 5: Implementing and Observing Application Logging

Scaling App Service Apps

Exercise 6: Configuring Autoscale in Azure App Service

Leveraging Deployment Slots

Exercise 7: Mastering Deployment Slots

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

3

Implementing Containerized Solutions

Technical Requirements

Understanding Containers

Docker

Exercise 1: Creating and Using Containers

Task 1: Using an Existing Container Image

Task 2: Building a Container Image and Running a Container

Task 3: Running a Containerized Web Application

Managing Container Images in Azure Container Registry

Exercise 2: Managing Images in ACR Using the Docker CLI

Task 1: Creating an Azure Container Registry

Task 2: Building and Pushing a Container Image to ACR Using the Docker CLI

ACR Tasks

Exercise 3: Building and Pushing to ACR Using ACR Tasks

Task 1: Executing Build, Push, and Run Quick Tasks

Running Containers in Azure Container Instances

Exercise 4: Creating Azure Container Instances (ACI)

Task 1: Enabling the ACR Admin User

Task 2: Creating an ACI

Implementing Azure Container Apps

Azure Container Apps Architecture

Exercise 5: Creating and Managing ACA

Task 1: Building and Running Multiple Containers Locally

Task 2: Creating an ACA Environment

Task 3: Creating and Configuring Container Apps

Task 4: Configuring Health Probes

Task 5: Configuring App Secrets

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

4

Implementing Azure Functions

Technical Requirements

Exploring Azure Functions

Hosting Options

Scaling Azure Functions

Triggers and Bindings

Developing, Testing, and Deploying Azure Functions

Exercise 1: Creating a Function App

Exercise 2: Creating Functions

Task 1: Creating a Function with a Data Operation Trigger

Task 2: Testing the Data Operation Trigger

Task 3: Creating and Testing a Function with a Timer Trigger

Task 4: Creating and Testing a Function with a Webhook Trigger

Exercise 3: Developing within VS Code

Task 1: Creating a Project

Task 2: Developing and Testing Locally

Task 3: Deploying to Azure

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

5

Developing Solutions That Use Cosmos DB Storage

Introduction to NoSQL Solution

Understanding the Benefits of NoSQL Databases

Exploring Azure NoSQL Platforms

Developing a Solution for Azure Table Storage

The Structure of an Azure Table Storage Account

Exercise 1: Provisioning a Storage Account

Querying Azure Table Storage with a RESTful Interface

Summary of Azure Table Storage

Developing a Solution for Azure Cosmos DB

Exploring Cosmos DB APIs

Provisioning

Exercise 2: Using the Azure CLI to Provision Cosmos DB

High Availability

Consistency Levels

Networking Settings

Encryption Settings

Backups and Recovery

Partitions

Indexing

Time to Live

Inserting and Querying Documents

User-Defined Functions

Stored Procedures

Triggers

Leveraging a Trigger Validation from Code

The Cosmos DB REST API

Optimistic Concurrency

Leveraging a Change Feed for App Integration

Optimizing Database Performance and Costs

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

6

Developing Solutions That Use Azure Blob Storage

Exploring Azure Storage Accounts

Provisioning an Azure Storage Account

The Structure of Azure Blob Storage

High Availability and Durability

Performance Levels

Pricing Models

Storage Access Tiers

Blob Types

Leveraging the Azure CLI to Provision an Azure Storage Account

Exercise 1: Creation and Configuration of Resources

Data Protection

Static Websites

Exercise 2: Static Websites

Manipulation with Blobs and Containers

Leveraging AzCopy for Data Transfer between Storage Accounts

Implementing Basic Operations from C# Code

Managing Metadata and Security Settings for Storage Accounts

Encryption

Firewalls

Metadata and Tags

Retrieving Metadata Using C# Code

Lifecycle Management

Cost Savings

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

7

Implementing User Authentication and Authorization

Technical Requirements

Understanding the Microsoft Identity Platform

Service Principals

Permissions and Consent Types

Exercise 1: Experiencing Permissions and Consent

Task 1: Implementing Authentication with the Default Permissions

Task 2: Testing the Dynamic Consent Experience

Task 3: Defining Static Permissions for Admin Consent

Exercise 2: Implementing Conditional Access

Task 1: Creating a Conditional Access Policy

Implementing Authentication with the MSAL

Authentication Flows

Client Applications

Exercise 3: Implementing Authentication with the MSAL

Task 1: Creating a New Console App and Adding the MSAL.NET Package

Task 2: Implementing Authentication in a Console App Using the MSAL

Discovering Microsoft Graph

Exercise 4: Microsoft Graph

Task 1: Using Graph Explorer

Task 2: Querying the Microsoft Graph API Using the SDK

Using SASs

The SAS Token Structure

SAS Types

Exercise 5: Using Shared Access Signatures

Task 1: Creating a Storage Account Using the Azure CLI

Task 2: Generating a SAS

Stored Access Policies

Exercise 6: Implementing Stored Access Policies

Task 1: Creating and Using a Stored Access Policy

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

8

Implementing Secure Azure Solutions

Technical Requirements

Securing Secrets with Azure Key Vault

Authorization

Authentication

Implementing Managed Identities

Exercise 1: User-Assigned Managed Identity

System-Assigned Managed Identity

Exploring Azure App Configuration

Exercise 2: App Configuration in code

Feature Flags

Exercise 3: Creating a Feature Flags

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

9

Integrating Caching and Content Delivery within Solutions

Technical Requirements

Introducing Caching Patterns

Exploring Azure Cache for Redis

Provisioning Azure Cache for Redis from the Azure CLI

Exercise 1: Provisioning Azure Cache for Redis

Advanced Configuration

Implementing Basic Operations with Cached Data

Exercise 2: Manipulating Data in Azure Cache from the Console

Leveraging Azure Cache for Persisting Web Sessions

How to Cache Your Data Effectively

Exploring Azure Front Door and CDN

Azure Front Door

Dynamic Site Acceleration

Provisioning Azure CDN

Exercise 3: Provisioning with the Azure CLI

Advanced CDN Configuration

Exercise 4: Configuring a Website to Leverage the CDN

Manipulating a CDN Instance from Code

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

10

Monitoring and Troubleshooting Solutions by Using Application Insights

Technical Requirements

Monitoring and Logging Solutions in Azure

Analyzing Performance Issues with Azure Monitor

Exercise 1: Provisioning Cloud Solutions to Explore Monitoring Features

Exploring Azure App Service Diagnostics Settings

Azure Monitor for Azure Web Apps

Azure Service Health

Configuring Azure Alerts

Exploring Application Insights

Provisioning and Configuration

Exercise 2: Provisioning Application Insights with the Azure CLI

Exercise 3: Instrumenting Code to Use Application Insights

Charting and Dashboards

Instrumenting the Code

Using KQL for Log Analytics Queries

Exercise 4: Using Log Analytics

Discovering Azure Workbooks

Exercise 5: Monitoring Exceptions in a Workbook

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

11

Implementing API Management

Technical Requirements

Understanding the Role of Web API Services

Exercise 1: Provisioning a Web API

Discovering OpenAPI Documentation

Exercise 2: Provisioning a Web API

Provisioning APIM

Exercise 3: Provisioning Your APIM

Connecting Existing Web APIs to APIM

Exercise 4: Adding APIs

Exploring APIM Configuration Options

Products and Subscriptions

Workspaces

Authentication

Managed Identity and RBAC

Networking

The Dev Portal

Self-Hosted Gateways

External Cache

Repository Integrations

Monitoring and Troubleshooting

Using Advanced Policies

Mocking API Responses

Caching an API Response

Throttling Requests

Controlling Flow

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

12

Developing Event-Based Solutions

Technical Requirements

Understanding the Role of Event-Driven Solutions

Discovering Azure Event Hubs

Provisioning Namespaces

Pricing Model

Scaling

Leveraging Partitions

Provisioning Azure Event Hubs

Exercise 1: Setting Up an Azure Event Hubs Environment

Capturing Events

Consumer Groups

Event Consumption Services

Connections with SAS Tokens

Developing Applications for Event Hubs

Consuming Event Streams with Azure IoT Hub

The Pricing Model

Device Registration

Azure IoT Edge

Provisioning Azure IoT Hub

Exercise 2: Provisioning an IoT Hub

Developing Applications for Azure IoT Hub

Exercise 3: Connecting a Device

Exploring Azure Event Grid

Event Sources and Handlers

Schema Formats

Access Management

Event Grid Event Domains

Delivery Retries

Filters

Pricing Model

Provisioning Azure Event Grid

Exercise 4: Event-Driven Automation

Developing Applications for Custom Event Handling

Comparing Azure Event-Based Services

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

13

Developing Message-Based Solutions

Technical Requirements

Messaging Patterns

The Message Broker and Decoupling

Load Balancing

Competing Consumers

Exploring Azure Queue Storage

Exercise 1: Provisioning Azure Queue Storage

Messaging from the Code

Exploring Azure Service Bus

Pricing Tiers

Scaling

Connectivity

Advanced Features

Provisioning Azure Service Bus

Exercise 2: Provisioning Azure Service Bus

Developing for Service Bus Queues

Developing for Azure Service Bus Topics

Exploring Relays

Exercise 3: Provisioning Azure Relay

Comparing Azure Message-Based Services

Summary

Further Reading

Exam Readiness Drill – Chapter Review Questions

14

Accessing the Online Practice Resources

Other Books You May Enjoy

Preface

The demand for cloud developers continues to grow constantly as more organizations transition workloads to cloud platforms. This growing demand also increases the demand for professionals with up-to-date knowledge of ever-evolving cloud technologies and features. Obtaining a relevant certification can provide evidence that you possess the knowledge required to be a successful cloud developer.

The chapters of this book are structured in a way that aligns with the skills measured by the Microsoft AZ-204 Azure Developer exam, so you can see which area of the exam is being addressed in each chapter. You will explore services and features covered by the exam in a clear, succinct way, using practical exercises to build a firm understanding of key concepts, with access to downloadable code examples.

Who This Book Is for

This book is intended to help professional developers with Microsoft Azure experience to take and pass the AZ-204: Developing Solutions for Microsoft Azure exam, as well as developers looking to increase their existing knowledge of how to develop solutions for Azure.

What This Book Covers

Chapter 1, Azure and Cloud Fundamentals, provides an introduction to some fundamental concepts, deployment and service models, benefits, and considerations of cloud computing, before introducing some important concepts of Microsoft Azure, providing a sound foundation for the rest of the book.

Chapter 2, Implementing Azure App Service Web Apps, covers one of the most used services in Azure development, Azure App Service. This chapter introduces Azure App Service and App Service plans and goes into detail about authentication and authorization within App Service, networking features, scaling, app settings, and logging capabilities, as well as achieving zero-downtime deployments with deployment slots using Azure App Service.

Chapter 3, Implementing Containerized Solutions, builds a solid foundational understanding of application containers, container images, and Docker. With this fundamental understanding, the relevant container-related Azure services—including Azure Container Registry, Azure Container Instances, and Azure Container Apps—are covered in detail.

Chapter 4, Implementing Azure Functions, begins with an introduction to the Azure Functions service, including hosting options and the different scaling considerations for each hosting option, along with the concepts of triggers and bindings. This chapter also covers various ways to develop, test, and deploy serverless functions using Azure Functions.

Chapter 5, Developing Solutions That Use Cosmos DB Storage, explores hosting NoSQL solutions in Microsoft Azure, including Azure Table storage and its features, and how to leverage the service using application code. The main focus of this chapter is Cosmos DB, which is introduced and explored in depth, covering topics such as the available APIs, scaling, high availability, consistency, recovery features, and querying Cosmos DB using the Azure portal and application code.

Chapter 6, Developing Solutions That Use Azure Blob Storage, introduces Azure Blob Storage and its role in supporting applications and services in Azure. Containers, blobs, metadata manipulation, life cycle management, and static website hosting within an Azure storage account are all covered in this chapter. Using application code to interact with Azure Blob Storage is also explored.

Chapter 7, Implementing User Authentication and Authorization, provides a detailed introduction to the Microsoft identity platform, service principals, permissions, and concept types, before moving into implementing authentication using the Microsoft Authentication Library (MSAL). Microsoft Graph is explored and leveraged within application code. This chapter ends with a detailed look at shared access signatures and stored access policies for authenticating requests to storage accounts in Azure.

Chapter 8, Implementing Secure Azure Solutions, starts by introducing how to leverage Azure Key Vault to secure application secrets, including authentication and authorization with Azure Key Vault, which leads to the topic of managed identities, along with the options available and best practices with regard to managed identities. The final topic of this chapter is using Azure App Configuration to centrally and securely store application configuration settings and feature flags. All of the topics explored in this chapter are accompanied by code examples and practical exercises.

Chapter 9, Integrating Caching and Content Delivery within Solutions, introduces dynamic content caching with Azure Cache for Redis and moves to the topic of caching static content with Azure Front Door and Content Delivery Network (CDN), including different caching patterns, high availability, pricing models, and integrations with Azure platform services such as Azure App Service and Azure Blob Storage.

Chapter 10, Monitoring and Troubleshooting Solutions by Using Application Insights, explores a variety of telemetry and monitoring topics, including performance improvement and troubleshooting crashes with snapshots collected by Application Insights, monitoring web logs with Azure Monitor, and creating live dashboards and workbooks using Kusto queries.

Chapter 11, Implementing API Management, is all about developing web API services and tools for connections and tests, including Swagger for testing and generating documentation, and the API Management service, products, and subscriptions, with a deep dive into advanced configuration using policies.

Chapter 12, Developing Event-Based Solutions, explores a variety of the event-based services available in Azure, including Event Hubs for ingesting big data, Event Grid for reactive programming, and IoT Hub for telemetry monitoring.

Chapter 13, Developing Message-Based Solutions, covers the implementation of messaging patterns. Messaging services in Azure are introduced, starting with Azure Queue Storage and moving on to Azure Service Bus. Message processing from queues and topics using sessions is also discussed. Guidelines are provided for implementing reliable content delivery with message-based services.

To Get the Most Out of This Book

You will need the latest version of Visual Studio Code, .NET, PowerShell Core, the Azure CLI, Git, and Docker Desktop. All code examples have been tested using .NET 7.0, PowerShell Core 7, and version 2.58.0 of the Azure CLI on Windows 11. However, they should also work with future releases as well.

Software/hardware covered in the book

Operating system requirements

Visual Studio Code

Windows, macOS, or Linux

Docker Desktop

Windows, macOS, or Linux

PowerShell Core

Windows, macOS, or Linux

Azure CLI

Windows, macOS, or Linux

.NET 7.0

Windows, macOS, or Linux

Git

Windows, macOS, or Linux

Azure Functions Core Tools

Windows, macOS, or Linux

Check the license requirements for Docker Desktop if you want to follow along with the exercises in Chapter 3, Implementing Containerized Solutions. A Docker Personal plan is free for personal, individual use. Each chapter details which (if any) Visual Studio Code extensions are required.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (https://packt.link/2Imi8). Doing so will help you avoid any potential errors related to the copying and pasting of code.

As every chapter in this book relates to Microsoft Azure, you will also need a non-production Azure tenant and subscription that can be used to follow the exercises and enable your own learning and experimentation.

Online Practice Resources

With this book, you will unlock unlimited access to our online exam-prep platform (Figure 0.1). This is your place to practice everything you learn in the book.

How to access the resources

To learn how to access the online resources, refer to Chapter 14, Accessing the Online Practice Resources at the end of this book.

Figure 0.1 – Online exam-prep platform on a desktop device

Sharpen your knowledge of AZ-204 concepts with multiple sets of mock exams, interactive flashcards, and exam tips accessible from all modern web browsers.

Download the Example Code Files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Developing-Solutions-for-Microsoft-Azure-AZ-204-Exam-Guide-2nd-Edition. If there are any updates to the code, the GitHub repository will be updated.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the Color Images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/HguMr.

Conventions Used

There are several text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: If you already have a resource deployed, you can list the resource details with az resource list --name "<resource name>", substituting <resource name> with the name of your resource.

A block of code is set as follows:

{   "name": "ORIGINAL_SLOT",   "value": "Production",   "slotSetting": false }, {   "name": "CURRENT_SLOT",   "value": "Production",   "slotSetting": true }

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<feature name="demofeature">   <h1>Demo feature enabled!</h1> </feature>

Any command-line input or output is written as follows:

az appservice plan create -n "<plan name>" -g "<resource group>" --sku "<SKU code>" --is-linux

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: If you predicted the sudden rise, perhaps due to seasonal patterns, you may have gone through a capital expenditure (CapEx) process.

Tips or important notes

Appear like this.

Get in Touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form. We ensure that all valid errata are promptly updated in the GitHub repository, with the relevant information available in the Readme.md file. You can access the GitHub repository at https://packt.link/elrHm.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Developing Solutions for Microsoft Azure AZ-204 Exam Guide, Second Edition, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a Free PDF Copy of This Book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily.

Follow these simple steps to get the benefits:

Scan the QR code or visit the link below:

https://packt.link/free-ebook/9781835085295

Submit your proof of purchase.That’s it! You’ll send your free PDF and other benefits to your email directly.

2

Implementing Azure App Service Web Apps

Now it’s time to build on some of the fundamentals you have covered in the previous chapter, focusing on one of Azure’s most popular Platform as a service (PaaS) services, Azure App Service. Many developers that traditionally had web apps hosted on an Internet Information Services (IIS) server (even if it was a cloud-based VM) are moving their applications to be hosted on App Service, which brings even more benefits to this scenario than IaaS.

It’s important to understand that Azure App Service is more than just for hosting web apps, such as hosting web APIs, so we’ll start with an overview of App Service as a whole, before turning our focus to web apps specifically.

By the end of this chapter, you’ll have a solid understanding of Azure App Service. You’ll also understand how you can manage your web applications throughout their life cycle in the cloud, including configuring, scaling, and deploying changes in a controlled and non-disruptive way.

This chapter addresses the Implement Azure App Service Web Apps skills measured within the Develop Azure compute solutions area of the exam, which forms 25-30% of the overall exam points. This chapter will cover the following main topics:

Exploring Azure App ServiceConfiguring app settings and loggingScaling App Service appsLeveraging deployment slots

Technical Requirements

The code files for this chapter can be downloaded from: https://packt.link/h2Hzd.

In addition to any technical requirements from Chapter 1, Azure and Cloud Fundamentals, you will require the following resources to follow along with the exercises in this chapter:

The Azure App Service Visual Studio Code extension, which can be found at https://packt.link/zzl2L.The Azure Resources Visual Studio Code extension, which can be found at https://packt.link/wUA50.The .NET 7.0 SDK can be downloaded at https://packt.link/3k2CR.

Exploring Azure App Service

Azure App Service is an HTTP-based PaaS service on which you can host web applications, RESTful APIs, and mobile backends, as well as automate business processes with WebJobs. With App Service, you can code in some of the most common languages, including .NET, Java, Node.js, and Python. With WebJobs, you can run background automation tasks using PowerShell scripts, Bash scripts, and more. With App Service being a PaaS service, you get a fully managed service, with infrastructure maintenance and patching managed by Azure, so you can focus on development activities.

If your app runs in a Dockercontainer, you can host the container on App Service as well. You can even run multi-container applications with Docker Compose. We’ll cover containers and Docker in Chapter 3, Implementing Containerized Solutions. The previous chapter, Chapter 1,