This tutorial/lab has been created to take you through a DevOps journey to build & deploy an Azure Container Application using Terraform and GitHub Actions.
It will include from setting up the GitHub pipeline, prerequisites and finishing with a successful Container Application being deployed - along with looking at alerting/monitoring!
As with my tutorials/labs, it is an example of a real-world setup!
In this tutorial/lab, you will learn:
- Setup your Azure subscription & create service principal to authenticate between GitHub repo and Azure
- Prerequisites to configure terraform storage
- Use Terraform to deploy container app along with other services including Log Analytics & Application Insights
- Build and deploy example container application to Azure Container Registry
- An understanding of CI/CD with automated application deployments
- Reviewing monitoring and alerting using Application & Container Insights
To run this tutorial/lab successfully, please review each folder - inside each folder has a number of *.md files, starting from 1..2 etc. complete each one in number sequence 1...2...3...etc
-
- Service principal creation
- Configure GitHub secrets with newly created service principal
-
- Setup remote storage account/blob for Terraform .tfstate files
-
- Enabling GitHub Action to begin deploying Azure resources
- Deploys Azure resources ready to begin deploying Container Application
-
Lab 4 - Build & Deploy Application
- Build and deploy test application to Azure Container Registry
-
Lab 5 - Deploy Container App using Terraform
- Deploy container environmenet and application with the image created in lab 4.
-
- Reviewing Application Insights and Log Analytics data generated from deployed container app
Once we commit a change to the source code – we want the Container Application to have been deployed with the latest commit automatically.
- Developers/DevOps commits code change to GitHub Repository
- Change is merged into GitHub Repository
- GitHub Action/Workflow runs the relevant steps required to update/deploy the Azure resources and image
- Latest image is built and deployed to Azure Container Registry
- GitHub Action updates Container App with latest image tag
- Container App pulls latest image from Azure Container Registry using Managed Identity to authenticate
- Container App is monitored both using Log Analytics & Container Insights
Azure resources that will be deployed
Thank you for taking the time to work on this tutorial/labs. Let me know what you thought!
Feel free to check out my blog for more awesome content! https://thomasthornton.cloud/
Ensure to follow me on GitHub. Please star/share this repository!