From 8c768f11eba3e2eccf76496339efc69a9800d438 Mon Sep 17 00:00:00 2001 From: Maggie Mhanna Date: Thu, 8 Dec 2022 13:26:50 +0000 Subject: [PATCH] adding ado batch endpoint deployment pipeline --- .../deploy-batch-endpoint-pipeline.yml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 classical/python-sdk-v2/mlops/devops-pipelines/deploy-batch-endpoint-pipeline.yml diff --git a/classical/python-sdk-v2/mlops/devops-pipelines/deploy-batch-endpoint-pipeline.yml b/classical/python-sdk-v2/mlops/devops-pipelines/deploy-batch-endpoint-pipeline.yml new file mode 100644 index 0000000..5a3bf0a --- /dev/null +++ b/classical/python-sdk-v2/mlops/devops-pipelines/deploy-batch-endpoint-pipeline.yml @@ -0,0 +1,68 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +variables: +- ${{ if eq(variables['Build.SourceBranchName'], 'main') }}: + # 'main' branch: PRD environment + - template: ../../config-infra-prod.yml +- ${{ if ne(variables['Build.SourceBranchName'], 'main') }}: + # 'develop' or feature branches: DEV environment + - template: ../../config-infra-dev.yml +- name: version + value: python-sdk-v2 +- name: endpoint_name + value: taxi-batch-$(namespace)$(postfix)$(environment) + +trigger: +- none + +pool: + vmImage: ubuntu-20.04 + + +resources: + repositories: + - repository: mlops-templates # Template Repo + name: Azure/mlops-templates # need to change org name from "Azure" to your own org + endpoint: github-connection # need to set up and hardcode + type: github + ref: feature/sdkv2 + + +stages: +- stage: CreateBatchEndpoint + displayName: Create/Update Batch Endpoint + jobs: + - job: DeployBatchEndpoint + steps: + - checkout: self + path: s/ + - checkout: mlops-templates + path: s/templates/ + - template: templates/aml-cli-v2/install-az-cli.yml@mlops-templates + - template: templates/aml-cli-v2/install-aml-cli.yml@mlops-templates + - template: templates/aml-cli-v2/connect-to-workspace.yml@mlops-templates + - template: templates/aml-cli-v2/create-compute.yml@mlops-templates + parameters: + cluster_name: batch-cluster # name must match cluster name in deployment file below + size: STANDARD_DS3_V2 + min_instances: 0 + max_instances: 5 + cluster_tier: dedicated + - template: templates/${{ variables.version }}/create-batch-endpoint.yml@mlops-templates + parameters: + endpoint_name: "${{ variables.endpoint_name }}" + endpoint_description: "Taxi batch endpoint" + auth_mode: "aad_token" + - template: templates/${{ variables.version }}/create-batch-deployment.yml@mlops-templates + parameters: + deployment_name: taxi-batch-dp + deployment_description: "Taxi batch deployment" + endpoint_name: "${{ variables.endpoint_name }}" + model_path: "taxi-model@latest" + compute: batch-cluster + - template: templates/${{ variables.version }}/test-batch-endpoint.yml@mlops-templates + parameters: + endpoint_name: "${{ variables.endpoint_name }}" + sample_request: data/taxi-batch.csv + request_type: uri_file #either uri_folder or uri_file \ No newline at end of file