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
{{ message }}
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: Instructions/Labs/AZ400_M07_Integrating_Azure_Key_Vault_with_Azure_DevOps.md
+19-20Lines changed: 19 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,19 @@ lab:
11
11
12
12
Azure Key Vault provides secure storage and management of sensitive data, such as keys, passwords, and certificates. Azure Key Vault includes supports for hardware security modules, as well as a range of encryption algorithms and key lengths. By using Azure Key Vault, you can minimize the possibility of disclosing sensitive data through source code, which is a common mistake made by developers. Access to Azure Key Vault requires proper authentication and authorization, supporting fine grained permissions to its content.
13
13
14
-
In this lab, you will see how you can integrate Azure Key Vault with an Azure DevOps pipeline by using the following steps:
14
+
In this lab, you will see how you can integrate Azure Key Vault with an Azure Pipelines by using the following steps:
15
15
16
-
- create an Azure Key vault to store a MySQL server password as a secret.
17
-
- create an Azure service principal to provide access to secrets in the Azure Key vault.
18
-
- configure permissions to allow the service principal to read the secret.
19
-
- configure pipeline to retrieve the password from the Azure Key vault and pass it on to subsequent tasks.
16
+
- create an Azure Key vault to store a ACR password as a secret.
17
+
- create an Azure Service Principal to provide access to secrets in the Azure Key Vault.
18
+
- configure permissions to allow the Service Principal to read the secret.
19
+
- configure pipeline to retrieve the password from the Azure Key Vault and pass it on to subsequent tasks.
20
20
21
21
## Objectives
22
22
23
23
After you complete this lab, you will be able to:
24
24
25
-
- Create an Azure Active Directory (Azure AD) service principal.
26
-
- Create an Azure key vault.
27
-
- Track pull requests through the Azure DevOps pipeline.
25
+
- Create an Azure Active Directory (Azure AD) Service Principal.
26
+
- Create an Azure Key Vault.
28
27
29
28
## Lab duration
30
29
@@ -58,7 +57,7 @@ If you don't already have an Azure DevOps organization that you can use for this
58
57
59
58
### Exercise 0: Configure the lab prerequisites
60
59
61
-
In this exercise, you will set up the prerequisites for the lab, which consist of a new Azure DevOps project with a repository based on the [eShopOnWeb](https://dev.azure.com/unhueteb/_git/eshopweb-az400).
60
+
In this exercise, you will set up the prerequisites for the lab, which consist of a new Azure DevOps project with a repository based on the [eShopOnWeb](https://github.com/MicrosoftLearning/eShopOnWeb).
62
61
63
62
#### Task 1: (skip if done) Create and configure the team project
64
63
@@ -86,20 +85,20 @@ In this task you will import the eShopOnWeb Git repository that will be used by
86
85
### Exercise 1: Setup CI pipeline to build eShopOnWeb container
87
86
88
87
Setup CI YAML pipeline for:
89
-
-Create an Azure Container Registry to keep the container images
90
-
-Use Docker Compose to build and push **eshoppublicapi** and **eshopwebmvc** container images. Only **eshopwebmvc** container will be deployed.
88
+
-Creating an Azure Container Registry to keep the container images
89
+
-Using Docker Compose to build and push **eshoppublicapi** and **eshopwebmvc** container images. Only **eshopwebmvc** container will be deployed.
91
90
92
-
#### Task 1: (skip if done) Create a service principal
91
+
#### Task 1: (skip if done) Create a Service Principal
93
92
94
-
In this task, you will create a service principal by using the Azure CLI, which will allow Azure DevOps to:
95
-
- Deploy resources on your azure subscription
93
+
In this task, you will create a Service Principal by using the Azure CLI, which will allow Azure DevOps to:
94
+
- Deploy resources on your Azure subscription
96
95
- Have read access on the later created Key Vault secrets.
97
96
98
-
> **Note**: If you do already have a service principal, you can proceed directly to the next task.
97
+
> **Note**: If you do already have a Service Principal, you can proceed directly to the next task.
99
98
100
-
You will need a service principal to deploy Azure resources from Azure Pipelines. Since we are going to retrieve secrets in a pipeline, we will need to grant permission to the service when we create the Azure Key vault.
99
+
You will need a Service Principal to deploy Azure resources from Azure Pipelines. Since we are going to retrieve secrets in a pipeline, we will need to grant permission to the service when we create the Azure Key Vault.
101
100
102
-
A service principal is automatically created by Azure Pipeline when you connect to an Azure subscription from inside a pipeline definition or when you create a new service connection from the project settings page (automatic option). You can also manually create the service principal from the portal or using Azure CLI and re-use it across projects.
101
+
A Service Principal is automatically created by Azure Pipelines, when you connect to an Azure subscription from inside a pipeline definition or when you create a new Service Connection from the project settings page (automatic option). You can also manually create the Service Principal from the portal or using Azure CLI and re-use it across projects.
103
102
104
103
1. From the lab computer, start a web browser, navigate to the [**Azure Portal**](https://portal.azure.com), and sign in with the user account that has the Owner role in the Azure subscription you will be using in this lab and has the role of the Global Administrator in the Azure AD tenant associated with this subscription.
105
104
1. In the Azure portal, click on the **Cloud Shell** icon, located directly to the right of the search textbox at the top of the page.
@@ -116,7 +115,7 @@ A service principal is automatically created by Azure Pipeline when you connect
116
115
117
116
> **Note**: Copy both values to a text file. You will need them later in this lab.
118
117
119
-
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following command to create a service principal (replace the **myServicePrincipalName** with any unique string of characters consisting of letters and digits) and **mySubscriptionID** with your Azure subscriptionId :
118
+
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following command to create a Service Principal (replace the **myServicePrincipalName** with any unique string of characters consisting of letters and digits) and **mySubscriptionID** with your Azure subscriptionId :
120
119
121
120
```
122
121
az ad sp create-for-rbac --name myServicePrincipalName \
@@ -132,7 +131,7 @@ A service principal is automatically created by Azure Pipeline when you connect
132
131
133
132
1. On the **New service connection** blade, select **Azure Resource Manager** and **Next** (may need to scroll down).
134
133
135
-
1. The choose **Service principal (manual)** and click on **Next**.
134
+
1. The choose **Service Principal (manual)** and click on **Next**.
136
135
137
136
1. Fill in the empty fields using the information gathered during previous steps:
138
137
- Subscription Id and Name
@@ -242,7 +241,7 @@ In this task, you will create a Variable Group in Azure DevOps that will retriev
242
241
243
242

244
243
245
-
#### Task 4: Setup CD Pipeline to deploy container in ACI
244
+
#### Task 4: Setup CD Pipeline to deploy container in Azure Container Instance(ACI)
246
245
247
246
In this task, you will import a CD pipeline, customize it and run it for deploying the container image created before in a Azure Container Instance.
0 commit comments