Created
August 13, 2021 01:58
-
-
Save lordlinus/5abaa6bf550a44dde7a3a4b9240a3934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash -e | |
az config set extension.use_dynamic_install=yes_without_prompt | |
# az extension add -n azure-cli-ml -y | |
# Attach the AKS to Azure ML as compute cluster | |
null=$(az ml computetarget attach aks \ | |
--name $AKS_COMPUTE_NAME_IN_AML \ | |
--resource-group $RESOURCE_GROUP_NAME \ | |
--compute-resource-id $AKS_COMPUTE_ID \ | |
--workspace-name $AML_WORKSPACE_NAME \ | |
--output json) | |
while : | |
do | |
status=$(az ml computetarget show -n $AKS_COMPUTE_NAME_IN_AML --workspace-name $AML_WORKSPACE_NAME --resource-group $RESOURCE_GROUP_NAME --output json | jq -r '.provisioningState') | |
if [ "$status" == "Succeeded" ]; then | |
break | |
else | |
sleep 10 | |
fi | |
done | |
# enable SSL config on the AKS cluster | |
json=$(az ml computetarget update aks \ | |
--name $AKS_COMPUTE_NAME_IN_AML \ | |
--resource-group $RESOURCE_GROUP_NAME \ | |
--load-balancer-type PublicIp \ | |
--workspace-name $AML_WORKSPACE_NAME \ | |
--ssl-leaf-domain-label $SSL_LEAF_NAME \ | |
--output json) | |
echo "$json" >$AZ_SCRIPTS_OUTPUT_PATH | |
# tail -f /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment