Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCSG2003
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raphael Storm Larsen
DCSG2003
Commits
294b6f61
Commit
294b6f61
authored
2 years ago
by
Sara Stentvedt Luggenes
Browse files
Options
Downloads
Patches
Plain Diff
startcockdb pynta paa
parent
b2df7ebe
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
configuration/manager/startCockroachCluster.sh
+2
-11
2 additions, 11 deletions
configuration/manager/startCockroachCluster.sh
with
2 additions
and
11 deletions
configuration/manager/startCockroachCluster.sh
+
2
−
11
View file @
294b6f61
...
@@ -5,28 +5,19 @@ source /home/ubuntu/dcsg2003/configuration/base.sh
...
@@ -5,28 +5,19 @@ source /home/ubuntu/dcsg2003/configuration/base.sh
# 1) Hent inn alle aktuelle ip addresser
# 1) Hent inn alle aktuelle ip addresser
#ipList=$(cat /home/ubuntu/logs/ipList)
#ipList=$(cat /home/ubuntu/logs/ipList)
ipList
=
"192.168.133.95 192.168.130.160 192.168.134.43"
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
# 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
for
mainIp
in
$ipList
do
do
kommando
=
"cockroach start --insecure --store=/bfdata --listen-addr=0.0.0.0:26257 --http-addr=0.0.0.0:8080 --background --join="
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
for
ip
in
$ipList
do
do
kommando
=
"
$kommando$ip
:26257,"
kommando
=
"
$kommando$ip
:26257,"
echo
$kommando
done
done
kommando
=
$(
echo
"
$kommando
"
|
sed
's/,$//'
)
kommando
=
$(
echo
"
$kommando
"
|
sed
's/,$//'
)
kommando
=
"
$kommando
--advertise-addr=
$mainIp
:26257 --max-offset=1500ms"
kommando
=
"
$kommando
--advertise-addr=
$mainIp
:26257 --max-offset=1500ms"
echo
$kommando
# 3) Via ssh, send startup kommando til fil i home
# 3) Via ssh, send startup kommando til fil i home
ssh
-o
"StrictHostKeyChecking no"
root@
$mainIp
"echo
$kommando
> /home/ubuntu/startdb.sh"
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment