@@ -13,6 +13,9 @@ Features:
13
13
For other Azure Machine Learning actions check out:
14
14
15
15
* [ create-azure-machine-learning-online-endpoint] ( https://github.com/coding-kitties/create-azure-machine-learning-online-endpoint )
16
+ * [ register-azure-machine-learning-model] ( https://github.com/coding-kitties/register-azure-machine-learning-model )
17
+ * [ update-azure-machine-learning-online-deployment] ( https://github.com/coding-kitties/update-azure-machine-learning-online-deploymentl )
18
+ * [ delete-azure-machine-learning-online-deployment] ( https://github.com/coding-kitties/delete-azure-machine-learning-online-deployment )
16
19
17
20
## Dependencies on other Github Actions
18
21
46
49
registry_resource_group : (optional) "my-registry-resource-group"
47
50
traffic : ' { "blue": 80, "green": 20, mirror": {"green": 80} }'
48
51
` ` `
52
+
53
+ ## Example deployment of an Azure Machine Learning Workflow with blue/green deployments
54
+
55
+ This example demonstrates an Azure Machine Learning Deployment with blue/green deployments for different environments. We use various Github Actions to create a complete workflow.
56
+
57
+ ` ` ` yaml
58
+ jobs :
59
+ deploy :
60
+ runs-on : ubuntu-latest
61
+ steps :
62
+
63
+
64
+ - uses : Azure/login@v1
65
+ with :
66
+ creds : ${{ secrets.AZURE_CREDENTIALS }}
67
+
68
+ # Move model into dev registry (Will be skipped if it already exists)
69
+ - name : Register model in registry
70
+ uses :
coding-kitties/[email protected]
71
+ with :
72
+ model_name : ' model-name'
73
+ model_version : ' 1'
74
+ source_registry_name : ' playground-registry'
75
+ source_registry_resource_group : ' my-registry-resource-group'
76
+ destination_registry_name : ' playground-registry'
77
+ destination_registry_resource_group : ' my-registry-resource-group'
78
+
79
+ # Create AML Online Endpoint in DEV (Will be skipped if it already exists)
80
+ - name : Create AML Online Endpoint DEV
81
+ uses :
coding-kitties/[email protected]
82
+ with :
83
+ endpoint_name : ' dev-endpoint'
84
+ resource_group : ' dev-group'
85
+ workspace_name : ' dev-workspace'
86
+
87
+ # Deploy the new green model to DEV
88
+ - name : Create AML Online Endpoint Deployment DEV
89
+ uses :
coding-kitties/[email protected]
90
+ with :
91
+ endpoint_name : ' dev-endpoint'
92
+ resource_group : ' dev-group'
93
+ workspace_name : ' dev-workspace'
94
+ deployment_yaml_file_path : ' path/to/deployment.yml'
95
+ model_name : ' model-name'
96
+ model_version : ' 1'
97
+ traffic : ' { "green": 0, "blue": 100, mirror": {"green": 20} }'
98
+
99
+ # Update green deployment traffic in DEV
100
+ - name : Update AML Online Endpoint Deployment traffic
101
+ uses :
coding-kitties/[email protected]
102
+ with :
103
+ endpoint_name : ' my-endpoint'
104
+ workspace_name : ' my-workspace'
105
+ resource_group : ' my-resource-group'
106
+ traffic : ' { "green": 100, "blue": 0, mirror": {"green": 0} }'
107
+
108
+ - name : Delete AML Online Endpoint Deployment DEV
109
+ uses :
coding-kitties/[email protected]
110
+ with :
111
+ endpoint_name : ' dev-endpoint'
112
+ resource_group : ' dev-group'
113
+ workspace_name : ' dev-workspace'
114
+ deployment_name : ' blue'
115
+
116
+ # Move model to production registy
117
+ - name : Move model to production registry
118
+ uses :
coding-kitties/[email protected]
119
+ with :
120
+ model_name : ' model-name'
121
+ model_version : ' 1'
122
+ source_registry_name : ' playground-registry'
123
+ source_registry_resource_group : ' my-registry-resource-group'
124
+ destination_registry_name : ' production-registry'
125
+ destination_registry_resource_group : ' my-registry-resource-group'
126
+
127
+ # Create AML Online Endpoint in PROD (Will be skipped if it already exists)
128
+ - name : Create AML Online Endpoint PROD
129
+ uses :
coding-kitties/[email protected]
130
+ with :
131
+ endpoint_name : ' prod-endpoint'
132
+ resource_group : ' prod-group'
133
+ workspace_name : ' prod-workspace'
134
+
135
+ # Deploy the new green model to PROD
136
+ - name : Create AML Online Endpoint Deployment PROD
137
+ uses :
coding-kitties/[email protected]
138
+ with :
139
+ endpoint_name : ' prod-endpoint'
140
+ resource_group : ' prod-group'
141
+ workspace_name : ' prod-workspace'
142
+ deployment_yaml_file_path : ' path/to/deployment.yml'
143
+ model_name : ' model-name'
144
+ model_version : ' 1'
145
+ traffic : ' { "green": 0, "blue": 100, mirror": {"green": 20} }'
146
+ å```
0 commit comments