This advanced CAF Hackathon is focusing on infrastructure As Code with Bicep.
DevOps is a journey not a destination. Implementing Infrastructure-as-Code is one of the first steps you will take on your DevOps journey!
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 define your IaC. Some of these include:
- Azure Resource Manager (ARM) Templates
- Azure 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 is just one way amongst many. If you want to learn how to do IaC in Azure with other technologies.
This hack will help you learn:
- How Azure Bicep works 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.
-
Challenge 1:"Hello World" Bicep deployment
- Develop a simple template that takes an input and returns an output
-
Challenge 2: Deploy a Virtual Network
- Learn how to find Azure resource values
-
Challenge 3: Open Some Ports
- Learn about variables, dependencies, and idempotency
-
Challenge 4: Secret Values with Azure Key Vault
- Learn how to integrate Azure Key Vault
-
Challenge 5: Deploy a Virtual Machine
- Learn how to deploy a Linux Virtual Machine
-
Challenge 6: Bicep Modules
- Learn how to seperate your deployments into modules
-
Challenge 7: Configure a Linux Server
- Learn how to use custom scripts for configuration of servers
You will want to prepare your machine with the following to help complete the Challenges for this hack:
- Azure Subscription
- PowerShell Cmdlets for Azure
- Visual Studio Code
- Bicep plugins for VS Code