You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! 🚀
4
4
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.
6
6
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.
13
14
14
15
This setup is designed to reflect a real-world scenario, providing you with practical, applicable skills.
15
16
16
-
## Tutorial/labs format
17
+
## 🧭 Tutorial Format
17
18
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)
19
22
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.
21
24
22
25
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!
23
26
24
-
### Lab Sequence
25
-
27
+
## 🗺️ Lab Sequence
26
28
27
29
1.[Initial Setup](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/1-Initial-Setup) starts you off with setting up:
- 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
35
34
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)
-[ ] 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
38
39
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.
- 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.
- Configure the Azure DevOps pipeline to create necessary Azure cloud services for your environment
42
43
43
44
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
48
49
49
50
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
52
53
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)
54
55
- Integrate Application Insights for monitoring the application
55
56
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)
57
58
- Use Azure Key Vault to store secrets in your Azure DevOps Variable Group
58
59
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)
60
61
- Update the pipeline to deploy the application to AKS
-[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)
64
65
- Configure pipeline triggers for automatic runs
65
66
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)
67
68
- Automate the application deployment process to AKS, ensuring updates each time the pipeline runs
68
69
69
70
6.[Monitoring and Alerting](https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/tree/main/labs/6-Monitoring-and-Alerting)
Creating a project allows you to utilise repositories, pipelines, and other features within Azure DevOps.
16
9
17
10
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
21
14
22
15

23
16
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
+
24
29
## Azure Workload Identity Federation
25
30
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.
26
31
@@ -44,4 +49,14 @@ Service Principal Role Assignment
44
49
45
50

46
51
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!
# Configure Storage Account for Terraform State File
2
2
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.
4
5
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
6
7
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 commandin 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:
14
47
15
48

16
49
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