Skip to content

Commit

Permalink
ensure k8s compute
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu authored and Ubuntu committed Jul 4, 2024
1 parent d45a109 commit 1387bd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
8 changes: 2 additions & 6 deletions infra/bootstrapping/sdk_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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,,}
Expand All @@ -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}"
Expand Down

0 comments on commit 1387bd5

Please sign in to comment.