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
+39-18Lines changed: 39 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,9 @@ Please make note of the following values after creating a service principal, we
25
25
26
26
### 4. Create a Variable Group
27
27
28
-
We make use of variable group inside Azure DevOps to store variables and their values that we want to make available across multiple pipelines. You can either store the values directly in [Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=designer#create-a-variable-group) or connect to an Azure Key Vault in your subscription. Please refer to the documentation [here](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=designer#create-a-variable-group) to learn more about how to create a variable group and [link](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=designer#use-a-variable-group) it to your pipeline.
28
+
We make use of variable group inside Azure DevOps to store variables and their values that we want to make available across multiple pipelines. You can either store the values directly in [Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=designer#create-a-variable-group) or connect to an Azure Key Vault in your subscription. Please refer to the documentation [here](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=designer#create-a-variable-group) to learn more about how to create a variable group and [link](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=designer#use-a-variable-group) it to your pipeline. Click on **Library** in the **Pipelines** section as indicated below:
Please name your variable group **``devopsforai-aml-vg``** as we are using this name within our build yaml file.
31
33
@@ -66,7 +68,7 @@ The easiest way to create all required resources (Resource Group, ML Workspace,
66
68
67
69

68
70
69
-
Give the connection name **``AzureResourceConnection``** as it is referred by the pipeline definition.
71
+
Give the connection name **``AzureResourceConnection``** as it is referred by the pipeline definition. Leave the **``Resource Group``** field empty.
70
72
71
73
In your DevOps project create a build pipeline from your forked **GitHub** repository:
72
74
@@ -106,23 +108,23 @@ Great, you now have the build pipeline setup, you can either manually trigger it
106
108
107
109
### 7. Train the Model
108
110
109
-
The next step is to invoke the training pipeline created in the previous step. It can be done with a **Release Pipeline**:
111
+
The next step is to invoke the training pipeline created in the previous step. It can be done with a **Release Pipeline**. Click on the Pipelines/Releases menu, and then **New pipeline**, and then click on "Empty Job" on the "Select a template" window that pops to the right:
110
112
111
113

112
114
113
115
An artifact of this pipeline will be the result of the build pipeline **ci-buid**:
Configure a pipeline to see values from the previously defined variable group **devopsforai-aml-vg**:
119
+
Configure a pipeline to see values from the previously defined variable group **devopsforai-aml-vg**. Click on the "Variable groups", and to the right, click on "Link variable group". From there, pick the **devopsforai-aml-vg** variable group we created in an earlier step, choose "Release" as a variable group scope, and click on "Link":
This release pipeline should be automatically triggered (continuous deployment) 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:
136
+
as in the screen shot below, leaving all other fields to their default value:
137
+
138
+

139
+
140
+
Now, add the automation to trigger a run of this pipeline whenever the **ci_build** build is completed, click on the lightning bolt icon on the top right of the **\_ci-build** artifact is selected, and enable the automatic release :
This release pipeline should now be automatically triggered (continuous deployment) whenever a new **ML training pipeline** is published by the **ci-build 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 by clicking on the "Create release" button on the top right of your screen, when selecting this new build pipeline:
135
145
136
146

137
147
138
-
Once the release pipeline is completed, check out in the **ML Workspace** that the training pipeline is running:
148
+
Leave the fields empty and click on "create". Once the release pipeline is completed, check out in the **ML Workspace** that the training pipeline is running:
139
149
140
150

141
151
@@ -147,7 +157,7 @@ Good! Now we have a trained model.
147
157
148
158
### 8. Deploy the Model
149
159
150
-
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).
160
+
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). This is the final picture of what your release pipeline should look like:
151
161
152
162

153
163
@@ -156,19 +166,19 @@ This pipeline leverages the **Azure Machine Learning** extension that should be
156
166
157
167
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.
158
168
159
-
Configuration of a code **_ci-build** artifact is similar to what we did in the previous chapter.
169
+
Add the **\_ci-build** artifact using the same process as what we did in the previous step.
160
170
161
-
In order to configure a model artifact there should be a service connection to **mlops-AML-WS** workspace:
171
+
In order to configure a model artifact there should be a service connection to **mlops-AML-WS** workspace. To get there, go to the project settings (by clicking on the cog wheel to the bottom left of the screen), and then click on **Service connections** under the **Pipelines** section:
162
172
163
173
**Note:** Creating service connection using Azure Machine Learning extension requires 'Owner' or 'User Access Administrator' permissions on the 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:
177
+
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. **Service Endpoint** refers to the **Service connection** created in the previous step:
168
178
169
179

170
180
171
-
Create a stage **QA (ACI)** and add a single task to the job **Azure ML Model Deploy**:
181
+
Go to the new **Releases Pipelines** section, and click new to create a new release pipeline. A first stage is automatically created and choose **start with an Empty job**. Name the stage **QA (ACI)** and add a single task to the job **Azure ML Model Deploy**. Make sure that the Agent Specification is ubuntu-16.04 under the Agent Job:
172
182
173
183

174
184
@@ -186,7 +196,7 @@ Specify task parameters as it is shown in the table below:
186
196
| Overwrite existing deployment | X |
187
197
188
198
189
-
In a similar way create a stage **Prod (AKS** and add a single task to the job **Azure ML Model Deploy**:
199
+
In a similar way create a stage **Prod (AKS)** and add a single task to the job **Azure ML Model Deploy**. Make sure that the Agent Specification is ubuntu-16.04 under the Agent Job:
190
200
191
201

192
202
@@ -203,22 +213,33 @@ Specify task parameters as it is shown in the table below:
Similarly to the **Invoke Training Pipeline** release pipeline, previously created, in order to trigger a coutinuous integration, click on the lightning bolt icon, make sure the **Continuous deployment trigger** is checked and save the trigger:
217
+
218
+

219
+
206
220
**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.
207
221
208
222
**Deploy trained model to Azure Web App for containers**
209
223
210
224
Note: This is an optional step and can be used only if you are deploying your scoring service on Azure Web Apps.
can be used to create a scoring image from the release pipeline. Image created by this script will be registered under Azure Container Registry(ACR) instance that belongs to Azure Machine Learning Service. Any dependencies that scoring file depends on can also be packaged with the container with Image config. To learn more on how to create a container with AML SDK click [here](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.image.image.image?view=azure-ml-py#create-workspace--name--models--image-config-).
227
+
can be used to create a scoring image from the release pipeline. Image created by this script will be registered under Azure Container Registry(ACR) instance that belongs to Azure Machine Learning Service. Any dependencies that scoring file depends on can also be packaged with the container with Image config. To learn more on how to create a container with AML SDK click [here](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.image.image.image?view=azure-ml-py#create-workspace--name--models--image-config-).
214
228
215
229
Below is release pipeline with two tasks one to create an image using the above script and second is the deploy the image to Web App for containers
Save the pipeline and create a release to trigger it manually. Once the pipeline execution is finished, check out deployments in the **mlops-AML-WS** workspace.
254
+
Save the pipeline and create a release to trigger it manually. To create the trigger, click on the "Create release" button on the top right of your screen, leave the fields blank and click on **Create** at the bottom of the screen. Once the pipeline execution is finished, check out deployments in the **mlops-AML-WS** workspace.
0 commit comments