MinaKems / Azure-Bicep-Workshop

💪 Azure Bicep Workshop: Deploy a full stack application to Azure using Bicep templates. The goal of the workshop us to learn Azure Bicep lang deploying azure landing zone and infrastructure for full stack application. The workshop starts with creation of a management group structure followed by RBAC as code and policy as code concept (custom roles, policies as code and its assignments). Then we’ll explore three tier application that includes python / flask API, PostgreSQL and client based on vue.js. For each tier we’ll provision resource(s) such as web app and service plan for API, static site for client and managed Postgres Flexible Server integrated in virtual network with private links for database-server communication. On top of it we will deploy load balancer with WAF to protect our application agains security threats. We will use additional resources for deployment such as container registry, managed identity and more. Workshop includes DevOps works, best practices and common patterns. It is possible to follow alone, also suggestions are welcome! Good luck!

Home Page:https://erudinsky.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

azure-bicep-workshop-example

Introduction

Welcome to Azure Bicep workshop.

Bicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources. In a Bicep file, you define the infrastructure you want to deploy to Azure, and then use that file throughout the development lifecycle to repeatedly deploy your infrastructure. Your resources are deployed in a consistent manner.

ARM processing

We are going to deploy a full stack application to Azure in multiple environments reusing Bicep templates.

Learning objectives:

  • Infrastructure-as-Code 101
  • ARM and Bicep
  • Full stack app
  • Authoring, best practices
  • DevOps

Prerequisites:

  • Fundamental cloud computing knowledge about Microsoft Azure
  • Azure subscription (if you don't have, check how to get started)
  • Visual Studio Code (VSC) with Bicep extension
  • Azure CLI version 2.35 (or above), check how install
  • You can also install Bicep CLI manually as described here, but Azure CLI should be able to do this once you execute command that needs Bicep transpiler

Prerequisites checks:

We recommend to follow this workshop using Linux or MacOS terminal, for Windows users it's best to install WSL. Open up your VSC and using terminal window check the following:

# 1. Check version of the Azure CLI
az --version

# 2. Login to Azure Portal
az login

# 3. Create a resource group
az create group -g azure-bicep-worshop-rg -l westeurope

# 4. List resource groups (table output)
az group list -o table

# 5. Delete a resource group
az delete group -g azure-bicep-worshop-rg

Selecting location for the resources you need to keep in mind two things: latency (this website helps to measure it) and products available by region.

Make sure all 5 steps from the above give no errors. If you have access to multiple Azure tenants and subscriptions, double check your workspace and set proper subscription so you won't get any surprises:

# 1. List subscriptions (table output)
az account list -o table

# 2. Set an account (should be marked "True" in "IsDefault")
az account set -is <SubscriptionId>

Workshop

  1. Getting started with Bicep
  2. Set Azure environment
  3. Prepare database
  4. Server side
  5. Client with vue.js
  6. DevOps
  7. Clean up

You can also follow this workshop by watching two videos

Author

Hi there 👋

I’m Evgeny Rudinsky, an Cloud Architect based in The Netherlands and author of this workshop. These days most of my work I do with Microsoft Azure and I’m certified Azure Solution Architect Expert, DevOps Engineer Expert, Azure Security Engineer, Azure Administrator Associate, Azure Developer Associate and Identity and Access Administrator Associate.

Follow me on @evgenyrudinsky and check my blog if interested in Cloud Native, Automation and DevSecOps.

About

💪 Azure Bicep Workshop: Deploy a full stack application to Azure using Bicep templates. The goal of the workshop us to learn Azure Bicep lang deploying azure landing zone and infrastructure for full stack application. The workshop starts with creation of a management group structure followed by RBAC as code and policy as code concept (custom roles, policies as code and its assignments). Then we’ll explore three tier application that includes python / flask API, PostgreSQL and client based on vue.js. For each tier we’ll provision resource(s) such as web app and service plan for API, static site for client and managed Postgres Flexible Server integrated in virtual network with private links for database-server communication. On top of it we will deploy load balancer with WAF to protect our application agains security threats. We will use additional resources for deployment such as container registry, managed identity and more. Workshop includes DevOps works, best practices and common patterns. It is possible to follow alone, also suggestions are welcome! Good luck!

https://erudinsky.com


Languages

Language:Bicep 40.1%Language:Vue 39.9%Language:Python 13.8%Language:JavaScript 3.6%Language:HTML 2.0%Language:Dockerfile 0.6%