From 294b6f6102c6acdde4470e5ddc4760dc304a9451 Mon Sep 17 00:00:00 2001
From: Sara Stentvedt Luggenes <saraslu@stud.ntnu.no>
Date: Tue, 28 Feb 2023 20:53:14 +0100
Subject: [PATCH] startcockdb pynta paa

---
 configuration/manager/startCockroachCluster.sh | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/configuration/manager/startCockroachCluster.sh b/configuration/manager/startCockroachCluster.sh
index f558b03..686f39b 100644
--- a/configuration/manager/startCockroachCluster.sh
+++ b/configuration/manager/startCockroachCluster.sh
@@ -5,28 +5,19 @@ 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"
-#for å referere til iplist, berre skriv $ipList
 
 # 2) Lag startup kommando for hver ip addresse
-# cockroach start --insecure --store=/bfdata --listen-addr=0.0.0.0:26257 --http-addr=0.0.0.0:8080 --background 
-#--join=server1:26257,server2:26257,server3:26257 --advertise-addr=serverX:26257 --max-offset=1500ms //dette er kommandoen
-
 for mainIp in $ipList
 do
     kommando="cockroach start --insecure --store=/bfdata --listen-addr=0.0.0.0:26257 --http-addr=0.0.0.0:8080 --background --join="
-    echo $kommando
+
     for ip in $ipList
     do
         kommando="$kommando$ip:26257,"
-        echo $kommando
     done
     kommando=$(echo "$kommando" | sed 's/,$//')
     kommando="$kommando --advertise-addr=$mainIp:26257 --max-offset=1500ms"
-    echo $kommando
 
     # 3) Via ssh, send startup kommando til fil i home
     ssh -o "StrictHostKeyChecking no" root@$mainIp "echo $kommando > /home/ubuntu/startdb.sh"
-    echo "ssh-ing skal vere gjort"
-
-done
-
+done
\ No newline at end of file
-- 
GitLab