32,39 €
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:
Seitenzahl: 596
Veröffentlichungsjahr: 2024
Developing Solutions for Microsoft Azure AZ-204 Exam Guide
Second Edition
A comprehensive guide to passing the AZ-204 exam
Paul Ivey
Alex Ivanov
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
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/
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.
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.
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.
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.
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.
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.
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!
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.
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-linuxBold: 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.
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.
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.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 slotsThe 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.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,
