From d15cb17fb3424e2d85e47ea29222a13fe065cd28 Mon Sep 17 00:00:00 2001 From: Paul McMullen Date: Wed, 7 Aug 2024 15:57:53 -0400 Subject: [PATCH 1/2] added manual trigger yml and included endpoint deployment --- .../manual-end-to-end-deployment.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/manual-end-to-end-deployment.yml diff --git a/.github/workflows/manual-end-to-end-deployment.yml b/.github/workflows/manual-end-to-end-deployment.yml new file mode 100644 index 00000000..ae398349 --- /dev/null +++ b/.github/workflows/manual-end-to-end-deployment.yml @@ -0,0 +1,36 @@ +name: manual-end-to-end-deployment + +on: + workflow_dispatch: + inputs: + endpoint_file: + description: 'The file path to the endpoint configuration file' + required: true + type: string + resource_group: + description: 'The resource group of the Azure Machine Learning workspace' + required: true + type: string + workspace_name: + description: 'The name of the Azure Machine Learning workspace' + required: true + type: string + endpoint_name: + description: 'The name of the endpoint' + required: true + type: string + endpoint_type: + description: 'The type of the endpoint [batch, online]' + required: true + type: string +jobs: + call-create-endpoint: + uses: ./.github/workflows/create-endpoint.yml + with: + endpoint_file: ${{ github.event.inputs.endpoint_file }} + resource_group: ${{ github.event.inputs.resource_group }} + workspace_name: ${{ github.event.inputs.workspace_name }} + endpoint_name: ${{ github.event.inputs.endpoint_name }} + endpoint_type: ${{ github.event.inputs.endpoint_type }} + secrets: + creds: ${{ secrets.AZURE_CREDENTIALS }} From bf54f7bdd571ac2f057b7f8cc82436dd67c2e03c Mon Sep 17 00:00:00 2001 From: Paul McMullen Date: Wed, 7 Aug 2024 17:42:12 -0400 Subject: [PATCH 2/2] update endpoint parameters for end to end deployment --- .github/workflows/create-endpoint.yml | 10 +++++----- .github/workflows/manual-end-to-end-deployment.yml | 10 +++++----- src/sample-project/endpoint-config.yml | 3 +++ 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 src/sample-project/endpoint-config.yml diff --git a/.github/workflows/create-endpoint.yml b/.github/workflows/create-endpoint.yml index 6a79fa9d..55d66e25 100644 --- a/.github/workflows/create-endpoint.yml +++ b/.github/workflows/create-endpoint.yml @@ -3,9 +3,6 @@ name: create-endpoint on: workflow_call: inputs: - endpoint_file: - required: true - type: string resource_group: required: true type: string @@ -18,6 +15,9 @@ on: endpoint_type: required: true type: string + endpoint_auth_mode: + required: true + type: string secrets: creds: required: true @@ -38,6 +38,6 @@ jobs: run: az extension update -n ml - name: create-environment-from-file run: | - az ml ${{ inputs.endpoint_type }}-endpoint create --name ${{ inputs.endpoint_name }} \ - -f ${{ github.workspace }}/${{ inputs.endpoint_file }} --resource-group ${{ inputs.resource_group }} \ + az ml ${{ inputs.endpoint_type }}-endpoint create -n ${{ inputs.endpoint_name }} \ + --auth_mode ${{ inputs.endpoint_auth_mode }} --resource-group ${{ inputs.resource_group }} \ --workspace-name ${{ inputs.workspace_name }} diff --git a/.github/workflows/manual-end-to-end-deployment.yml b/.github/workflows/manual-end-to-end-deployment.yml index ae398349..ef2b7239 100644 --- a/.github/workflows/manual-end-to-end-deployment.yml +++ b/.github/workflows/manual-end-to-end-deployment.yml @@ -3,10 +3,6 @@ name: manual-end-to-end-deployment on: workflow_dispatch: inputs: - endpoint_file: - description: 'The file path to the endpoint configuration file' - required: true - type: string resource_group: description: 'The resource group of the Azure Machine Learning workspace' required: true @@ -23,14 +19,18 @@ on: description: 'The type of the endpoint [batch, online]' required: true type: string + endpoint_auth_mode: + description: 'The authentication mode of the endpoint [aad_token, aml_token, key]' + required: true + type: string jobs: call-create-endpoint: uses: ./.github/workflows/create-endpoint.yml with: - endpoint_file: ${{ github.event.inputs.endpoint_file }} resource_group: ${{ github.event.inputs.resource_group }} workspace_name: ${{ github.event.inputs.workspace_name }} endpoint_name: ${{ github.event.inputs.endpoint_name }} endpoint_type: ${{ github.event.inputs.endpoint_type }} + endpoint_auth_mode: ${{ github.event.inputs.endpoint_file }} secrets: creds: ${{ secrets.AZURE_CREDENTIALS }} diff --git a/src/sample-project/endpoint-config.yml b/src/sample-project/endpoint-config.yml new file mode 100644 index 00000000..4388c2ca --- /dev/null +++ b/src/sample-project/endpoint-config.yml @@ -0,0 +1,3 @@ +$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineEndpoint.schema.json +name: sample-project-aad-endpoint +auth_mode: aad_token