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
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
f27d56ac
Commit
f27d56ac
authored
4 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Remove stuff and add variables
parent
ca833c96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
config.py
+1
-1
1 addition, 1 deletion
config.py
dind_swarm.yml
+0
-30
0 additions, 30 deletions
dind_swarm.yml
dind_swarm_setup.sh
+0
-41
0 additions, 41 deletions
dind_swarm_setup.sh
docker-compose.yml
+14
-16
14 additions, 16 deletions
docker-compose.yml
nopaque.env.tpl
+2
-0
2 additions, 0 deletions
nopaque.env.tpl
with
17 additions
and
88 deletions
config.py
+
1
−
1
View file @
f27d56ac
...
@@ -20,7 +20,7 @@ class Config:
...
@@ -20,7 +20,7 @@ class Config:
'''
### Opaque ###
'''
'''
### Opaque ###
'''
NOPAQUE_ADMIN
=
os
.
environ
.
get
(
'
NOPAQUE_ADMIN
'
)
NOPAQUE_ADMIN
=
os
.
environ
.
get
(
'
NOPAQUE_ADMIN
'
)
NOPAQUE_STORAGE
=
'
/mnt/nopaque
'
NOPAQUE_STORAGE
=
os
.
environ
.
get
(
'
NOPAQUE_STORAGE
'
)
@staticmethod
@staticmethod
def
init_app
(
app
):
def
init_app
(
app
):
...
...
This diff is collapsed.
Click to expand it.
dind_swarm.yml
deleted
100644 → 0
+
0
−
30
View file @
ca833c96
version
:
'
3'
services
:
storage
:
command
:
-
"
-p"
-
"
-s"
-
"
storage.nopaque;/srv/nopaque/storage;no;no;no;nopaque"
-
"
-u"
-
"
nopaque;nopaque"
image
:
dperson/samba:latest
ports
:
-
"
445:445"
volumes
:
-
"
/srv/nopaque/storage:/srv/nopaque/storage"
worker
:
image
:
docker:dind
ports
:
-
"
2375"
privileged
:
true
volumes
:
-
"
/mnt/nopaque:/mnt/nopaque"
viz
:
image
:
dockersamples/visualizer:latest
labels
:
-
"
traefik.enable=true"
-
"
traefik.http.routers.viz.rule=Host(`viz.localhost`)"
-
"
traefik.http.routers.viz.entrypoints=web"
volumes
:
-
"
/var/run/docker.sock:/var/run/docker.sock"
This diff is collapsed.
Click to expand it.
dind_swarm_setup.sh
deleted
100755 → 0
+
0
−
41
View file @
ca833c96
#!/bin/bash
ECHO_COLOR
=
"
\0
33[0;34m"
ECHO_COLOR_END
=
"
\0
33[0m"
SWARM_MANAGER_IP
=
""
SWARM_WORKER_NUMBER
=
4
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
echo
-e
"
${
ECHO_COLOR
}
Leave possible swarm and down all services...
${
ECHO_COLOR_END
}
"
docker swarm leave
--force
docker-compose
--file
dind_swarm.yml down
echo
-e
"
${
ECHO_COLOR
}
Start storage container...
${
ECHO_COLOR_END
}
"
docker-compose
--file
dind_swarm.yml up
--detach
storage
sleep
3
echo
-e
"
${
ECHO_COLOR
}
Mount network storage to host system...
${
ECHO_COLOR_END
}
"
if
[
!
-d
"/mnt/nopaque"
]
;
then
sudo mkdir
-p
/mnt/nopaque
fi
if
mountpoint
-q
/mnt/nopaque
;
then
sudo
umount
--force
/mnt/nopaque
fi
sudo
mount
--types
cifs
--options
gid
=
${
USER
}
,password
=
nopaque,uid
=
${
USER
}
,user
=
nopaque,vers
=
3.0 //localhost/storage.nopaque /mnt/nopaque
echo
-e
"
${
ECHO_COLOR
}
Start worker service(s)...
${
ECHO_COLOR_END
}
"
docker-compose
--file
dind_swarm.yml up
--detach
--scale
worker
=
${
SWARM_WORKER_NUMBER
}
worker viz
sleep
7
echo
-e
"
${
ECHO_COLOR
}
Init Docker swarm...
${
ECHO_COLOR_END
}
"
docker swarm init
--advertise-addr
${
SWARM_MANAGER_IP
}
>
/dev/null
echo
-e
"
${
ECHO_COLOR
}
Add workers to swarm...
${
ECHO_COLOR_END
}
"
SWARM_WORKER_TOKEN
=
$(
docker swarm join-token
-q
worker
)
for
i
in
$(
seq
1
${
SWARM_WORKER_NUMBER
}
)
;
do
echo
-n
"[worker_
${
i
}
]: "
docker-compose
--file
dind_swarm.yml
exec
--index
=
${
i
}
worker docker swarm
join
--token
${
SWARM_WORKER_TOKEN
}
${
SWARM_MANAGER_IP
}
:2377
done
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
14
−
16
View file @
f27d56ac
version
:
'
3'
version
:
'
3
.5
'
service
s
:
network
s
:
reverse-proxy
:
reverse-proxy
:
image
:
traefik:2.2
external
:
command
:
name
:
reverse-proxy
-
"
--log.level=DEBUG"
-
"
--providers.docker=true"
services
:
-
"
--providers.docker.exposedbydefault=false"
-
"
--entrypoints.web.address=:80"
ports
:
-
"
80:80"
volumes
:
-
"
/var/run/docker.sock:/var/run/docker.sock:ro"
web
:
web
:
depends_on
:
depends_on
:
-
db
-
db
...
@@ -19,11 +13,15 @@ services:
...
@@ -19,11 +13,15 @@ services:
env_file
:
nopaque.env
env_file
:
nopaque.env
image
:
gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development
image
:
gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development
labels
:
labels
:
-
"
traefik.docker.network=reverse-proxy"
-
"
traefik.enable=true"
-
"
traefik.enable=true"
-
"
traefik.http.routers.nopaque.rule=Host(`nopaque.localhost`)"
-
"
traefik.http.routers.proxy.rule=Host(`nopaque.localhost`)"
-
"
traefik.http.routers.nopaque.entrypoints=web"
-
"
traefik.http.routers.proxy.entrypoints=web"
networks
:
-
default
-
reverse-proxy
volumes
:
volumes
:
-
"
/mnt/nopaque:/mnt/nopaque"
-
"
/mnt/
dind_swarm/
nopaque:/mnt/nopaque"
-
"
./app:/home/nopaque/app"
-
"
./app:/home/nopaque/app"
-
"
./logs:/home/nopaque/logs"
-
"
./logs:/home/nopaque/logs"
-
"
./migrations:/home/nopaque/migrations"
-
"
./migrations:/home/nopaque/migrations"
...
@@ -40,7 +38,7 @@ services:
...
@@ -40,7 +38,7 @@ services:
-
"
host.docker.internal:172.17.0.1"
-
"
host.docker.internal:172.17.0.1"
image
:
gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
image
:
gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
volumes
:
volumes
:
-
"
/mnt/nopaque:/mnt/nopaque"
-
"
/mnt/
dind_swarm/
nopaque:/mnt/nopaque"
-
"
./logs:/home/nopaqued/logs"
-
"
./logs:/home/nopaqued/logs"
-
"
../opaque_daemon/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh"
-
"
../opaque_daemon/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh"
-
"
../opaque_daemon/nopaqued.py:/home/nopaqued/nopaqued.py"
-
"
../opaque_daemon/nopaqued.py:/home/nopaqued/nopaqued.py"
...
...
This diff is collapsed.
Click to expand it.
nopaque.env.tpl
+
2
−
0
View file @
f27d56ac
...
@@ -26,3 +26,5 @@ MAIL_DEFAULT_SENDER=
...
@@ -26,3 +26,5 @@ MAIL_DEFAULT_SENDER=
### nopaque ###
### nopaque ###
NOPAQUE_ADMIN=
NOPAQUE_ADMIN=
NOPAQUE_HOST_STORAGE=
NOPAQUE_STORAGE=
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