Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
1fbed181
Commit
1fbed181
authored
Aug 14, 2020
by
Markus Scheidgen
Browse files
Minor changes to oasis ops and migration.
parent
3525ab34
Changes
2
Hide whitespace changes
Inline
Side-by-side
ops/docker-compose/nomad-oasis/README.md
View file @
1fbed181
...
...
@@ -114,8 +114,8 @@ services:
-
elastic
-
mongo
volumes
:
-
nomad_oasis_files:/app/.volumes/fs
-
./nomad.yaml:/app/nomad.yaml
-
nomad_oasis_files:/app/.volumes/fs
command
:
python -m celery worker -l info -A nomad.processing -Q celery,calcs,uploads
# nomad app (api + gui)
...
...
@@ -131,11 +131,11 @@ services:
-
elastic
-
mongo
volumes
:
-
nomad_oasis_files:/app/.volumes/fs
-
./nomad.yaml:/app/nomad.yaml
-
./env.js:/app/gui/build/env.js
-
./gunicorn.log.conf:/app/gunicorn.log.conf
-
./gunicorn.conf:/app/gunicorn.conf
-
nomad_oasis_files:/app/.volumes/fs
command
:
[
"
./run.sh"
,
"
/nomad-oasis"
]
# nomad gui (a reverse proxy for nomad)
...
...
@@ -227,15 +227,29 @@ proxy is an nginx server and needs a configuration similar to this:
```
server {
listen 80;
server_name www.example.com;
server_name <your-host>;
proxy_set_header Host $host;
location / {
proxy_pass http://app:8000;
}
location ~ /nomad-oasis\/?(gui)?$ {
rewrite ^ /nomad-oasis/gui/ permanent;
}
location /nomad-oasis/gui/ {
proxy_intercept_errors on;
error_page 404 = @redirect_to_index;
proxy_pass http://app:8000;
}
location /nomad-oasis {
proxy_set_header Host $host;
proxy_pass_request_headers on;
location @redirect_to_index {
rewrite ^ /nomad-oasis/gui/index.html break;
proxy_pass http://app:8000;
}
location
/nomad-oasis
/gui
/
service-worker.js {
location
~ \
/gui
\/(
service-worker
\
.js
|meta\.json)$
{
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
...
...
@@ -244,18 +258,20 @@ server {
proxy_pass http://app:8000;
}
location
/nomad-oasis
/api/uploads {
location
~ \
/api
\
/uploads
\/?$
{
client_max_body_size 35g;
proxy_request_buffering off;
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_pass http://app:8000;
}
location /nomad-oasis/api/raw {
location ~ \/api\/(raw|archive) {
proxy_buffering off;
proxy_pass http://app:8000;
}
location ~ \/api\/mirror {
proxy_buffering off;
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_read_timeout 600;
proxy_pass http://app:8000;
}
}
...
...
@@ -356,16 +372,17 @@ To migrate the data, we created a command that you can run within your OASIS' NO
application container. This command takes the old database name as argument, it will copy
all data over and then reprocess the data to create data in the new archive format and
populate the search index. The default database name in version 0.7.x installations was
`nomad_fairdi`
.
Be patient.
```
docker exec nomad_oasis_app
--
nomad admin migrate --mongo-db nomad_fairdi
docker exec
-ti
nomad_oasis_app
bash -c '
nomad admin migrate --mongo-db nomad_fairdi
'
```
Now all your data should appear in your OASIS again. If you like, you can remove the
old index and database:
```
docker exec nomad_oasis_
app
bash -c 'curl -X DELETE http://elastic:9200/nomad_fairdi'
docker exec nomad_oasis_
elastic
bash -c 'curl -X DELETE http://elastic:9200/nomad_fairdi'
docker exec nomad_oasis_mongo bash -c 'mongo nomad_fairdi --eval "printjson(db.dropDatabase())"'
```
...
...
ops/docker-compose/nomad-oasis/docker-compose.yml
View file @
1fbed181
...
...
@@ -18,8 +18,6 @@ x-common-variables: &nomad_backend_env
NOMAD_RABBITMQ_HOST
:
rabbitmq
NOMAD_ELASTIC_HOST
:
elastic
NOMAD_MONGO_HOST
:
mongo
NOMAD_MONGO_DB_NAME
:
nomad_v0_8
NOMAD_ELASTIC_INDEX_NAME
:
nomad_v0_8
services
:
# broker for celery
...
...
@@ -58,7 +56,7 @@ services:
# nomad worker (processing)
worker
:
restart
:
always
image
:
gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:
stable
image
:
gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:
oasis-migration
container_name
:
nomad_oasis_worker
environment
:
<<
:
*nomad_backend_env
...
...
@@ -69,12 +67,13 @@ services:
-
mongo
volumes
:
-
./nomad.yaml:/app/nomad.yaml
-
nomad_oasis_files:/app/.volumes/fs
command
:
python -m celery worker -l info -A nomad.processing -Q celery,calcs,uploads
# nomad app (api + gui)
app
:
restart
:
always
image
:
gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:
stable
image
:
gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:
oasis-migration
container_name
:
nomad_oasis_app
environment
:
<<
:
*nomad_backend_env
...
...
@@ -88,6 +87,7 @@ services:
-
./env.js:/app/gui/build/env.js
-
./gunicorn.log.conf:/app/gunicorn.log.conf
-
./gunicorn.conf:/app/gunicorn.conf
-
nomad_oasis_files:/app/.volumes/fs
command
:
[
"
./run.sh"
,
"
/nomad-oasis"
]
# nomad gui (a reverse proxy for nomad)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment