From 1387bd51bc8352dea0637622d6f2e2a0d0c327d2 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 4 Jul 2024 08:51:43 +0000 Subject: [PATCH] ensure k8s compute --- ...li-endpoints-online-kubernetes-kubernetes-endpoint.yml | 7 +++++++ infra/bootstrapping/sdk_helpers.sh | 8 ++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cli-endpoints-online-kubernetes-kubernetes-endpoint.yml b/.github/workflows/cli-endpoints-online-kubernetes-kubernetes-endpoint.yml index a642c38a363..bda48bc53aa 100644 --- a/.github/workflows/cli-endpoints-online-kubernetes-kubernetes-endpoint.yml +++ b/.github/workflows/cli-endpoints-online-kubernetes-kubernetes-endpoint.yml @@ -51,6 +51,13 @@ jobs: python check-readme.py "${{ github.workspace }}/cli/endpoints/online/kubernetes" working-directory: infra/bootstrapping continue-on-error: false + - name: ensure k8s compute + run: | + source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh"; + source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh"; + "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" ensure_k8s_compute; + working-directory: cli + continue-on-error: true - name: delete endpoint if existing run: | source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh"; diff --git a/infra/bootstrapping/sdk_helpers.sh b/infra/bootstrapping/sdk_helpers.sh index 18ccbd24674..128bff69e1e 100644 --- a/infra/bootstrapping/sdk_helpers.sh +++ b/infra/bootstrapping/sdk_helpers.sh @@ -809,15 +809,11 @@ function replace_version(){ echo "$(<"${FILENAME}")" } -function ensure_amlarc_compute(){ +function ensure_k8s_compute(){ # Arc cluster configuration arc_compute=${ARC_CLUSTER_NAME} echo_info "Creating amlarc cluster: '$arc_compute'" - export LOCATION="eastus2" - RESOURCE_GROUP_NAME=test-rg-eastus2euap-240702 - AKS_CLUSTER_NAME=op-eastus2euap56a83374b - # Check current state of AKS provisioning_state=$(az aks show --subscription dd21e9f4-d52f-406f-ab5e-d164e7d7dc65 --resource-group "${RESOURCE_GROUP_NAME}" --name ${arc_compute} --query "provisioningState" -o tsv) provisioning_state=${provisioning_state,,} @@ -827,7 +823,7 @@ function ensure_amlarc_compute(){ az aks delete --resource-group "${RESOURCE_GROUP_NAME}" --name ${arc_compute} --yes fi - ensure_aks_compute "${arc_compute}" 1 3 "STANDARD_D3_V2" + LOCATION=eastus2 ensure_aks_compute "${arc_compute}" 1 3 "STANDARD_D3_V2" install_k8s_extension "${arc_compute}" "connectedClusters" "Microsoft.Kubernetes/connectedClusters" setup_compute "${arc_compute}-arc" "${ARC_COMPUTE_NAME}" "connectedClusters" "azureml" setup_instance_type_aml_arc "${arc_compute}"