-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·58 lines (48 loc) · 1.91 KB
/
deploy.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -u
az feature register --name VMSSPreview --namespace Microsoft.ContainerService
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/VMSSPreview')].{Name:name,State:properties.state}" | awk '{print $2}'| sed -n 3p
state=$(az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/VMSSPreview')].{Name:name,State:properties.state}" | grep -i registered)
while [[ -z $state ]]
do
state=$(az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/VMSSPreview')].{Name:name,State:properties.state}" | grep -i registered)
echo 'waiting for registration'
sleep 3
clear
sleep 10
done
echo $state
az provider register --namespace Microsoft.ContainerService
az group create --name kaldi-demos --location southeastasia
az aks create -g kaldi-demos -n kaldi --node-count 3 --enable-vmss --enable-cluster-autoscaler --min-count 3 --max-count 6 --node-vm-size 'Standard_E2s_v3'
# az aks create -g kaldi-demos -n kaldi --node-count 3 --enable-vmss --enable-cluster-autoscaler --min-count 3 --max-count 6
# az aks get-credentials -n kaldi -g kaldi-demos
# kubectl create -f pvc/nfs-server-azure-pvc.yml
# #
# kubectl create -f rc/nfs-server-rc.yml
#
# kubectl create -f services/nfs-server-service.yml
#
# NFS_IP=$(kubectl get service nfs-server | awk '{print $3}' | sed -n 2p)
#
# sed "s/NFS_CLUSTER_IP/$NFS_IP/g" pv/nfs-pv-template.yml > nfs-pv.yml
# #
# # kubectl create -f nfs-pv.yml
# #
# # rm nfs-pv.yml
# #
# # kubectl create -f pvc/nfs-pvc.yml
#
# kubectl create -f deployment/master-rc.yml
#
# kubectl create -f services/master-svc.yml
#
# MASTER_STATE=$(kubectl get service master-service | grep -i pending)
# while [[ ! -z $MASTER_STATE ]]
# do
# sleep 10
# echo 'waiting for master to init'
# MASTER_STATE=$(kubectl get service master-service | grep -i pending)
# done
#
# # kubectl create -f deployment/worker-rc.yml