9325b7c768
* MTC Bicep edits * Update README.md * refactor chapter numbers * Update README.md Updating typo * Update Solution-01.md Fixing typo/grammar * Update Solution-03.md * Update Solution-Stretch-Thinking.md Updating typo/grammar * Update Bicep-Challenge-01.md * Update Bicep-Challenge-00.md put the bang back in the title. it's part of the WTH templates. * Update Bicep-Challenge-00.md New intro paragraph * Update Bicep-Challenge-00.md format fixing on WSL * Update Bicep-Challenge-00.md * Update Bicep-Challenge-00.md * Update Bicep-Challenge-00.md * Update Bicep-Challenge-00.md first stab at WSL + AZ CLI recommendations * Update Bicep-Challenge-00.md * Update Bicep-Challenge-00.md commit of 'inprogress' new Challenge 0 instructions. * Update Bicep-Challenge-00.md New challenge 0 instructions completed * Update Bicep-Challenge-00.md * Update and rename Bicep-Challenge-00.md to Challenge-00.md renamed file from Bicep-Challenge-00 to Challenge-00.md * Update README.md updated link to C0 * Update Bicep-Challenge-01.md Renamed file to Challenge-01.md Updated title to have a padded 01 Challenge => Description as per WTH template * Rename Bicep-Challenge-01.md to Challenge-01.md * Create Challenge-02.md Updated C2 to keep consistency with WTH templates. Break out the actual "challenges" with clearer grouping and context to help students who may not have a programming background. * Update Challenge-00.md to pad the zero * Update Challenge-02.md Padded the challenge # and capitalized the title. * Update and rename Bicep-Challenge-03.md to Challenge-03.md Updated to use WTH template with "Description" header * Update and rename Bicep-Challenge-05.md to Challenge-05.md Padded the zero, changed "Challenges" back to "Description" as per WTH templates. * Update and rename Bicep-Challenge-06.md to Challenge-06.md Pad the 06 Challenge => Description as per WTH template Update nav links Re-add SC to validate merged JSON output (may consider removing it if necessary.) * Update and rename Bicep-Challenge-07.md to Challenge-07.md updated nav links & padded the zero * Update and rename Bicep-Challenge-08.md to Challenge-08.md updated nav links & padded the zero * Update and rename Bicep-Challenge-09.md to Challenge-09.md updated nav links and padded the zero * Update Challenge-09.md * Update and rename Bicep-Challenge-10.md to Challenge-10.md Updated nav links, and folder location of resource files * Update Bicep-Challenge-11.md Updated nav links * Update and rename Bicep-Challenge-12.md to Challenge-12.md Updated nav links. Removed "Challenges" header as per WTH templates * Update Challenge-12.md Placed sample URLs in code blocks so they render properly Provided descriptive text for learning resource links * Rename Bicep-Challenge-11.md to Challenge-11.md * Update and rename Bicep-Challenge-13.md to Challenge-13.md Removed "Challenges" header and replaced with "Description" as per WTH template * Update Challenge-13.md * Update Challenge-13.md added descriptive text to the link. * Update README.md updated ToC links * Update README.md padded the zeros * Update README.md added new WTH coach guide template. * Update README.md updated coach guide home page * Update Solution-00.md Updated Coach guide for C0 * Update Solution-00.md * Update Solution-01.md pad the zero per WTH template * Update Solution-02.md pad the zero * Update Solution-03.md * Update Solution-04.md * Update Solution-05.md * Update Solution-06.md * Update Solution-07.md * Update Solution-08.md * Update Solution-09.md * Update Solution-10.md * Update Solution-11.md * Create Solution-12.md * Create Solution-13.md * Update README.md * Update Challenge-00.md added the Student Resources section to handle the zip file. * Update README.md * Rename install_apache.sh to install_apache.sh * Rename install_apache_vmss.sh to install_apache_vmss.sh * Rename cloud-init.txt to cloud-init.txt * Rename create-key-vault-CLI.sh to create-key-vault-CLI.sh * Rename create-key-vault-PS.ps1 to create-key-vault-PS.ps1 * Added new "create-key-vault.bicep" file to /Student/Resources/Challenge-04 * initial commit of new C4 * Update Challenge-04.md * Updated C4 Coach Guide * Delete old versions of C2 & C4 * Update README.md * Update README.md Updated Suggested Hack Agenda in the Coach's Guide * Update Challenge-02.md Grammar update * Update Challenge-01.md Fixing Typo * Update Challenge-04.md Fixing Grammar * Update README.md Fixed typos and missing words * Update Solution-00.md Fixed typos and removed some extraneous commas * Update Solution-03.md Fixed typos * Update Solution-Stretch-Thinking.md Fixed some typos * Update Challenge-00.md Fixed typos and misspelled words * Update Challenge-01.md Fixed typos * Update Challenge-02.md Fixed typos * Update Challenge-04.md Fixed typos * Update Challenge-06.md Fixed typos * Update Challenge-13.md Fixed typos --------- Co-authored-by: Andy Huang <54148527+Whowong@users.noreply.github.com> Co-authored-by: Peter C. Laudati <plaudati@hotmail.com> Co-authored-by: Pete Rodriguez <perktime@users.noreply.github.com> |
||
---|---|---|
.. | ||
Coach | ||
Student | ||
README.md |
README.md
What The Hack: Infrastructure As Code with Bicep
Introduction
DevOps is a journey not a destination. Implementing Infrastructure-as-Code is one of the first steps you will need to take!
When implementing an application environment in the cloud, it is important to have a repeatable way to deploy the underlying infrastructure components as well as your software into the target environment. This includes resources such as:
- Virtual Networks, Network Security Groups (Firewalls), Public IPs, Virtual Machines, Storage (Disks)
- PaaS Services (Azure SQL, App Service, etc)
- Configuration Management (installing & configuring software on VMs)
The best way to make deployments repeatable is to define them with code, hence the term "Infrastructure as Code" (aka IAC). There are multiple technologies that enable you to achieve this. Some of these include:
- ARM Templates with JSON
- ARM Templates with Bicep
- PowerShell Desired State Configuration (DSC)
- HashiCorp's Terraform & Packer
- Ansible, Chef, Puppet, Salt Stack, and others
This hack is focused on using Bicep to implement your IaC. It does not mean this is the only way to implement IaC, it's just one of many ways. If you want to learn how to do IaC in Azure with other technologies, try one of our other IaC hacks for ARM Templates & PowerShell DSC, Terraform or Ansible.
Learning Objectives
This hack will help you learn:
- How ARM Templates with Bicep can be used to deploy Azure infrastructure
The challenges build upon each other incrementally. You will start by creating a basic Bicep template to get you familiar with the tools & syntax. Then you extend your template incrementally to deploy multiple infrastructure resources to Azure.
Challenges
- Challenge 00: Pre-Requisites - Ready, Set, Go!
- Prepare your workstation to work with Azure
- Challenge 01: Basic Bicep
- Develop a simple Bicep file that takes inputs to create an Azure Storage Account, and returns outputs
- Challenge 02: Bicep Expressions and Referencing resources
- Learn Bicep expressions and referencing resources
- Challenge 03: Advanced Resource Declarations
- Advanced resource declarations
- Challenge 04: Secret Values with Azure Key Vault
- Learn how NOT to lose your job!
- Challenge 05: Deploy a Virtual Machine
- Create complex deployment with multiple dependencies
- Challenge 06: Bicep Modules
- Learn how create resusable modules for granular resource management
- Challenge 07: Configure VM to Run a Web Server
- Learn about custom script extensions
- Challenge 08: Deploy a Virtual Machine Scale Set
- Create complex deployment with Bicep using modules
- Challenge 09: Configure VM Scale Set to Run a Web Server
- Learn about custom script extensions with VM Scale Sets
- Challenge 10: Configure VM Scale Set to Run a Web Server Using cloud-init
- How cloud-init scripts can be run on a Virtual Machine Scale Set (VMSS)
- Challenge 11: Deploy Resources to Different Scopes
- Learn how to deploy resources to different scopes
- Challenge 12: Deploy an Azure App Service
- Learn how to an Azure App Service & deploy an app to it
- Challenge 13: Deploy an AKS cluster
- Learn how to an AKS cluster & deploy an app to it
Prerequisites
You will want to prepare your machine with the following to help complete the Challenges for this hack:
- Azure Subscription
- Windows Subsystem for Linux (Windows only) Optional, but highly recommended.
- Azure CLI
- PowerShell Cmdlets for Azure
- Visual Studio Code
- Bicep plugins for VS Code
Contributors
- Victor Viriya-ampanond
- William Salazar
- Peter Laudati
- Pete Rodriguez
- Tim Sullivan
- Mark Garner
- Jesse Mrasek
- Andy Huang
- Larry Claman
- PJ Johnson
- Sven Aelterman