-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartmonagent.sh
30 lines (21 loc) · 982 Bytes
/
startmonagent.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# This shell script demonstrates how to start monagnet on custoerm's cluster inside a hpc pod
#
source env.sh
hostprocessdaemonset=hpc
# Need to login first
#az login
#az account set --subscription $subscription
# Retrieve the credentials of existing cluster
#az aks get-credentials --resource-group $resourcegroup --name $clustername --overwrite-existing
# Deploy the monagent hpc container and start the monagnet process
#az aks update -n ${clustername} -g $resourcegroup --attach-acr $registryname
sed -e "s,\$managedidentityresourceid,$MANAGEDIDENTITY_RESOURCE_ID," \
-e "s/\$subscription/$AZURE_SUBSCRIPTION_ID/" \
-e "s/\$resourcegroup/$RESOURCE_GROUP/" \
-e "s/\$clustername/$CLUSTER_NAME/" \
-e 's/\r//g' \
./${hostprocessdaemonset}.yaml.template > ${hostprocessdaemonset}.yaml
#kubectl apply -f ./${hostprocessdaemonset}.yaml --wait
#kubectl wait --for=condition=Ready --all --timeout -1s daemonsets
#kubectl get daemonsets -o wide