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: docs/getting_started.md
+54-33Lines changed: 54 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ If you already have Azure DevOps account, create a [new project](https://docs.mi
14
14
### 3. Create Service Principal to Login to Azure
15
15
16
16
To create service principal, register an application entity in Azure Active Directory (Azure AD) and grant it the Contributor or Owner role of the subscription or the resource group where the web service belongs to. See [how to create service principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) and assign permissions to manage Azure resource.
17
-
Please make note the following values after creating a service principal, we will need them in subsequent steps
17
+
Please make note of the following values after creating a service principal, we will need them in subsequent steps
18
18
- Application (client) ID
19
19
- Directory (tenant) ID
20
20
- Application Secret
@@ -31,135 +31,156 @@ Please name your variable group **``devopsforai-aml-vg``** as we are using this
31
31
32
32
The varibale group should contain the following variables:
Make sure to select the **Allow access to all pipelines** checkbox in the variable group configuration.
39
56
40
-
Up until now you should have
57
+
Up until now you should have:
41
58
- Forked (or cloned) the repo
42
59
- Created a devops account or use an existing one
43
60
- Got service principal details and subscription id
44
61
- A variable group with all configuration values
45
62
46
63
### 5. Create resources
47
64
48
-
The easiest way to create all required resources (Resource Group, ML Workspace, Container Registry, Storage Account, etc.) is to leverage an "Infrastructure as Code" [pipeline coming in this repository](../environment_setup/iac-create-environment.yml). This **IaC** pipeline takes care of all required resources basing on these [ARM templates](../environment_setup/arm-templates/cloud-environment.json). The pipeline requires an **Azure Resource Manager** service connection
65
+
The easiest way to create all required resources (Resource Group, ML Workspace, Container Registry, Storage Account, etc.) is to leverage an "Infrastructure as Code" [pipeline coming in this repository](../environment_setup/iac-create-environment.yml). This **IaC** pipeline takes care of all required resources basing on these [ARM templates](../environment_setup/arm-templates/cloud-environment.json). The pipeline requires an **Azure Resource Manager** service connection:
49
66
50
67

51
68
52
69
Give the connection name **``AzureResourceConnection``** as it is referred by the pipeline definition.
53
70
54
-
In your DevOps project create a build pipeline from your forked **GitHub** repository
71
+
In your DevOps project create a build pipeline from your forked **GitHub** repository:
Alternatively, you can also use a [cleaning pipeline](../environment_setup/iac-create-environment.yml) that removes resources ctreated for this project or you can just delete a resource group in the [Azure Portal](portal.azure.com).
87
+
Alternatively, you can also use a [cleaning pipeline](../environment_setup/iac-remove-environment.yml) that removes resources ctreated for this project or you can just delete a resource group in the [Azure Portal](portal.azure.com).
69
88
70
89
71
90
### 6. Set up Build Pipeline
72
91
73
-
In your [Azure DevOps](https://dev.azure.com) project create and run a new build pipeline refereing to **azdo-ci-build-train.yml** pipeline in yuor forked **GitHub** repository
92
+
In your [Azure DevOps](https://dev.azure.com) project create and run a new build pipeline refereing to [azdo-ci-build-train.yml](../.pipelines/azdo-ci-build-train.yml) pipeline in your forked **GitHub** repository:
74
93
75
94

76
95
77
-
Once the pipline is finished, explore the execution logs
96
+
Name the pipeline **ci-build**. Once the pipline is finished, explore the execution logs:
78
97
79
98

80
99
81
-
and checkout a published training pipeline in the **mlops-AML-WS** workspace in [Azure Portal](https://ms.portal.azure.com/)
100
+
and checkout a published training pipeline in the **mlops-AML-WS** workspace in [Azure Portal](https://ms.portal.azure.com/):
Great, you now have the build pipeline setup, you can either manually trigger it or it gets automatically triggered everytime there is a change in the master branch. The pipeline performs linitnig, unit testing, builds and publishes an **ML Training Pipeline** in an **ML Workspace**
105
+
Great, you now have the build pipeline setup, you can either manually trigger it or it gets automatically triggered everytime there is a change in the master branch. The pipeline performs linting, unit testing, builds and publishes an **ML Training Pipeline** in an **ML Workspace**
88
106
89
-
### 6. Train the Model
107
+
### 7. Train the Model
90
108
91
109
The next step is to invoke the training pipeline created in the previous step. It can be done with a **Release Pipeline**:
92
110
93
111

94
112
95
-
An artifact of this pipeline will be the result of the build pipeline **ci-buid**
113
+
An artifact of this pipeline will be the result of the build pipeline **ci-buid**:
The pipeline is triggered whenever a new training pipeline is published by the builder pipeline. It can also be triggered manually or configured to run on a scheduled basis. Create a new release to trigger the pipeline manually
133
+
This release pipeline should be triggered whenever a new **ML training pipeline** is published by the **AzDo builder pipeline**. It can also be triggered manually or configured to run on a scheduled basis. Create a new release to trigger the pipeline manually:
113
134
114
135

115
136
116
-
Once the pipeline is completed, check out in the **ML Workspace** that the training pipeline is running
137
+
Once the release pipeline is completed, check out in the **ML Workspace** that the training pipeline is running:
117
138
118
139

119
140
120
-
The training pipeline will train, evaluate and register a new model. Wait intil it is fininshed and make sure there is a new model in the **ML Workspace**
141
+
The training pipeline will train, evaluate and register a new model. Wait until it is fininshed and make sure there is a new model in the **ML Workspace**:
121
142
122
143

123
144
124
145
Good! Now we have a trained model.
125
146
126
-
### 6. Train the Model
147
+
### 8. Deploy the Model
127
148
128
149
The final step is to deploy the model across environments with a release pipeline. There will be a **``QA``** environment running on [Azure Container Instances](https://azure.microsoft.com/en-us/services/container-instances/) and a **``Prod``** environment running on [Azure Kubernetes Service](https://azure.microsoft.com/en-us/services/kubernetes-service).
129
150
130
151

131
152
132
153
133
-
This pipeline leverages the **Azure Machine Learning** extension that should be installed in your organization from the [marketplace](https://marketplace.visualstudio.com/items?itemName=ms-air-aiagility.vss-services-azureml)
154
+
This pipeline leverages the **Azure Machine Learning** extension that should be installed in your organization from the [marketplace](https://marketplace.visualstudio.com/items?itemName=ms-air-aiagility.vss-services-azureml).
134
155
135
156
The pipeline consumes two artifacts: the result of the **Build Pipeline** as it contains configuration files and the **model** trained and registered by the ML training pipeline.
136
157
137
-
Configuration of a code **``_ci-build``** artifact is similar to what we did in the previous chapter.
158
+
Configuration of a code **_ci-build** artifact is similar to what we did in the previous chapter.
138
159
139
-
In order to configure a model artifact there should be a service connection to **``mlops-AML-WS``** workspace.
160
+
In order to configure a model artifact there should be a service connection to **mlops-AML-WS** workspace:
Add an artifact to the pipeline and select **AzureML Model Artifact** source type. Select the **Service Endpoint** and **Model Names** from the drop down lists
164
+
Add an artifact to the pipeline and select **AzureML Model Artifact** source type. Select the **Service Endpoint** and **Model Names** from the drop down lists:
144
165
145
166

146
167
147
-
Create a stage **``QA (ACI)``** and add a single task to the job **Azure ML Model Deploy**. Specify task parameters as it is shown below
168
+
Create a stage **QA (ACI)** and add a single task to the job **Azure ML Model Deploy**. Specify task parameters as it is shown below:
148
169
149
170

150
171
151
-
In a similar way create a stage **``Prod (AKS)``** and add a single task to the job **Azure ML Model Deploy**. Specify task parameters as it is shown below
172
+
In a similar way create a stage **Prod (AKS** and add a single task to the job **Azure ML Model Deploy**. Specify task parameters as it is shown below:
152
173
153
174

154
175
155
176
156
-
Note! Creating of a Kubernetes cluster on AKS is out of scope of this tutorial, so you should take care of it on your own.
177
+
**Note:** Creating of a Kubernetes cluster on AKS is out of scope of this tutorial, so you should take care of it on your own.
157
178
158
-
Save the pipeline and craete a release for it to trigger the pipeline manually. Once it's finished, check out deployments in the **``mlops-AML-WS``** workspace.
179
+
Save the pipeline and craete a release to trigger it manually. Once the pipeline exection is finished, check out deployments in the **mlops-AML-WS** workspace.
159
180
160
181
161
182
162
-
Congratulations, you now have three pipelines set up end to end.
183
+
Congratulations! You have three pipelines set up end to end:
163
184
- Build pipeline: triggered on code change to master branch on GitHub, performs linting, unit testing and publishing a trainig pipeline
164
185
- Release Trigger pipeline: runs a published training pipeline to trian, evaluate and register a model
165
186
- Release Deployment pipeline: deploys a model to QA (ACI) and Prod (AKS) environemts
0 commit comments