Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
comp90023-assignment-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matthew O'Halloran
comp90023-assignment-2
Commits
31aba4c5
Commit
31aba4c5
authored
May 3, 2020
by
matt01671
Browse files
Options
Downloads
Patches
Plain Diff
clean
parent
aa58a7ff
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/roles/cluster-build/templates/reboot.sh
+4
-4
4 additions, 4 deletions
ansible/roles/cluster-build/templates/reboot.sh
ansible/roles/cluster-build/templates/run.sh
+4
-4
4 additions, 4 deletions
ansible/roles/cluster-build/templates/run.sh
with
8 additions
and
8 deletions
ansible/roles/cluster-build/templates/reboot.sh
+
4
−
4
View file @
31aba4c5
echo
"== Put in conts the Docker container IDs: =="
declare
-a
conts
=(
`
sudo
docker ps
--all
|
grep
couchdb |
cut
-f1
-d
' '
| xargs
-n1
-d
'\n'
`
)
#
echo "== Put in conts the Docker container IDs: =="
#
declare -a conts=(`sudo docker ps --all | grep couchdb | cut -f1 -d' ' | xargs -n1 -d'\n'`)
echo
"== Stop the containers: =="
for
cont
in
"
${
conts
[@]
}
"
;
do
sudo
docker stop
${
cont
}
;
done
sudo
docker stop
couchdb
${
node
}
echo
"== Start the containers (and wait a bit while they boot): =="
for
cont
in
"
${
conts
[@]
}
"
;
do
sudo
docker start
${
cont
}
;
done
\ No newline at end of file
sudo
docker start couchdb
${
node
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ansible/roles/cluster-build/templates/run.sh
+
4
−
4
View file @
31aba4c5
...
...
@@ -31,17 +31,17 @@ sudo docker create\
--env
ERL_FLAGS
=
"-setcookie
\"
${
cookie
}
\"
-name
\"
couchdb@
${
node
}
\"
"
\
ibmcom/couchdb3:
${
VERSION
}
echo
"== Put in conts the Docker container IDs: =="
declare
-a
conts
=(
`
sudo
docker ps
--all
|
grep
couchdb |
cut
-f1
-d
' '
| xargs
-n1
-d
'\n'
`
)
#
echo "== Put in conts the Docker container IDs: =="
#
declare -a conts=(`sudo docker ps --all | grep couchdb | cut -f1 -d' ' | xargs -n1 -d'\n'`)
echo
"== Start the containers (and wait a bit while they boot): =="
for
cont
in
"
${
conts
[@]
}
"
;
do
sudo
docker start
${
cont
}
;
done
sudo
docker start
couchdb
${
node
}
echo
"== Change vm.args =="
# for cont in "${conts[@]}"; do sudo docker cp edit-vm.sh couchdb:/edit-vm.sh; done
# for cont in "${conts[@]}"; do sudo docker exec -u root -it ${cont} chmod u+x edit-vm.sh; done
echo
"export node=
${
node
}
;cd /opt/couchdb/etc/;echo
${
inp
}
>> vm.args"
for
cont
in
"
${
conts
[@]
}
"
;
do
sudo
docker
exec
-u
root
-it
${
cont
}
/bin/sh
-c
"export node=
${
node
}
;cd /opt/couchdb/etc/;echo
${
inp
}
>> vm.args"
;
done
#FIX
sudo
docker
exec
-u
root
-it
couchdb
${
node
}
/bin/sh
-c
"export node=
${
node
}
;cd /opt/couchdb/etc/;echo
${
inp
}
>> vm.args"
# for cont in "${conts[@]}"; do sudo docker exec -u root -it ${cont} bash edit-vm.sh; done
#sudo docker exec -it couchdb bash
...
...
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