Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
3d7ebfa1
Commit
3d7ebfa1
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Enhancements
parent
8a3e5073
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dind_swarm_setup.sh
+11
-14
11 additions, 14 deletions
dind_swarm_setup.sh
docker_stack_deploy.yml
+56
-0
56 additions, 0 deletions
docker_stack_deploy.yml
with
67 additions
and
14 deletions
setup_
dind_swarm.sh
→
dind_swarm
_setup
.sh
+
11
−
14
View file @
3d7ebfa1
...
...
@@ -3,32 +3,29 @@
OPAQUE_STORAGE_MOUNT_DIRECTORY
=
"/mnt/opaque"
# Don't change this variable, unless you know what you are doing!
SWARM_MANAGER_IP
=
""
SWARM_WORKER_NUMBER
=
4
SWARM_WORKER_TOKEN
=
""
if
[
-z
${
SWARM_MANAGER_IP
}
]
;
then
# See https://stackoverflow.com/a/25851186
SWARM_MANAGER_IP
=
$(
ip route get 1 |
awk
'{print $(NF-2);exit}'
)
fi
if
[
-z
${
SWARM_WORKER_TOKEN
}
]
;
then
docker swarm leave
--force
>
/dev/null 2>&1
docker swarm init
--advertise-addr
${
SWARM_MANAGER_IP
}
>
/dev/null 2>&1
SWARM_WORKER_TOKEN
=
$(
docker swarm join-token
-q
worker
)
fi
echo
"Leave possible swarm..."
docker swarm leave
--force
>
/dev/null 2>&1
docker-compose
--file
dind_swarm.yml up
--detach
storage
sleep
3
echo
"Mount
ing
network storage to host system..."
echo
"Mount network storage to host system..."
sudo mkdir
-p
/mnt/opaque
sudo
mount
-t
cifs
-o
gid
=
${
USER
}
,password
=
opaque,uid
=
${
USER
}
,user
=
opaque,vers
=
3.0 //localhost/opaque_storage /mnt/opaque
echo
"Done"
docker-compose
--file
dind_swarm.yml up
--detach
--scale
worker
=
${
SWARM_WORKER_NUMBER
}
worker
sleep
10
echo
"Add workers to swarm"
docker-compose
--file
dind_swarm.yml up
--detach
--scale
worker
=
${
SWARM_WORKER_NUMBER
}
worker viz
sleep
5
echo
"Init Docker swarm..."
docker swarm init
--advertise-addr
${
SWARM_MANAGER_IP
}
>
/dev/null 2>&1
echo
"Join workers to swarm..."
SWARM_WORKER_TOKEN
=
$(
docker swarm join-token
-q
worker
)
for
i
in
$(
seq
1
${
SWARM_WORKER_NUMBER
}
)
;
do
docker-compose
--file
dind_swarm.yml
exec
--index
=
${
i
}
worker docker swarm
join
--token
${
SWARM_WORKER_TOKEN
}
${
SWARM_MANAGER_IP
}
:2377
done
docker-compose
--file
dind_swarm.yml up
--detach
viz
This diff is collapsed.
Click to expand it.
docker_stack_deploy.yml
0 → 100644
+
56
−
0
View file @
3d7ebfa1
version
:
'
3'
services
:
web
:
depends_on
:
-
db
-
redis
deploy
:
placement
:
constraints
:
-
node.role == manager
env_file
:
-
db.env
-
web.env
image
:
gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development
ports
:
-
5000:5000
volumes
:
-
storage:/mnt/opaque
daemon
:
depends_on
:
-
db
deploy
:
placement
:
constraints
:
-
node.role == manager
env_file
:
-
db.env
-
web.env
image
:
gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
volumes
:
-
storage:/mnt/opaque
-
$HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json
db
:
deploy
:
placement
:
constraints
:
-
node.role == manager
env_file
:
db.env
image
:
postgres:11-alpine
volumes
:
-
/srv/opaque/database:/var/lib/postgresql/data
redis
:
deploy
:
placement
:
constraints
:
-
node.role == manager
image
:
redis:alpine
volumes
:
storage
:
driver
:
local
driver_opts
:
device
:
"
//127.0.0.1/opaque_storage"
o
:
"
gid=1000,password=opaque,uid=1000,username=opaque"
type
:
cifs
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