Skip to content

Commit 48ae00b

Browse files
author
Jennings Zhang
committed
Pin versions of all services
1 parent 253f093 commit 48ae00b

File tree

3 files changed

+44
-30
lines changed

3 files changed

+44
-30
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
node_modules/
2-
3-
FS/
42
.vagrant/

README.md

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
[![CI](https://github.com/FNNDSC/minimake/workflows/CI/badge.svg)](https://github.com/FNNDSC/minimake/actions?query=workflow%3ACI)
44
[![GitHub license](https://img.shields.io/github/license/FNNDSC/minimake)](https://github.com/FNNDSC/minimake/blob/master/LICENSE)
55

6-
A no-nonsense local ChRIS instance runner without the shenanigans of
7-
[make.sh](https://github.com/FNNDSC/ChRIS_ultron_backEnd/blob/master/make.sh).
8-
Uses various hacks so that CUBE setup is managed completely by `docker-compose`.
6+
Run a demo of ChRIS. https://chrisproject.org/
7+
8+
```bash
9+
git clone https://github.com/FNNDSC/minimake.git chris_minimake
10+
cd chris_minimake
11+
./minimake.sh
12+
```
913

1014
## Usage
1115

12-
Default superuser `chris:chris1234` is created in _CUBE_.
16+
A default superuser `chris:chris1234` is created.
1317

1418
website | URL
1519
---------------|-----
@@ -53,6 +57,10 @@ Beautiful output and some runtime assertions.
5357

5458
# Github Actions
5559

60+
*Minimake* can be used as a step in Github Actions workflows to spin up
61+
an ephermeral instance of the ChRIS backend and its ancillary services
62+
for the purpose of end-to-end testing.
63+
5664
```yaml
5765
on: [push]
5866

@@ -63,16 +71,21 @@ jobs:
6371
steps:
6472
- name: setup CUBE
6573
id: cube
66-
uses: fnndsc/minimake@v1
74+
uses: fnndsc/minimake@v3
6775
- name: make a request
6876
run: curl -u "${{ steps.cube.outputs.cube-user }}" "${{ steps.cube.outputs.cube-url }}"
6977
```
7078
79+
See https://github.com/FNNDSC/cni-store-proxy/blob/master/package.json
80+
as an example.
81+
7182
# About
7283
73-
`./minimake.sh` shoves everything inside of shell scripts and `docker-compose.yml`.
74-
Traditionally, to bring up a single-machine on-the-metal requires
75-
a few extra steps on the host.
84+
`./minimake.sh` is a no-nonsense collection of scripts to start ChRIS without the shenanigans of
85+
[make.sh](https://github.com/FNNDSC/ChRIS_ultron_backEnd/blob/master/make.sh).
86+
It is fully managed by `docker-compose`.
87+
88+
Traditionally, to bring up CUBE+pfcon+pfioh+pman on a single-machine on-the-metal requires a few extra steps on the host.
7689

7790
CUBE setup involves:
7891

@@ -86,7 +99,7 @@ CUBE setup involves:
8699
1. joining a docker swarm
87100
2. figuring out the [`STOREBASE` environment variable](https://github.com/FNNDSC/ChRIS_ultron_backEnd/blob/78670f6abf0b6ebac7aeef75989893b4502d4823/docker-compose_dev.yml#L208-L222)
88101

89-
`pman` is messy because it is a container which spawns other containers on its host.
102+
`pman` is special because it itself is a container which spawns other containers on its host.
90103

91104
It needs `/var/run/docker.sock` to be mounted inside the container.
92105
We can resolve the two setup requirements by connecting to the host's dockerd.
@@ -100,7 +113,9 @@ and takes 2-3 minutes in [Github Actions' Ubuntu VMs](https://github.com/FNNDSC/
100113
### Goals
101114

102115
- fast
103-
- simple use (one purpose, no arguments)
116+
- simple use
117+
- no arguments
118+
- do one thing, and one thing well (a UNIX philosophy)
104119
- legible code
105120
- practical for E2E testing
106121

@@ -110,23 +125,26 @@ and takes 2-3 minutes in [Github Actions' Ubuntu VMs](https://github.com/FNNDSC/
110125
- production use
111126
- back-end development environment
112127

113-
### E2E Testing
114-
115-
`./minimake.sh` blocks until CUBE is ready to accept connections,
116-
and it exits leaving the services up -- it should be easy to use for tests.
117-
118-
See https://github.com/FNNDSC/cni-store-proxy/blob/master/package.json
119-
as an example.
120-
121128
### More Plugins
122129

123130
You can do a search on https://chrisstore.co for plugins to add,
124131
then use a for-loop to register them all.
125132

126133
```bash
134+
# add one thing
135+
name=pl-brainmgz
136+
url=$(
137+
curl -s -H 'Accept:application/json' \
138+
"https://chrisstore.co/api/v1/plugins/search/?name=$url" \
139+
| jq -r '.results[].url'
140+
)
141+
docker exec chris python plugins/services/manager.py register host --pluginurl "$url"
142+
143+
# add everything
127144
search=$(
128-
curl -s -H 'Accept:application/json' 'https://chrisstore.co/api/v1/plugins/' \
129-
| jq -r '.results[] | .url'
145+
curl -s -H 'Accept:application/json' \
146+
'https://chrisstore.co/api/v1/plugins/' \
147+
| jq -r '.results[].url'
130148
)
131149
for $pu in $search; do
132150
docker exec chris python plugins/services/manager.py register host --pluginurl "$pu"

docker-compose.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ version: '3.7'
1111
services:
1212
chris:
1313
container_name: chris
14-
image: fnndsc/chris:latest
14+
image: fnndsc/chris:1.1.0
1515
ports:
1616
- "127.0.0.1:8000:8000"
1717
depends_on:
@@ -24,7 +24,7 @@ services:
2424
- local
2525
env_file: secrets.env
2626
worker:
27-
image: fnndsc/chris:latest
27+
image: fnndsc/chris:1.1.0
2828
entrypoint: ''
2929
command: celery -A core worker -c 4 -l info -Q main
3030
env_file: secrets.env
@@ -37,7 +37,7 @@ services:
3737
networks:
3838
- local
3939
scheduler:
40-
image: fnndsc/chris:latest
40+
image: fnndsc/chris:1.1.0
4141
entrypoint: ''
4242
command: celery -A core beat -l info --pidfile /home/localuser/celerybeat.pid --scheduler django_celery_beat.schedulers:DatabaseScheduler
4343
env_file: secrets.env
@@ -119,8 +119,7 @@ services:
119119

120120
pfcon:
121121
container_name: pfcon
122-
image: fnndsc/pfcon:2.3.1
123-
command: ["--forever", "--httpResponse", "--verbosity", "1"]
122+
image: fnndsc/pfcon:2.4.0
124123
ports:
125124
- "127.0.0.1:5005:5005"
126125
depends_on:
@@ -133,7 +132,7 @@ services:
133132
- pfcon.local
134133
pfioh:
135134
container_name: pfioh
136-
image: fnndsc/pfioh:3.0.1
135+
image: fnndsc/pfioh:3.0.2
137136
command: ["--forever", "--httpResponse", "--createDirsAsNeeded", "--storeBase", "/hostFS/storeBase"]
138137
volumes:
139138
- pfioh-remote:/hostFS/storeBase
@@ -145,13 +144,12 @@ services:
145144
- pfioh_service
146145

147146
pman:
148-
image: fnndsc/pman:2.2.1
147+
image: fnndsc/pman:2.2.2
149148
container_name: pman
150149
environment:
151150
- PMAN_DOCKER_VOLUME=pfioh-remote
152151
depends_on:
153152
- swarm-status
154-
command: ["--rawmode", "1", "--http", "--port", "5010", "--listeners", "12"]
155153
volumes:
156154
- /var/run/docker.sock:/var/run/docker.sock
157155
- pfioh-remote:/hostFS/storeBase

0 commit comments

Comments
 (0)