Infrastructure As Code with Azure Bicep (Nwodo, Adora) (z-library.sk, 1lib.sk, z-lib.sk)

Author: Nwodo, Adora

后端

No Description

📄 File Format: PDF
💾 File Size: 5.9 MB
11
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
(This page has no text content)
📄 Page 2
(This page has no text content)
📄 Page 3
Infrastructure as Code with Azure Bicep Infrastructure development through Bicep modules, template specs, and DevOps automation pipelines Adora Nwodo www.bpbonline.com
📄 Page 4
First Edition 2025 Copyright © BPB Publications, India ISBN: 978-93-65891-928 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. www.bpbonline.com
📄 Page 5
Dedicated to God, my family, and my friends
📄 Page 6
About the Author Adora Nwodo is an Engineering Manager and a multi-award-winning tech woman. She currently works at the intersection of cloud engineering, and developer platforms and is passionate about the cloud and emerging technologies. Prior to her current role, she worked at Microsoft, where she built Microsoft Mesh, the mixed reality collaboration platform on the cloud. Apart from building and advocating for the cloud and emerging technologies, Adora is a digital creator and the founder of NexaScale, an ed-tech non-profit that provides simulated work experience for 10,700+ software engineers, designers, and product managers. She is also the author of 5 cloud engineering books, and a Microsoft MVP for Azure Infrastructure.
📄 Page 7
About the Reviewers Wesley is a Microsoft Azure MVP and is working as a Principal Azure Architect at Intercept. His day-to-day activities include designing, implementing and optimizing Azure solutions, focused on Cloud Native (Kubernetes) and platform engineering. When he’s not working on a project, he’s giving a workshop, training or test-driving new Azure features. As a big advocate of Cloud Native, Infrastructure as Code and DevOps you will probably hear him talking about any of these subjects at least a few times a day (or hour). Kasun Kodagoda is a technology enthusiast with a passion for building cloud-native SaaS applications with Microsoft Azure and .Net technologies. He is an avid DevOps practitioner with extensive experience in Cloud technology, Serverless, Deployment Pipelines, Infrastructure as Code, and .Net Development with a specific focus on Azure cloud and Azure DevOps. He is currently working at VML Enterprises in the Cloud Engineering team.
📄 Page 8
Acknowledgement Writing this book has been an incredible journey, and I would like to take a moment to express my gratitude to the amazing people and communities who made it possible. First, a heartfelt thank you to the entire team at BPB Publications for believing in this project and for their support throughout the writing and publishing process. To my friends, thank you for your constant encouragement, patience, and belief in me. Your support has been a source of strength and motivation during the long hours of research and writing. I am grateful to have such a wonderful circle of people who always cheer me on. I also appreciate the Azure community for constantly inspiring me all through the years with your knowledge-sharing, enthusiasm, and passion for innovation. This book is a tribute to the incredible work being done in the Azure ecosystem. This book would not have been possible without all of you, and I am deeply grateful for your contributions to my journey.
📄 Page 9
Preface This book covers Azure Bicep, a language used to deploy Azure resources declaratively. It replaces JSON for developing Azure Resource Manager templates. Azure Bicep provides a simpler and more flexible way to define and manage infrastructure as code, making it easier to set up and manage resources in the Azure cloud. The book explains the technical details of Azure Bicep and how it helps with deploying and maintaining cloud resources. It serves as a practical guide for both beginners and experienced Azure users, with clear examples and step-by-step instructions. Each chapter focuses on building scalable and efficient infrastructure solutions and introduces concepts like modular templates, configuration management, and dependency handling. The book covers techniques to design resilient and scalable Azure infrastructure. It includes instructions on using Azure Bicep to incorporate infrastructure as code principles into workflows, helping to create reliable and scalable cloud applications. This book is divided into 12 chapters. They cover the basics of Azure Bicep, including installation, template creation, and core concepts, as well as advanced techniques like automation with GitHub Actions and Azure DevOps, scaling for large projects, and best practices for efficient deployments. The details of all the chapters of this book are highlighted in the following: Chapter 1: Introduction to Azure Bicep - This chapter introduces the basics of infrastructure as code (IaC) and explains how Azure Bicep changes the way cloud infrastructure is defined and deployed. It begins by exploring why IaC is important and how Azure Bicep has developed. This provides a clear understanding of its role in modern cloud development.
📄 Page 10
Chapter 2: Installing and Setting up Azure Bicep - This chapter explains how to install and set up Azure Bicep, guiding users through the first steps of using it. It covers installing the Bicep CLI, setting up the development environment, and overcoming common setup challenges to ensure a smooth start. Chapter 3: Understanding Azure Bicep Basics - This chapter explores the key components of Azure Bicep, including its syntax, structure, and basic concepts. Building on earlier chapters, it provides a clear understanding of how to create and organize Bicep files effectively. Chapter 4: Creating and Deploying a Bicep Template - This chapter explains how to create and deploy a Bicep template, turning theory into practice. It guides users through building a Bicep file from scratch and deploying it on Azure. Chapter 5: Variables, Parameters, and Template Functions in Bicep - This chapter will cover how to use variables and parameters in Bicep. This will promote the flexibility and maintainability of your infrastructure code by allowing you to define reusable values and configuration settings that can be easily adjusted as needed. In addition to variables and parameters, you'll also learn about template functions in Bicep. These functions provide powerful capabilities for manipulating data and performing operations within your templates. Chapter 6: Operators, Conditions, and Loops in Bicep - This chapter explains how to use operators, conditions, and loops in Azure Bicep. These concepts help make your templates more powerful and flexible so that you can create dynamic and adaptable code. Chapter 7: Create Reusable Module Libraries in Bicep - This chapter explains how to make Azure Bicep templates reusable and easy to manage by using modules, private registries, and template specs. It shows how to create templates that can be shared and used as building blocks, helping teams work better together. Chapter 8: Compiling and Decompiling Bicep - This chapter explains how to convert Bicep code into ARM templates and turn existing ARM
📄 Page 11
templates back into Bicep. It helps users easily switch between the two formats and manage or migrate their infrastructure code effectively. Chapter 9: Automating Bicep Deployment with GitHub Actions - This chapter focuses on automating Bicep template deployments using GitHub Actions. It covers integrating GitHub Actions into CI/CD pipelines, setting up workflows, and securely managing secrets to create an efficient and automated deployment process. Chapter 10: Automating Bicep Deployment with Azure Pipelines - This chapter explains how to automate Bicep template deployments using Azure DevOps. It covers integrating Azure DevOps into CI/CD pipelines, setting up workflows, and securely managing secrets to create a smooth and automated deployment process. Chapter 11: Scaling Bicep for Large Projects - This chapter explains how to scale Azure Bicep for large and complex applications. It provides tools and techniques to optimize and manage large-scale infrastructures effectively. Chapter 12: Advanced Bicep Tips and Best Practices - This chapter provides tips and best practices to improve infrastructure as code (IaC) with Azure Bicep. It covers ways to optimize Bicep code and handle complex deployment scenarios effectively.
📄 Page 12
Code Bundle and Coloured Images Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/bd524f The code bundle for the book is also hosted on GitHub at https://github.com/bpbpublications/Infrastructure-as-Code-with- Azure-Bicep. In case there’s an update to the code, it will be updated on the existing GitHub repository. We have code bundles from our rich catalogue of books and videos available at https://github.com/bpbpublications. Check them out! Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at : errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family. Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at :
📄 Page 13
business@bpbonline.com for more details. At www.bpbonline.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks. 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 business@bpbonline.com 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 www.bpbonline.com. We have worked with thousands of developers and tech professionals, just like you, to help them share their insights with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. Reviews Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions. We at BPB can understand what you think about our products, and our authors can see your feedback on their book. Thank you! For more information about BPB, please visit www.bpbonline.com. Join our book’s Discord space Join the book’s Discord Workspace for Latest updates, Offers, Tech happenings around the world, New Release and Sessions with the Authors: https://discord.bpbonline.com
📄 Page 14
Table of Contents 1. Introduction to Azure Bicep Introduction Structure Objectives Introduction of infrastructure as code Types of infrastructure as code Imperative IaC Declarative IaC Introduction to Azure Bicep Advantages of Azure Bicep Evolution of Azure IaC How Azure Bicep works Comparative analysis with ARM templates Abstraction Tooling Code reuse Conclusion Points to remember Exercises 2. Installing and Setting up Azure Bicep Introduction Structure Objectives
📄 Page 15
Installing the Azure CLI Installing the Azure CLI on Windows Installing the Azure CLI on macOS Installing the Azure CLI on Linux Installation using one command Installation via multiple steps Installing Azure CLI on other Linux distributions Execute the Azure CLI within a Docker container Setting up code editors for Bicep development Setting up Visual Studio for Bicep development Setting up Visual Studio Code for Bicep development Installing Bicep Using Bicep through the Azure CLI Using Bicep through Azure PowerShell Installing the Bicep CLI on Linux Installing the Bicep CLI on macOS with Homebrew Installing the Bicep CLI on macOS via Bash Installing the Bicep CLI via the Windows Installer Installing the Bicep CLI on Windows using Chocolatey Installing the Bicep CLI on Windows using Winget Installing the Bicep CLI on Windows manually with PowerShell Using the Bicep nightly builds Conclusion 3. Understanding Azure Bicep Basics Introduction Structure Objectives Bicep syntax and structure The Bicep syntax Scopes
📄 Page 16
The resourceGroup scope Resource group deployment scopes The subscription scope The managementGroup scope The tenant scope Resources Modules Cloning the sample Bicep code Sample code walkthrough main.bicep webApp.bicep module Deployment process Result Conclusion Points to remember Exercises 4. Creating and Deploying a Bicep Template Introduction Structure Objectives Defining Azure resources Referencing already deployed Azure resources in Bicep Deployment modes Complete mode Incremental mode Setting deployment modes Previewing and executing the deployment Previewing and deploying using the Azure CLI Previewing and deploying using Azure PowerShell
📄 Page 17
Debugging deployments Conclusion Points to remember Exercises 5. Variables, Parameters, and Template Functions in Bicep Introduction Structure Objectives Creating and using variables Parameterizing templates Using decorators Data types in Bicep Arrays Booleans Integers Objects Strings Secure objects Secure strings Dynamic configurations with variables Passing parameters during deployments Using CLI parameters Using parameter files Dynamic environment-specific configurations with parameter files Template functions Namespaces for functions The any function Array functions
📄 Page 18
CIDR functions Date functions Deployment value functions File functions Lambda functions Logical functions Numeric functions Object functions Parameters file functions Resource functions Scope functions String functions Best practices for variables and parameters Conclusion Points to remember Exercises 6. Operators, Conditions, and Loops in Bicep Introduction Structure Objectives Bicep operators Accessor operators Comparison operators Logical operators The null-forgiving operator Numeric operators The safe-dereference operator Loops in Bicep Integer index Array elements
📄 Page 19
Dictionary object Loop with condition Combining integer index and items in an array Conditions in Bicep Define deployment condition Handle new or existing resources Conclusion Points to remember Exercises 7. Create Reusable Module Libraries in Bicep Introduction Structure Objectives Introduction to Bicep modules Uses of Bicep modules Creating and using Bicep modules Creating Bicep libraries using template specs Working of template specs Creating Bicep libraries using private registries Using Bicep aliases for referencing modules Template specs vs private registries Versioning and dependency management best practices Versioning best practices Dependency management best practices Automating Bicep with PowerShell Conclusion Points to remember Exercises
📄 Page 20
8. Compiling and Decompiling Bicep Introduction Structure Objectives Migrating to Bicep from other tools Migrating to Bicep from any provider without the Azure Portal Migrating to Bicep with the Azure Portal Compiling Bicep to ARM templates Best practices when moving to Bicep Conclusion Points to remember Exercises 9. Automating Bicep Deployment with GitHub Actions Introduction Structure Objectives Deployments without automation Introduction to GitHub Actions Workflows Runners Triggers Jobs and steps Running a simple workflow Configuring Bicep deployment workflows Authenticating to Azure Deployment using the authenticated workload identity Deploying to multiple regions Conclusion
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now

Recommended for You

Loading recommended books...
Failed to load, please try again later
Back to List