Azure Cookbook: Recipes to Create and Maintain Cloud Solutions in Azure

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

How do you deal with the problems you face when using Azure? This practical guide provides over 75 recipes to help you to work with common Azure issues in everyday scenarios. That includes key tasks like setting up permissions for a storage account, working with Cosmos DB APIs, managing Azure role-based access control, governing your Azure subscriptions using Azure Policy, and much more. Author Reza Salehi has assembled real-world recipes that enable you to grasp key Azure services and concepts quickly. Each recipe includes CLI scripts that you can execute in your own Azure account. Recipes also explain the approach and provide meaningful context. The solutions in this cookbook will take you beyond theory and help you understand Azure services in practice. You'll find recipes that let you: • Store data in an Azure storage account or in a data lake • Work with relational and nonrelational databases in Azure • Manage role-based access control (RBAC) for Azure resources • Safeguard secrets in Azure Key Vault • Govern your Azure subscription using Azure Policy • Use CLI code to construct your application or fix a particular problem

Author(s): Reza Salehi
Edition: 1
Publisher: O'Reilly Media
Year: 2023

Language: English
Commentary: Publisher's PDF; 2023-06-22: First Release
Pages: 332
City: Sebastopol, CA
Tags: Microsoft Azure; Cloud Computing; Security; Big Data; Cookbook; Monitoring; Logging; Docker; Event-Driven API; Networking; Serverless Applications; Azure Cognitive Services; Azure Storage; Data Persistence; Containers; Messaging; Azure Functions; Azure App Service; Resource Management

Cover
Copyright
Table of Contents
Preface
Who Should Read This Book
Why I Wrote This Book
Navigating This Book
What You Will Need
Getting Started
Azure Account Setup
General Workstation Setup Instructions
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Chapter 1. Security
1.1 Creating a New User in Your Azure Account
Problem
Solution
Discussion
1.2 Creating a New Custom Role for Our User
Problem
Solution
Discussion
1.3 Assigning Allowed Azure Resource Types in a Subscription
Problem
Solution
Discussion
1.4 Assigning Allowed Locations for Azure Resources
Problem
Solution
Discussion
1.5 Connecting to a Private Azure Virtual Machine Using Azure Bastion
Problem
Solution
Discussion
1.6 Protecting Azure VM Disks Using Azure Disk Encryption
Problem
Solution
Discussion
1.7 Blocking Anonymous Access to Azure Storage Blobs
Problem
Solution
Discussion
1.8 Configuring an Azure Storage Account to Exclusively Use Azure AD Authorization
Problem
Solution
Discussion
1.9 Storing and Retrieving Secrets from Azure Key Vault
Problem
Solution
Discussion
1.10 Enabling Web Application Firewall (WAF) with Azure Application Gateway
Problem
Solution
Discussion
Chapter 2. Networking
2.1 Creating an Isolated Private Network by Provisioning an Azure Virtual Network
Problem
Solution
Discussion
2.2 Creating a Network Layout in Azure Virtual Networks Using Subnets
Problem
Solution
Discussion
2.3 Routing Network Traffic Using User-Defined Routes
Problem
Solution
Discussion
2.4 Securing Azure Virtual Networks with Azure Firewall
Problem
Solution
Discussion
2.5 Securing Azure Virtual Networks with Network Security Groups
Problem
Solution
Discussion
2.6 Connecting Two Azure VNets Using Azure Network Peering
Problem
Solution
Discussion
2.7 Verifying Azure VNet Connectivity Using Azure Network Watcher
Problem
Solution
Discussion
Chapter 3. Storage
3.1 Using Azure Key Vault Keys to Configure Azure Storage Encryption at Rest
Problem
Solution
Discussion
3.2 Controlling Azure Storage Network Access
Problem
Solution
Discussion
3.3 Granting Limited Access to Azure Storage Using SAS Tokens
Problem
Solution
Discussion
3.4 Granting Azure Function Apps Access to Azure Storage Using Managed Identity and RBAC
Problem
Solution
Discussion
3.5 Creating and Storing Snapshots of Blob Objects
Problem
Solution
Discussion
3.6 Creating and Accessing New File Versions
Problem
Solution
Discussion
3.7 Using a Lifecycle Management Policy to Save Storage Account Costs
Problem
Solution
Discussion
3.8 Using AzCopy to Upload Multiple Files to Azure Storage Blobs
Problem
Solution
Discussion
3.9 Using AzCopy to Upload Multiple Files to Azure Storage File Shares
Problem
Solution
Discussion
3.10 Protecting Azure Storage Blobs from Accidental Deletion
Problem
Solution
Discussion
3.11 Protecting an Azure Storage Account from Deletion Using Azure Locks
Problem
Solution
Discussion
Chapter 4. Persisting Data
4.1 Creating a Cosmos DB NoSQL API Account
Problem
Solution
Discussion
4.2 Creating a Cosmos DB Apache Gremlin (Graph) API Account
Problem
Solution
Discussion
4.3 Configuring Azure Cosmos DB Firewall
Problem
Solution
Discussion
4.4 Configuring Azure Cosmos DB Private Access
Problem
Solution
Discussion
4.5 Granting Function Apps Access to Cosmos DB Using RBAC
Problem
Solution
Discussion
4.6 Storing Tabular Data in Azure Storage Tables
Problem
Solution
Discussion
4.7 Configuring Autoscale for an Azure Cosmos DB NoSQL API Container
Problem
Solution
Discussion
4.8 Saving Costs on Multiple Azure SQL Single Databases with Varying and Unpredictable Usage Demands
Problem
Solution
Discussion
4.9 Configuring Serverless Compute Tier for Azure SQL Single Databases
Problem
Solution
Discussion
4.10 Configuring Azure SQL Firewall IP Rules
Problem
Solution
Discussion
4.11 Configuring Azure SQL Firewall VNet Rules
Problem
Solution
Discussion
4.12 Backing Up Azure SQL Single Databases into Azure Storage Blobs
Problem
Solution
Discussion
Chapter 5. Messaging and Events
5.1 Ingesting Streaming Data at Scale Using Event Hubs
Problem
Solution
Discussion
5.2 Ingesting Telemetry Data from IoT Devices Using Azure IoT Hub
Problem
Solution
Discussion
5.3 Implementing Communication Between Services Using Azure Storage Queues
Problem
Solution
Discussion
5.4 Implementing Communication Between Services Using Azure Service Bus Queues
Problem
Solution
Discussion
5.5 Implementing a Publish-Subscribe Pattern Using Azure Service Bus Topics
Problem
Solution
Discussion
5.6 Queuing Newly Uploaded Blobs for Further Processing Using Azure Event Grid
Problem
Solution
Discussion
Chapter 6. Big Data
6.1 Processing Live Data Streams Using Azure Stream Analytics
Problem
Solution
Discussion
6.2 Querying CSV File Content Using Azure Synapse Analytics Serverless Pool
Problem
Solution
Discussion
6.3 Saving Costs on Idle Azure Synapse Dedicated SQL and Spark Pools
Problem
Solution
Discussion
6.4 Processing Datafiles Using Azure Databricks
Problem
Solution
Discussion
6.5 Performing ETL/ELT Operations on Big Data Using Azure Data Factory (ADF)
Problem
Solution
Discussion
Chapter 7. Azure Functions and Serverless Services
7.1 Implementing a Web API Using Azure Functions
Problem
Solution
Discussion
7.2 Invoking an Azure Function on a Schedule Using the Timer Trigger
Problem
Solution
Discussion
7.3 Invoking an Azure Function on Blob Upload Using the Blob Trigger
Problem
Solution
Discussion
7.4 Inserting Function App Output into Azure Cosmos DB
Problem
Solution
Discussion
7.5 Establishing Communication Between Azure Functions Using the Service Bus Queue Trigger
Problem
Solution
Discussion
7.6 Restricting Network Access to Azure Function Apps
Problem
Solution
Discussion
Chapter 8. Azure App Service
8.1 Deploying a Web Application to Azure App Services Using ZipDeploy
Problem
Solution
Discussion
8.2 Deploying a Web Application to Azure App Service Using FTP
Problem
Solution
Discussion
8.3 Deploying a Web Application from a Public GitHub Repository to Azure App Service
Problem
Solution
Discussion
8.4 Configuring Autoscaling for Your Azure App Service Plan
Problem
Solution
Discussion
8.5 Restricting Network Access to an Azure App Service
Problem
Solution
Discussion
8.6 Hosting Static Websites in Azure Storage
Problem
Solution
Discussion
Chapter 9. Containers
9.1 Building and Pushing a Container Image to Azure Container Registry
Problem
Solution
Discussion
9.2 Pulling and Running a Docker Image in Azure Container Instances
Problem
Solution
Discussion
9.3 Pulling and Running a Containerized Website in Azure App Services
Problem
Solution
Discussion
9.4 Pulling and Running a Containerized Website in Azure Container Apps
Problem
Solution
Discussion
9.5 Limiting Azure Container Registry Public Network Access
Problem
Solution
Discussion
Chapter 10. Azure Cognitive Services
10.1 Provisioning a Multi-Service Azure Cognitive Services Resource
Problem
Solution
Discussion
10.2 Converting Text to Speech
Problem
Solution
Discussion
10.3 Translating Text
Problem
Solution
Discussion
10.4 Performing Sentiment Analysis on Text
Problem
Solution
Discussion
10.5 Detecting Objects in Images
Problem
Solution
Discussion
10.6 Creating Captions for Images
Problem
Solution
Discussion
10.7 Extracting Text from Images Using OCR
Problem
Solution
Discussion
10.8 Detecting PII in Text
Problem
Solution
Discussion
Chapter 11. Management and Monitoring
11.1 Managing Azure Resource Tags
Problem
Solution
Discussion
11.2 Estimating Costs for Azure Resources
Problem
Solution
Discussion
11.3 Monitoring Costs of Provisioned Azure Resources
Problem
Solution
Discussion
11.4 Collecting Platform Logs for an Azure Resource
Problem
Solution
Discussion
11.5 Analyzing Azure Monitor Platform Logs
Problem
Solution
Discussion
Index
About the Author
Colophon