forked from valvy/BalancerScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcluster
More file actions
executable file
·40 lines (30 loc) · 850 Bytes
/
cluster
File metadata and controls
executable file
·40 lines (30 loc) · 850 Bytes
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
#!/usr/bin/env bash
sampleSize=22
if [ "$2" = "sample" ]; then sampleSize=$3; fi;
function startCluster {
ansible-playbook ./ansible/start_balancing.yaml --extra-vars "sample_size=$sampleSize"
}
function stopCluster {
ansible-playbook ./ansible/stop_balancing.yaml
}
function updateSettings {
ansible-playbook ./ansible/deploy_settings.yaml
}
function checkEpn {
ansible Epns -m ping
}
function checkFlp {
ansible Flps -m ping
}
function checkInfo {
ansible InformationService -m ping
}
if [ "$1" = "start" ]; then startCluster $2 $3
elif [ "$1" = "stop" ]; then stopCluster
elif [ "$1" = "settings" ]; then updateSettings
elif [ "$1" = "epn" ]; then checkEpn
elif [ "$1" = "flp" ]; then checkFlp
elif [ "$1" = "InfoN" ]; then checkInfo
else
echo "to start the cluster enter start to stop the cluster enter stop"
fi