Skip to content

Commit a38083e

Browse files
author
Jennings Zhang
committed
Migrate to new ChRIS backend
1 parent 3573c89 commit a38083e

File tree

3 files changed

+34
-32
lines changed

3 files changed

+34
-32
lines changed

docker-compose.yml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
11
# an ephemeral instance of ChRIS backend services for local development
22
#
33
# warning: /var/run/docker.sock is mounted into some services (notably pman)
4-
#
5-
# CUBE configuration based on
6-
# https://raw.githubusercontent.com/FNNDSC/ChRIS_ultron_backEnd/master/docker-compose.yml
7-
# commit 0ed91d7c3b3feaf9d68348623649a5d2e9918e34
84

95
version: '3.7'
106

117
services:
128
chris:
139
container_name: chris
14-
image: fnndsc/chris:1.1.0
10+
image: fnndsc/chris:2.0.0-rc.1
1511
ports:
1612
- "127.0.0.1:8000:8000"
1713
depends_on:
1814
- chris_db
1915
- swift
2016
- queue
21-
- chris_store
22-
- pfcon
2317
networks:
2418
- local
2519
env_file: secrets.env
2620
worker:
27-
image: fnndsc/chris:1.1.0
21+
image: fnndsc/chris:2.0.0-rc.1
2822
entrypoint: ''
2923
command: celery -A core worker -c 4 -l info -Q main
3024
env_file: secrets.env
@@ -37,7 +31,7 @@ services:
3731
networks:
3832
- local
3933
scheduler:
40-
image: fnndsc/chris:1.1.0
34+
image: fnndsc/chris:2.0.0-rc.1
4135
entrypoint: ''
4236
command: celery -A core beat -l info --pidfile /home/localuser/celerybeat.pid --scheduler django_celery_beat.schedulers:DatabaseScheduler
4337
env_file: secrets.env
@@ -66,7 +60,7 @@ services:
6660
environment:
6761
- DJANGO_SETTINGS_MODULE=config.settings.production
6862
- DJANGO_ALLOWED_HOSTS=*
69-
- DJANGO_SECRET_KEY="alsonotverysecure"
63+
- DJANGO_SECRET_KEY=secret
7064
- DJANGO_CORS_ORIGIN_ALLOW_ALL=true
7165
- DJANGO_CORS_ORIGIN_WHITELIST=babymri.org
7266
- DJANGO_SECURE_PROXY_SSL_HEADER=
@@ -82,7 +76,7 @@ services:
8276
- SWIFT_KEY=testing
8377
- SWIFT_CONTAINER_NAME=store_users
8478
ports:
85-
- "8010:8010"
79+
- "127.0.0.1:8010:8010"
8680
depends_on:
8781
- chris_store_db
8882
- swift
@@ -102,8 +96,6 @@ services:
10296
labels:
10397
name: "ChRIS_store MySQL Database"
10498

105-
# swift, pfioh, and pman have hard-coded names inside pfcon by default
106-
# so network aliases are set to be swift_service, pfioh_service, pman_service
10799
swift:
108100
image: fnndsc/docker-swift-onlyone:latest
109101
init: true
@@ -113,23 +105,26 @@ services:
113105
ports:
114106
- "127.0.0.1:8080:8080"
115107
networks:
116-
local:
117-
aliases:
118-
- swift_service
108+
- local
119109

120110
pfcon:
121111
container_name: pfcon
122-
image: fnndsc/pfcon:2.4.0
112+
image: fnndsc/pfcon:3.0.0.0-rc.1
113+
environment:
114+
COMPUTE_SERVICE_URL: http://pman:5010/api/v1/
115+
DATA_SERVICE_URL: http://pfioh:5055/api/v1/cmd
116+
SECRET_KEY: secret
123117
ports:
124118
- "127.0.0.1:5005:5005"
125119
depends_on:
126-
- swift
127120
- pman
128121
- pfioh
129122
networks:
130123
local:
131124
aliases:
132125
- pfcon.local
126+
remote:
127+
133128
pfioh:
134129
container_name: pfioh
135130
image: fnndsc/pfioh:3.0.2
@@ -139,26 +134,23 @@ services:
139134
ports:
140135
- "127.0.0.1:5055:5055"
141136
networks:
142-
local:
143-
aliases:
144-
- pfioh_service
137+
- remote
145138

146139
pman:
147-
image: fnndsc/pman:2.2.2
140+
image: fnndsc/pman:3.1.0-rc.1
148141
container_name: pman
149142
environment:
150-
- PMAN_DOCKER_VOLUME=pfioh-remote
143+
PMAN_DOCKER_VOLUME: chris-minimake-pfioh-remote
144+
CONTAINER_ENV: swarm
145+
SECRET_KEY: secret
151146
volumes:
152147
- /var/run/docker.sock:/var/run/docker.sock
153-
- pfioh-remote:/hostFS/storeBase
154148
depends_on:
155149
- swarm-status
156150
ports:
157151
- "127.0.0.1:5010:5010"
158152
networks:
159-
local:
160-
aliases:
161-
- pman_service
153+
- remote
162154

163155
chris_ui:
164156
image: fnndsc/chris_ui:latest
@@ -218,7 +210,8 @@ services:
218210

219211
networks:
220212
local:
213+
remote:
221214

222215
volumes:
223216
pfioh-remote:
224-
name: pfioh-remote
217+
name: chris-minimake-pfioh-remote

provision/setup.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ if [ -f .setup ]; then
1010
echo "Already set up"
1111
fi
1212

13+
14+
docker exec chris python manage.py shell -c '
15+
from core.models import ChrisInstance
16+
inst = ChrisInstance.load()
17+
inst.job_id_prefix = "chris-minimake-jid-"
18+
inst.save()'
19+
20+
1321
superuser_script='
1422
from django.contrib.auth.models import User
1523
User.objects.create_superuser(username="chris", password="chris1234", email="[email protected]")'
@@ -18,9 +26,11 @@ docker exec chris python manage.py shell -c "$superuser_script"
1826
docker exec chris_store python manage.py shell -c "$superuser_script"
1927

2028
docker exec chris python plugins/services/manager.py \
21-
add host "http://pfcon.local:5005" --description "Local compute"
29+
add host "http://pfcon.local:5005/api/v1/" --description "Local compute"
2230

2331
# pl-dircopy
24-
docker exec chris python plugins/services/manager.py register host --pluginurl https://chrisstore.co/api/v1/plugins/7/
32+
docker exec chris python plugins/services/manager.py register host --pluginurl \
33+
https://chrisstore.co/api/v1/plugins/25/
34+
docker pull fnndsc/pl-dircopy:2.1.0
2535

2636
touch .setup

secrets.env

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
DJANGO_SETTINGS_MODULE=config.settings.production
22
DJANGO_ALLOWED_HOSTS=*
3-
DJANGO_SECRET_KEY="thisisnotsecure"
3+
DJANGO_SECRET_KEY=secret
44
DJANGO_CORS_ORIGIN_ALLOW_ALL=true
55
DJANGO_CORS_ORIGIN_WHITELIST=babymri.org
66
DJANGO_SECURE_PROXY_SSL_HEADER=
@@ -13,7 +13,6 @@ MYSQL_DATABASE=chris
1313
MYSQL_USER=chris
1414
MYSQL_PASSWORD=Chris1234
1515
CHRIS_STORE_URL=http://chrisstore.local:8010/api/v1/
16-
CHRIS_JID_PREFIX=chris-jid-
1716
SWIFT_CONTAINER_NAME=users
1817
SWIFT_AUTH_URL=http://swift:8080/auth/v1.0
1918
SWIFT_USERNAME=chris:chris1234

0 commit comments

Comments
 (0)