Skip to content

Commit fc7e48c

Browse files
authored
Updates oct2024 (#43)
* Lab 1 Updates * lab2 updates * lab 3 update * update lab 4 * lab 5 updates * lab 6 doc updates * Update readme. md * update lab readmes * formatting * images update * update prereqs * swap to original app --------- Co-authored-by: Thomas Thornton <>
1 parent 8d5e361 commit fc7e48c

File tree

157 files changed

+1042
-19330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+1042
-19330
lines changed

README.md

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,80 @@
11
# DevOps Journey using Azure DevOps
22

3-
Welcome to your comprehensive guide through a DevOps journey using Azure DevOps! This tutorial will walk you through the entire process, from setting up your pipeline to deploying an application on your Azure Kubernetes cluster.
3+
Welcome to your interactive guide through a DevOps journey using Azure DevOps! 🚀
44

5-
# What you will learn
5+
This tutorial will walk you through the entire process, from setting up your pipeline to deploying an application on your Azure Kubernetes cluster.
66

7-
In this tutorial, you will gain hands-on experience in the following areas:
8-
- **Azure DevOps Setup**: Learn how to set up Azure DevOps to begin deploying to Azure using Pipelines as code.
9-
- **Terraform Deployment**: Discover how to deploy Azure resources using Terraform modules for efficient infrastructure management.
10-
- **Application Deployment**: Deploy a test application to Azure Kubernetes Service (AKS) and understand the deployment process.
11-
- **CI/CD Fundamentals**: Grasp the concepts of Continuous Integration and Continuous Deployment (CI/CD) with automated application deployments.
12-
- **Monitoring and Alerting**: Explore monitoring and alerting solutions using Application Insights and Container Insights to keep track of your application's health and performance.
7+
## What you will learn
8+
9+
- 🛠️ Azure DevOps Setup: Learn how to set up Azure DevOps to begin deploying to Azure using Pipelines as code.
10+
- 🏗️ Terraform Deployment: Discover how to deploy Azure resources using Terraform modules for efficient infrastructure management.
11+
- 🚢 Application Deployment to AKS: Deploy a test application to Azure Kubernetes Service (AKS) and understand the deployment process.
12+
- 🔄 CI/CD Fundamentals: Grasp the concepts of Continuous Integration and Continuous Deployment (CI/CD) with automated application deployments.
13+
- 📊 Monitoring and Alerting: Explore monitoring and alerting solutions using Application Insights and Container Insights to keep track of your application's health and performance.
1314

1415
This setup is designed to reflect a real-world scenario, providing you with practical, applicable skills.
1516

16-
## Tutorial/labs format
17+
## 🧭 Tutorial Format
1718

18-
Before you begin, please ensure you have reviewed the [prerequisites](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/prerequisites.md). This step is crucial to ensure you have all necessary tools and configurations in place.
19+
1. Before you begin, please ensure you have reviewed the [prerequisites](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/prerequisites.md). This step is crucial to ensure you have all necessary tools and configurations in place.
20+
- [ ] Yes
21+
- [ ] No (Please do so before continuing)
1922

20-
The labs are organised sequentially. You can find them [here](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs). Please complete each lab in order: 1, 2, 3, etc.
23+
2. The labs are organised sequentially. You can find them [here](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs). Please complete each lab in order: 1, 2, 3, etc.
2124

2225
By following this structured approach, you will build a strong foundation in DevOps practices using Azure DevOps. This journey is not only about learning but also about applying your knowledge to real-life scenarios. Enjoy your DevOps journey!
2326

24-
### Lab Sequence
25-
27+
## 🗺️ Lab Sequence
2628

2729
1. [Initial Setup](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/1-Initial-Setup) starts you off with setting up:
2830
- [Azure DevOps Setup](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/1-Initial-Setup/1-Azure-DevOps-Setup.md)
29-
- Create an Azure DevOps organisation
30-
- Create a new Azure DevOps project
31-
- Create Azure Workload Identity
32-
33-
- [Azure Terraform setup](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/1-Initial-Setup/2-Azure-Terraform-Remote-Storage.md)
34-
- Create a Blob Storage location for the Terraform state file
31+
- [ ] Create an Azure DevOps organisation
32+
- [ ] Create a new Azure DevOps project
33+
- [ ] Create Azure Workload Identity
3534

36-
- [Create Azure AD Group for AKS Admins](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/1-Initial-Setup/3-Create-Azure-AD-AKS-Admins.md)
37-
- Create an Azure AD group for AKS administrators
35+
2. [Azure Terraform setup](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/1-Initial-Setup/2-Azure-Terraform-Remote-Storage.md)
36+
- [ ] Create a Blob Storage location for the Terraform state file
37+
- [ ] [Create Azure AD Group for AKS Admins](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/1-Initial-Setup/3-Create-Azure-AD-AKS-Admins.md)
38+
- [ ] Create an Azure AD group for AKS administrators
3839

39-
2. [Setup Azure DevOps Pipeline](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/2-AzureDevOps-Terraform-Pipeline) The purpose of this lab is to create all of the Azure cloud services you'll need from an environment/infrastructure perspective to run the test application.
40-
- [Pipeline setup](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/2-AzureDevOps-Terraform-Pipeline/1-Setup-AzureDevOps-Pipeline.md)
41-
- Configure the Azure DevOps pipeline to create necessary Azure cloud services for your environment
40+
[Setup Azure DevOps Pipeline](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/2-AzureDevOps-Terraform-Pipeline) The purpose of this lab is to create all of the Azure cloud services you'll need from an environment/infrastructure perspective to run the test application.
41+
- [ ] [Pipeline setup](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/2-AzureDevOps-Terraform-Pipeline/1-Setup-AzureDevOps-Pipeline.md)
42+
- Configure the Azure DevOps pipeline to create necessary Azure cloud services for your environment
4243

4344
3. [Deploy Application to Azure Container Registry](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/3-Deploy-App-to-ACR) Deploy sample Application to Container Registry.
44-
- [Deploy Application to Azure Container Registry](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/3-Deploy-App-to-ACR/1-Deploy-App-to-ACR.md)
45-
- Build the Docker image locally
46-
- Run the Docker image locally
47-
- Deploy the sample application to the Azure Container Registry
45+
- [ ] [Deploy Application to Azure Container Registry](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/3-Deploy-App-to-ACR/1-Deploy-App-to-ACR.md)
46+
- Build the Docker image locally
47+
- Run the Docker image locally
48+
- Deploy the sample application to the Azure Container Registry
4849

4950
4. [Deploy Application to Azure Kubernetes Cluster](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/4-Deploy-App-AKS)
50-
- [Add AKS ACR Role assignment](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/1-Add-AKS-ACR-Role-Assignment.md)
51-
- Use Terraform to assign roles for AKS managed identity to access the Azure Container Registry
51+
- [ ] [Add AKS ACR Role assignment](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/1-Add-AKS-ACR-Role-Assignment.md)
52+
- Use Terraform to assign roles for AKS managed identity to access the Azure Container Registry
5253

53-
- [Add Application Insights to Terraform](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/2-Add-Application-Insights.md)
54+
- [ ] [Add Application Insights to Terraform](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/2-Add-Application-Insights.md)
5455
- Integrate Application Insights for monitoring the application
5556

56-
- [Add Azure Key Vault to Terraform](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/3-Add-KeyVault-to-Terraform.md)
57+
- [ ] [Add Azure Key Vault to Terraform](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/3-Add-KeyVault-to-Terraform.md)
5758
- Use Azure Key Vault to store secrets in your Azure DevOps Variable Group
5859

59-
- [Update Pipeline to Deploy Application to AKS](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/4-Update-Pipeline-Deploy-App-AKS.md)
60+
- [ ] [Update Pipeline to Deploy Application to AKS](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/4-Deploy-App-AKS/4-Update-Pipeline-Deploy-App-AKS.md)
6061
- Update the pipeline to deploy the application to AKS
6162

6263
5. [Introduce CI/CD](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/5-CICD)
63-
- [Introducing CI/CD to your pipeline](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/5-CICD/1-Introduce-CI-CD-to-your-Pipeline.md)
64+
- [ ] [Introducing CI/CD to your pipeline](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/5-CICD/1-Introduce-CI-CD-to-your-Pipeline.md)
6465
- Configure pipeline triggers for automatic runs
6566

66-
- [Automated deployment of your AKS Application](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/5-CICD/2-Automated-Deployment-AKS-Application.md)
67+
- [ ] [Automated deployment of your AKS Application](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/5-CICD/2-Automated-Deployment-AKS-Application.md)
6768
- Automate the application deployment process to AKS, ensuring updates each time the pipeline runs
6869

6970
6. [Monitoring and Alerting](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/6-Monitoring-and-Alerting)
70-
- [Azure Application Insights](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/6-Monitoring-and-Alerting/1-Application-Insights.md)
71+
- [ ] [Azure Application Insights](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/6-Monitoring-and-Alerting/1-Application-Insights.md)
7172
- Use Application Insights to view telemetry data
7273

73-
- [Azure Application Insights Availability Tests](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/6-Monitoring-and-Alerting/2-Application-Insights-Configure-Availability-Test.md)
74+
- [ ] [Azure Application Insights Availability Tests](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/6-Monitoring-and-Alerting/2-Application-Insights-Configure-Availability-Test.md)
7475
- Configure availability tests using Application Insights
7576

76-
- [Log Analytics Container Insights](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/6-Monitoring-and-Alerting/3-Log-Analytics-Container-Insights.md)
77+
- [ ] [Log Analytics Container Insights](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/labs/6-Monitoring-and-Alerting/3-Log-Analytics-Container-Insights.md)
7778
- Review Log Analytics Container Insights
7879

7980
# CI/CD
@@ -82,13 +83,13 @@ Learn how to set up and configure a pipeline that incorporates CI/CD practices:
8283

8384
![](images/cicdimage.png)
8485

85-
1. Developer changes application source code.
86-
2. Application is committed to the source code repository in Azure Repos.
87-
3. Continuous integration triggers an application build.
88-
4. Continuous deployment within Azure Pipelines triggers an automated deployment with environment-specific configuration values.
89-
5. Updated application is deployed to an environment-specific Kubernetes cluster.
90-
6. Application Insights collects and analyzes health, performance, and usage data.
91-
7. Azure Monitor collects and analyzes health, performance, and usage data.
86+
1. Developer changes code ✍️
87+
2. Code committed to Azure Repos 📤
88+
3. CI triggers build 🏗️ : Continuous integration triggers an application build.
89+
4. CD triggers deployment 🚀 : Continuous deployment within Azure Pipelines triggers an automated deployment with environment-specific configuration values.
90+
5. App deployed to Kubernetes 🎯 : Updated application is deployed to an environment-specific Kubernetes cluster.
91+
6. Monitoring begins 📊 : Application Insights collects and analyzes health, performance, and usage data.
92+
7. Monitoring continues 📊 : Azure Monitor collects and analyzes health, performance, and usage data.
9293

9394
# Thank you
9495
Thank you for participating in this tutorial/labs. Your feedback is valuable!
@@ -100,5 +101,5 @@ Connect with me on social media:
100101
Feel free to check out my blog for more awesome content!
101102
https://thomasthornton.cloud/
102103

103-
Ensure to follow me on GitHub. Please star/share this repository!
104+
Did you find this helpful? Please star and share this repository!
104105

labs/1-Initial-Setup/1-Azure-DevOps-Setup.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
# Azure DevOps setup
22

3-
## Azure DevOps Organisation Setup
4-
The first setup to setting up Azure DevOps is to create an organisation
3+
## 🎯 Purpose
4+
Set up Azure DevOps environment for efficient DevOps practices and pipeline management.
55

6-
1. [Sign into Azure DevOps](https://go.microsoft.com/fwlink/?LinkId=307137)
7-
2. Select **New Organisation**
8-
3. Enter your preferred Azure DevOps organisation name and hosting location. (For this lab, the organisation name is thomasthorntoncloud.)
9-
4. Once your organisation is created, you can access it anytime using:
10-
`https://dev.azure.com/{yourorganisation}`
11-
12-
Once an organisation has been setup, next is to create an Azure DevOps project
6+
## Azure DevOps Organisation Setup & Project Creation
137

14-
## Azure DevOps Project Creation
158
Creating a project allows you to utilise repositories, pipelines, and other features within Azure DevOps.
169

1710
1. [Sign into Azure DevOps](https://go.microsoft.com/fwlink/?LinkId=307137)
@@ -21,6 +14,18 @@ Creating a project allows you to utilise repositories, pipelines, and other feat
2114

2215
![](images/azure-devops-project-creation.png)
2316

17+
### 🔍 Verification:
18+
- Confirm access to your new organisation URL
19+
- Confirm your new project appears in the organisation dashboard
20+
21+
### 🧠 Knowledge Check:
22+
- Why is creating an Azure DevOps organisation the first step?
23+
- What information is required when setting up an organisation?
24+
- What features become available after creating a project?
25+
- How does project creation facilitate team collaboration?
26+
27+
#### 💡 Pro Tip: Use clear, descriptive project names and descriptions to help team members understand the project's purpose at a glance.
28+
2429
## Azure Workload Identity Federation
2530
Using a Workload Identity Federation is considered best practice for DevOps within your CI/CD pipeline. It serves as an identity to authenticate within your Azure Subscription, allowing you to deploy the relevant Terraform code.
2631

@@ -44,4 +49,14 @@ Service Principal Role Assignment
4449

4550
![](images/azure-devops-workload-identity-4.png)
4651

47-
You are now all set and ready to deploy to Azure using Azure DevOps!
52+
### 🔍 Verification:
53+
- Check that the Workload Identity appears in your Azure Active Directory
54+
- Confirm the assigned role in Azure subscription
55+
56+
### 🧠 Knowledge Check:
57+
- Why is Workload Identity Federation considered best practice for DevOps CI/CD pipelines?
58+
- What role does the Service Principal play in Azure resource deployment?
59+
60+
#### 💡 Pro Tip: Regularly review and update the permissions assigned to your Workload Identity to maintain the principle of least privilege.
61+
62+
You are now all set and ready to deploy to Azure using Azure DevOps!
Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,56 @@
1-
# Azure Terraform Setup
1+
# Configure Storage Account for Terraform State File
22

3-
In this lab, you will create a storage location for the remote Terraform state file.
3+
## 🎯 Purpose
4+
In this lab, you'll create a secure location to store the remote Terraform State file. This is crucial for maintaining consistency and collaboration in your infrastructure-as-code projects.
45

5-
When deploying with Terraform, a state file is required. This file is used by Terraform to map Azure resources to your configuration, track metadata, and improve performance for larger deployments.
6+
## 🛠️ Create Blob Storage for Terraform State File
67

7-
## Create Blob Storage location for Terraform State file
8-
1. Edit the [variables](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/1-Initial-Setup/scripts/create-terraform-storage.sh#L3-L4)
9-
2. Run the script `./scripts/create-terraform-storage.sh`
10-
3. The script will create the following:
11-
- Azure Resource Group
12-
- Azure Storage Account
13-
- Azure Blob storage location within Azure Storage Account
8+
### Prerequisites
9+
- [ ] Azure CLI installed and configured
10+
- [ ] Basic understanding of Azure Storage concepts
11+
12+
### Steps
13+
14+
1. **Customise Variables**
15+
- Open the [create-terraform-storage.sh](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/blob/main/1-Initial-Setup/scripts/create-terraform-storage.sh) script.
16+
- Locate the following lines:
17+
18+
```bash
19+
RESOURCE_GROUP_NAME="devops-journey-rg-oct2024"
20+
STORAGE_ACCOUNT_NAME="devopsjourneyoct2024"
21+
```
22+
23+
- Replace the placeholders with your desired names.
24+
25+
2. **Run the Script**
26+
27+
- Run the following command in your terminal:
28+
29+
```bash
30+
./scripts/create-terraform-storage.sh
31+
```
32+
33+
3. **What's Happening Behind the Scenes?**
34+
The script performs these actions:
35+
- [ ] Creates an Azure Resource Group
36+
- [ ] Sets up an Azure Storage Account
37+
- [ ] Establishes an Azure Blob storage container
38+
39+
### 🔍 Verification
40+
To ensure everything was set up correctly:
41+
42+
1. Log into the [Azure Portal](https://portal.azure.com).
43+
2. Navigate to your newly created Resource Group.
44+
3. Verify the presence of the Storage Account.
45+
4. Within the Storage Account, check for the Blob container.
46+
5. It should look similar to this:
1447
1548
![](images/terraform-storage.png)
1649
17-
This setup ensures that your Terraform state file is securely stored and easily accessible for your deployments.
50+
### 🧠 Knowledge Check
51+
After running the script, try to answer these questions:
52+
1. Why is it important to use remote state storage for Terraform?
53+
2. What are the benefits of using Azure Blob Storage for this purpose?
54+
3. How would you access this state file in your Terraform configurations?
55+
56+
#### 💡 Pro Tip Consider: setting up access policies and encryption for your storage account to enhance security. Azure provides several options for this, including Azure AD authentication and Azure Key Vault integration.

0 commit comments

Comments
 (0)