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/canary_ab_deployment.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ If your target deployment environment is a K8s cluster and you want to implement
6
6
7
7
**Note:** It is assumed that you have an AKS instance and configured ***kubectl*** to communicate with the cluster.
8
8
9
-
#### 1. Install Istio on a K8s cluster.
9
+
#### 1. Install Istio on a K8s cluster.
10
10
11
11
This guidance uses [Istio](https://istio.io) service mesh implememtation to control traffic routing between model versions. The instruction on installing Istio is available [here](https://docs.microsoft.com/en-us/azure/aks/servicemesh-istio-install?pivots=client-operating-system-linux).
12
12
@@ -28,7 +28,6 @@ There are some extra variables that you need to setup in ***devopsforai-aml-vg**
28
28
| K8S_AB_NAMESPACE | Namespace in a K8s cluster to deploy the model |
29
29
| IMAGE_REPO_NAME | Image reposiory name (e.g. mlopspyciamlcr.azurecr.io)|
30
30
31
-
32
31
#### 3. Configure a pipeline to build and deploy a scoring Image
33
32
34
33
Import and run the [azdo-abtest-pipeline.yml](./.pipelines/azdo-abtest-pipeline.yml) multistage deployment pipeline.
@@ -37,17 +36,17 @@ The result of the pipeline will be a registered Docker image in the ACR reposito
37
36
38
37

39
38
40
-
The pipeline creates Istio Gateway and VirtualService and deploys the scoring image to the Kubernetes cluster.
39
+
The pipeline creates Istio Gateway and VirtualService and deploys the scoring image to the Kubernetes cluster.
41
40
42
41
```bash
43
42
kubectl get deployments --namespace abtesting
44
43
NAME READY UP-TO-DATE AVAILABLE AGE
45
44
model-green 1/1 1 1 19h
46
45
```
47
46
48
-
#### 4. Build a new Scoring Image.
47
+
#### 4. Build a new Scoring Image
49
48
50
-
Change value of the ***SCORE_SCRIPT*** variable in the [azdo-abtest-pipeline.yml](./.pipelines/azdo-abtest-pipeline.yml) to point to ***scoreA.py*** and merge it to the master branch.
49
+
Change value of the ***SCORE_SCRIPT*** variable in the [azdo-abtest-pipeline.yml](./.pipelines/azdo-abtest-pipeline.yml) to point to ***scoring/scoreA.py*** and merge it to the master branch.
51
50
52
51
**Note:*****scoreA.py*** and ***scoreB.py*** files used in this tutorial are just mockups returning either "New Model A" or "New Model B" respectively. They are used to demonstrate the concept of testing two scoring images with different models or scoring code. In real life you would implement a scoring file similar to [score.py](./../code/scoring/score.py) (see [getting started](./getting_started.md)).
53
52
@@ -61,7 +60,6 @@ It will automatically trigger the pipeline and deploy a new scoring image with t
61
60
| Blue_Green |0 |100 |Old green image is removed. The new blue image is copied as green.<br>Blue and Green images are equal.<br>All traffic (100%) is routed to the blue image.|
62
61
| Green_100 |100 |0 |All traffic (100%) is routed to the green image.<br>The blue image is removed
63
62
64
-
65
63
**Note:** The pipeline performs the rollout without any pausing. You may want to configure [Approvals and Checks](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass) for the stages on your environment for better experience of the model testing. The environment ***abtestenv*** will be added automatically to your AzDo project after the first pipeline run.
66
64
67
65
At each stage you can verify how the traffic is routed sending requests to $GATEWAY_IP/score with ***Postman*** or with ***curl***:
0 commit comments