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
Copy file name to clipboardExpand all lines: README.md
+20-22Lines changed: 20 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# DevOps-The-Hard-Way-Azure
2
2
3
-
This tutorial contains a full, real-world solution for setting up an environment that is using DevOps technologies and practices for deploying apps and cloud services/cloud infrastructure to Azure.
3
+
Welcome to the DevOps-The-Hard-Way-Azure tutorial! This comprehensive guide provides a real-world solution for implementing DevOps practices and technologies to deploy applications and cloud services/infrastructure on Microsoft Azure.
4
4
5
5
The repository contains free labs, documentation, diagrams, and docs for setting up an entire workflow and DevOps environment from a real-world perspective in Azure.
6
6
@@ -9,8 +9,9 @@ The scenario that you're currently facing is you work in an organization that is
9
9
10
10
You're brought in to the company and team to make things more modern so the organization can not only succeed, but stay ahead of their competition. Management now understands the needs and complexity that comes with staying ahead of their competition and they know that they need to. Otherwise, the organization will fall...
11
11
12
+
12
13
## DevOps Solution
13
-
The solution is to deploy the Uber API for the sign-up page. Currently this solution is sitting on a bunch of baremetal, but it's time to sprinkle a little DevOps on it.
14
+
The solution is to deploy the Uber API for the sign-up page. Currently this solution is sitting on a bunch of baremetal, but it's time to sprinkle a little DevOps on it. Although we won't be coding the application itself, we'll cover the deployment process using DevOps tools and methodologies.
14
15
15
16

16
17
@@ -21,26 +22,16 @@ As a DevOps Engineer, you're more or less (most likely) not writing the app, but
@@ -67,3 +58,10 @@ In this scenario, the Terraform State file will be stored in remote state locati
67
58
-[Install And Run Checkov](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/blob/main/Terraform-Static-Code-Analysis/1-Checkov-For-Terraform.md)
68
59
6. CICD - The purpose of this section is to automatically create an AKS cluster with CICD using GitHub Actions
69
60
-[Create a GitHub Actions CICD pipeline](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/blob/main/Terraform-AZURE-Services-Creation/5-Run-CICD-For-AKS-Cluster.md)
61
+
62
+
## Conclusion
63
+
By following this tutorial, you'll not only deploy an example app on Azure but also gain valuable insights into modern DevOps practices and tools.
64
+
65
+
Let's embark on this journey to transform your organization into a lean, agile, and competitive force in the digital landscape. Happy deploying! 🚀🔧
Copy file name to clipboardExpand all lines: Terraform-AZURE-Services-Creation/1-Create-ACR.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
# Create an Azure Container Registry Repository
2
2
3
+
Before proceeding, ensure that the values in the terraform.tfvars file are accurate for your environment. You may need to customize these values to match your specific configuration.
4
+
3
5
In this lab you will create a repository to store the Docker image that you created for the Uber app.
4
6
5
7
## Create the ACR Terraform Configuration
6
8
7
9
1. You can find the Terraform configuration for Azure Container Registry (ACR) [here](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/tree/main/Terraform-AZURE-Services-Creation/ACR). The Terraform configuration files are used to create a repository in Azure Container Registry (ACR).
8
10
9
-
The Terraform `main.tf` will do a few things:
11
+
The Terraform `acr.tf` will:
10
12
- Use a Terraform backend to store the `.tfstate` in an Azure Storage Account
11
13
- Use the `uksouth` region, but feel free to change that if you'd like
12
14
- Use the `azurerm_resource_group` Terraform resource to create a new Resource Group.
In this lab you will create a Virtual Network (VNET) that will be used to deploy your AKS instance into
3
+
Before proceeding, ensure that the values in the terraform.tfvars file are accurate for your environment. You may need to customize these values to match your specific configuration.
4
+
5
+
In this lab you will:
6
+
- Create a Virtual Network (VNET) that will be used to deploy your AKS instance into
7
+
- Create a Network Security Group (NSG) and assign to the relevant subnets
8
+
- Create an Azure Application Gateway for Containers and associate it with the VNET
4
9
5
10
## Create the Azure VNET Terraform Configuration
6
11
7
12
1. You can find the Terraform configuration for Azure Virtual Network [here](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/tree/main/Terraform-AZURE-Services-Creation/VNET). The Terraform configuration files are used to create an Azure Vitual Network.
8
13
9
-
The Terraform `main.tf` will do a few things:
14
+
The Terraform `vnet.tf` will:
15
+
- Use a Terraform backend to store the `.tfstate` in an Azure Storage Account
10
16
- Use the `azurerm_virtual_network` Terraform resource to create a VNET.
11
17
- Use the `azurerm_subnet` Terraform resource to create relevant subnets.
12
18
- Use the `uksouth` region, but feel free to change that if you'd like
13
19
14
-
2. Create the VNET by running the following:
20
+
The Terraform `nsg.tf` will:
21
+
- Use the `azurerm_network_security_group` Terraform resource to create a NSG.
22
+
- Use the `azurerm_subnet_network_security_group_association` Terraform resource to associate the NSG to the relevant subnets.
23
+
24
+
The Terraform `alb.tf` will:
25
+
- Use the `azurerm_application_load_balancer` Terraform resource to create an Azure Application Gateway for Containers.
26
+
- Use the `azurerm_application_load_balancer_subnet_association` Terraform resource to associate the Azure Application Gateway with the VNET.
27
+
- Use the `azurerm_application_load_balancer_frontend` Terraform resource to create a frontend for the Azure Application Gateway.
28
+
29
+
30
+
2. Create the VNET, NSG & Azure Application Gateway for Containers by running the following:
15
31
-`terraform init` - To initialize the working directory and pull down the provider
16
32
-`terraform plan` - To go through a "check" and confirm the configurations are valid
Copy file name to clipboardExpand all lines: Terraform-AZURE-Services-Creation/3-Create-Log-Analytics.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,15 @@
1
1
# Create an Azure Log Analytics Workspace
2
2
3
+
Before proceeding, ensure that the values in the terraform.tfvars file are accurate for your environment. You may need to customize these values to match your specific configuration.
4
+
3
5
In this lab you will create a Log Analytics workspace that will be used to view container insights of your AKS Cluster
4
6
5
7
## Create the Log Analytics Workspace Terraform Configuration
6
8
7
9
1. You can find the Terraform configuration for Log Analytics [here](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/tree/main/Terraform-AZURE-Services-Creation/Log-Analytics). The Terraform configuration files are used to create the Log Analytiocs workspace.
8
10
9
-
The Terraform `main.tf` will do a few things:
11
+
The Terraform `la.tf` will:
12
+
- Use a Terraform backend to store the `.tfstate` in an Azure Storage Account
10
13
- Use the `azurerm_log_analytics_workspace` Terraform resource to create a Log Analytics workspace.
11
14
- Use the `azurerm_log_analytics_solution` Terraform resource to enable the Log Analytics solution ContainerInsights.
12
15
- Use the `uksouth` region, but feel free to change that if you'd like
Copy file name to clipboardExpand all lines: Terraform-AZURE-Services-Creation/4-Create-AKS-Cluster-IAM-Roles.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Create An AKS Cluster and IAM Roles
2
2
3
+
Before proceeding, ensure that the values in the terraform.tfvars file are accurate for your environment. You may need to customize these values to match your specific configuration.
4
+
3
5
In this lab you will create:
4
6
- The AKS cluster
5
7
- The appropriate IAM roles for AKS
@@ -8,11 +10,19 @@ In this lab you will create:
8
10
9
11
1. You can find the Terraform configuration for AKS [here](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/tree/main/Terraform-AZURE-Services-Creation/AKS). The Terraform configuration files are used to create an AKS cluster and IAM Role/Policy for AKS.
10
12
11
-
The Terraform `main.tf` will do a few things:
13
+
The Terraform `aks.tf` will:
12
14
- Use the `azurerm_kubernetes_cluster` Terraform resource to AKS Cluster
13
15
- Use the `azurerm_role_assignment` Terraform resource to create the two neccessary role assignments
14
16
- Use the `uksouth` region, but feel free to change that if you'd like
15
17
18
+
The Terraform `managed_identity.tf` will:
19
+
- Use the `azurerm_user_assigned_identity` Terraform resource to create a user assigned identity as part of the Azure Application Gateway for Containers setup
20
+
- Use the `azurerm_federated_identity_credential` Terraform resource to create a federated identity credential as part of the Azure Application Gateway for Containers setup
21
+
22
+
The Terraform `rbac.tf` will:
23
+
- Use the `azurerm_role_assignment` Terraform resource to create the necessary role assignments for the AKS cluster
24
+
- Use the `azurerm_role_definition` Terraform resource to create the necessary role definitions for the AKS cluster
25
+
16
26
2. In line 8 of `terraform.tfvars` replace the actual Azure AD Group ID you noted down [earlier](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/blob/main/Azure/2-Create-Azure-AD-Group-AKS-Admins.md)
Copy file name to clipboardExpand all lines: Terraform-AZURE-Services-Creation/5-Run-CICD-For-AKS-Cluster.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Create AKS Cluster With CICD
2
2
3
+
Before proceeding, ensure that the values in the terraform.tfvars file are accurate for your environment. You may need to customize these values to match your specific configuration.
4
+
3
5
In this lab, you'll learn how to create an AKS cluster using GitHub Actions. The code can be found [here](https://github.com/thomast1906/DevOps-The-Hard-Way-Azure/tree/main/Terraform-AZURE-Services-Creation/AKS)
4
6
5
7
@@ -33,16 +35,16 @@ Now that the secrets are created, it's time to create the pipeline.
33
35
34
36
1. Under the GitHub repository, click on the **Actions** tab
35
37
2. You will see a workflow already called `CI`
36
-
3. Select `CI` workflow and then select `Run workflow``from` main branch
38
+
3. Select `CI` workflow and then select `Run workflow``from` main branch (Also note, the pipeline is configured to run also during a Pull Request and or a Push to the main branch)
37
39
38
40
The pipeline does a few things:
39
-
- On line 4, you'll see `workflow_dispatch`, which means the pipeline won't automatically run unless you kick it off. You can of course change this to have the pipeline automatically run if you, for example, push code to the `dev` or `main` branch.
41
+
- On line 10, you'll see `workflow_dispatch`, which means the pipeline won't automatically run unless you kick it off. You can of course change this to have the pipeline automatically run if you, for example, push code to the `dev` or `main` branch.
40
42
- The code is checked-out
41
43
- Authentication occurs to Azure
42
44
- Terraform is set up
43
-
- Terraform format occurs
45
+
- Terraform format occurs & formats incorrect terraform, then pushes back into the branch
44
46
- Terraform init occurs
45
47
- Terraform plan occurs
46
48
- Terraform apply occurs
47
49
48
-
4. Run the pipeline and watch as the pipeline automatically creates the AKS cluster
50
+
4. Run the pipeline and watch as the pipeline automatically create the AKS cluster
0 commit comments