Skip to content
Snippets Groups Projects
Commit bb769dad authored by Sara Stentvedt Luggenes's avatar Sara Stentvedt Luggenes
Browse files

endra startCockCluster

parent 7bbaa261
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ source /home/ubuntu/dcsg2003/configuration/base.sh
# 1) Hent inn alle aktuelle ip addresser
#ipList=$(cat /home/ubuntu/logs/ipList)
ipList="192.168.133.95 192.168.130.160 192.168.134.43"
glusterListIp=""
# 2) Lag startup kommando for hver ip addresse
for mainIp in $ipList
......@@ -13,6 +14,11 @@ do
for ip in $ipList
do
if [ $ip -ne $mainIp ]
then
glusterListIp="$glusterListIp $ip"
fi
kommando="$kommando$ip:26257,"
done
kommando=$(echo "$kommando" | sed 's/,$//')
......@@ -20,4 +26,6 @@ do
# 3) Via ssh, send startup kommando til fil i home
ssh -o "StrictHostKeyChecking no" root@$mainIp "echo $kommando > /home/ubuntu/startdb.sh"
# Via ssh, send lista over ip-adresser i glusteren til aktuelle server
ssh -o "StrictHostKeyChecking no" root@$mainIp "echo $glusterListIp > /home/ubuntu/glusterListIp"
done
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment