Skip to content

Commit 928f40c

Browse files
authored
Merge pull request #194 from camicroscope/develop
For 3.9.11
2 parents 361d11e + 3fcfc16 commit 928f40c

15 files changed

+567
-289
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Running QuIP with PathDB (https://github.com/SBU-BMI/PathDB):
6363
3) build with, "docker-compose -f quip-pathdb.yml build"<br>
6464
4) run with, "docker-compose -f quip-pathdb.yml up -d"
6565

66+
The default login for pathdb is `admin` with password `bluecheese2018`. Please change this password before exposing this service to the internet.
67+
6668
## Support
6769
Feel free to add any support inquiry as a github issue to this repository. Other feedback can be given via [this form](https://docs.google.com/forms/d/e/1FAIpQLScL91LxrpAZjU88GBZP9gmcdgdf8__uNUwhws2lzU6Lr4qNwA/viewform).
6870

caMicroscope.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@ services:
1111
max-size: "10m"
1212
volumes:
1313
- ./db:/data/db
14-
command: bash /config/run_idx.sh
15-
logging:
16-
options:
17-
max-file: "5"
18-
max-size: "10m"
19-
depends_on:
20-
- mongo
2114
back:
2215
build:
23-
context: "https://github.com/camicroscope/caracal.git#v3.9.10"
16+
context: "https://github.com/camicroscope/caracal.git#v3.9.11"
2417
args:
25-
viewer: "v3.9.10"
18+
viewer: "v3.9.11"
2619
depends_on:
2720
- "mongo"
2821
ports:
@@ -55,7 +48,7 @@ services:
5548
volumes:
5649
- ./images/:/images/
5750
loader:
58-
build: "https://github.com/camicroscope/SlideLoader.git#v3.9.10"
51+
build: "https://github.com/camicroscope/SlideLoader.git#v3.9.11"
5952
container_name: ca-load
6053
restart: always
6154
logging:

config/login.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h3>Please Sign In With Your Google Account</h3>
8383
if (x.hasOwnProperty("token")) {
8484
document.cookie = cookie_name + "=" + x.token;
8585
let token_data = parseJwt(x.token);
86-
window.location = "./apps/landing/landing.html";
86+
window.location = "./apps/table.html";
8787
} else {
8888
window.alert("User not added");
8989
window.location = "./apps/signup/signup.html";

config/pathdbmysql.cnf

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[mysqld]
2+
datadir=/data/pathdb/mysql
3+
user=mysql
4+
skip-name-resolve
5+
symbolic-links=0
6+
max_connections = 150
7+
max_user_connections = 150
8+
key_buffer = 36M
9+
myisam_sort_buffer_size = 64M
10+
join_buffer_size = 2M
11+
read_buffer_size = 2M
12+
sort_buffer_size = 3M
13+
table_cache = 1024
14+
thread_cache_size = 286
15+
interactive_timeout = 25
16+
wait_timeout = 1800
17+
connect_timeout = 10
18+
max_allowed_packet = 16M
19+
max_connect_errors = 1000
20+
query_cache_limit = 1M
21+
query_cache_size = 0
22+
query_cache_type = 0
23+
tmp_table_size = 16M
24+
25+
innodb-flush-log-at-trx-commit=2
26+
innodb_file_per_table=ON
27+
innodb_buffer_pool_size = 4G
28+
innodb_log_file_size=512M
29+
innodb_stats_on_metadata=0
30+
innodb_buffer_pool_instances=4
31+
32+
[mysqld_safe]

config/routes.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
{"function":"mongoUpdate", "args": ["camic", "freeform"]}
374374
]
375375
},
376-
376+
377377
{
378378
"route":"/data/Configuration/find",
379379
"method":"get",

kubernetes/README.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# Kubernetes Version of caMicroscope and quip
22

3-
## FYI
4-
- ALL host mounts are ignored, at least as of now.
3+
Note that the images persistent volume starts empty. Please replace `emptyDir` with an alternate source if required.
54

6-
## Develop
5+
## develop and caMicroscope
76
run `kubectl apply -f develop.yml` to create, cleanup.sh to remove *everything* when done.
87

9-
When using minikube, run `minikube tunnel` then `minikube service ca-back --url` to get the url.
8+
When using minikube, run `minikube tunnel` then `minikube service back --url` to get the url.
109

11-
12-
## caMicroscope
13-
TODO
10+
For instances where security is enabled, after generating keys in 'jwt_keys' and confiuring login.html, run `camicroscope_add_config.sh` or some modification thereof as needed for your configuration.
1411

1512
## quip
16-
TODO
17-
(worried about non-optional config mounts and image mount in particular)
13+
* Setup required configuration by running `pathdb_add_config.sh`
14+
* Change the persistent volume configuration in quip-pathdb.yml to match where your slide and other data files are.
15+
* Run `kubectl apply -f quip-pathdb.yml` to create the pod
16+
* When using minikube, run `minikube tunnel` then `minikube service pathdb --url` to get the url.

kubernetes/caMicroscope.yml

+39-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
apiVersion: v1
22
kind: List
33
items:
4+
- apiVersion: v1
5+
kind: PersistentVolume
6+
metadata:
7+
name: pv-images
8+
labels:
9+
type: local
10+
spec:
11+
storageClassName: manual
12+
capacity:
13+
storage: 10Gi
14+
accessModes:
15+
- ReadWriteOnce
16+
hostPath:
17+
path: /data/images
18+
- apiVersion: v1
19+
kind: PersistentVolumeClaim
20+
metadata:
21+
name: pv-images-claim
22+
spec:
23+
storageClassName: manual
24+
volumeName: pv-images
25+
accessModes:
26+
- ReadWriteOnce
27+
resources:
28+
requests:
29+
storage: 10Gi
430
- apiVersion: apps/v1
531
kind: Deployment
632
metadata:
@@ -25,7 +51,14 @@ items:
2551
- "ca-back"
2652
volumes:
2753
- name: images
28-
emptyDir: {}
54+
persistentVolumeClaim:
55+
claimName: pv-images-claim
56+
- name: jwtkeys
57+
secret:
58+
secretName: camic-jwt-keys
59+
- name: loginpage
60+
configMap:
61+
name: camic-login
2962
containers:
3063
- name: mongo
3164
image: mongo:4.2-bionic
@@ -35,6 +68,11 @@ items:
3568
image: ghcr.io/camicroscope/caracal:master
3669
ports:
3770
- containerPort: 4010
71+
volumeMounts:
72+
- name: jwtkeys
73+
mountPath: /src/keys/
74+
- name: loginpage
75+
mountPath: /src/static/
3876
env:
3977
- name: PORT
4078
value: "4010"

kubernetes/camicroscope_add_config.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
kubectl create secret generic camic-jwt-keys --from-file=key=../jwt_keys/key --from-file=key.pub=../jwt_keys/key.pub
3+
kubectl create configmap camic-login --from-file=login.html=../config/login.html

kubernetes/cleanup.sh

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
kubectl delete --all service
33
kubectl delete --all deploy
44
kubectl delete --all pod
5+
kubectl delete --all secret
6+
kubectl delete --all configmap

kubernetes/pathdb_add_config.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
kubectl create secret generic camic-jwt-keys --from-file=key=../jwt_keys/key --from-file=key.pub=../jwt_keys/key.pub
3+
kubectl create configmap pathdb-sites --from-file=settings.php=../config/pathdb/settings.php
4+
kubectl create configmap pathdb-config --from-file=../config/ --from-file=httpd.conf=../config/httpd.conf.template

kubernetes/pv_cleanup.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
kubectl delete --all pvc
3+
kubectl delete --all pv

kubernetes/quip-pathdb.yml

+190
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
apiVersion: v1
2+
kind: List
3+
items:
4+
- apiVersion: v1
5+
kind: PersistentVolume
6+
metadata:
7+
name: pv-images
8+
labels:
9+
type: local
10+
spec:
11+
storageClassName: manual
12+
capacity:
13+
storage: 10Gi
14+
accessModes:
15+
- ReadWriteOnce
16+
hostPath:
17+
path: /data/images
18+
- apiVersion: v1
19+
kind: PersistentVolume
20+
metadata:
21+
name: pv-data
22+
labels:
23+
type: local
24+
spec:
25+
storageClassName: manual
26+
capacity:
27+
storage: 10Gi
28+
accessModes:
29+
- ReadWriteOnce
30+
hostPath:
31+
path: /data
32+
- apiVersion: v1
33+
kind: PersistentVolumeClaim
34+
metadata:
35+
name: pv-data-claim
36+
spec:
37+
storageClassName: manual
38+
volumeName: pv-data
39+
accessModes:
40+
- ReadWriteOnce
41+
resources:
42+
requests:
43+
storage: 10Gi
44+
- apiVersion: v1
45+
kind: PersistentVolumeClaim
46+
metadata:
47+
name: pv-images-claim
48+
spec:
49+
storageClassName: manual
50+
volumeName: pv-images
51+
accessModes:
52+
- ReadWriteOnce
53+
resources:
54+
requests:
55+
storage: 10Gi
56+
- apiVersion: apps/v1
57+
kind: Deployment
58+
metadata:
59+
name: pathdb
60+
labels:
61+
service: pathdb
62+
spec:
63+
selector:
64+
matchLabels:
65+
service: pathdb
66+
template:
67+
metadata:
68+
labels:
69+
service: pathdb
70+
spec:
71+
hostAliases:
72+
- ip: "127.0.0.1"
73+
hostnames:
74+
- "quip-pathdb"
75+
- "quip-imageloader"
76+
- "quip-segloader"
77+
- "quip-hmloader"
78+
- "ca-iip"
79+
- "ca-mongo"
80+
- "ca-back"
81+
- "ca-security"
82+
volumes:
83+
- name: images
84+
persistentVolumeClaim:
85+
claimName: pv-images-claim
86+
- name: data
87+
persistentVolumeClaim:
88+
claimName: pv-data-claim
89+
- name: pathdb-files
90+
emptyDir: {}
91+
- name: jwtkeys
92+
secret:
93+
secretName: camic-jwt-keys
94+
- name: pathdb-sites
95+
configMap:
96+
name: pathdb-sites
97+
- name: pathdb-config
98+
configMap:
99+
name: pathdb-config
100+
containers:
101+
- name: mongo
102+
image: mongo:4.2-bionic
103+
ports:
104+
- containerPort: 27017
105+
- name: back
106+
image: ghcr.io/camicroscope/caracal:master
107+
ports:
108+
- containerPort: 4010
109+
volumeMounts:
110+
- name: jwtkeys
111+
mountPath: /src/keys/
112+
env:
113+
- name: PORT
114+
value: "4010"
115+
- name: JWK_URL
116+
value: "https://www.googleapis.com/oauth2/v3/certs"
117+
- name: IIP_PATH
118+
value: "http://localhost:8080/fcgi-bin/iipsrv.fcgi"
119+
- name: MONGO_URI
120+
value: "mongodb://localhost"
121+
- name: GENERATE_KEY_IF_MISSING
122+
value: "true"
123+
- name: "DEFAULT_USER_TYPE"
124+
value: "Editor"
125+
- name: "DISABLE_SEC"
126+
value: "true"
127+
- name: "DISABLE_CSP"
128+
value: "true"
129+
- name: iip
130+
image: camicroscope/iipimage:latest
131+
ports:
132+
- containerPort: 8080
133+
volumeMounts:
134+
- name: images
135+
mountPath: /data/images/
136+
- name: imageloader
137+
image: camicroscope/pathdb-imageloader:latest
138+
volumeMounts:
139+
- name: data
140+
mountPath: /data/
141+
- name: images
142+
mountPath: /data/images/
143+
- name: heatmaploader
144+
image: camicroscope/pathdb-heatmaploader:latest
145+
volumeMounts:
146+
- name: data
147+
mountPath: /mnt/data/
148+
env:
149+
- name: "TZ"
150+
value: "America/New_York"
151+
- name: "DEBIAN_FRONTEND"
152+
value: "noninteractive"
153+
- name: pathdb
154+
image: camicroscope/pathdb:latest
155+
ports:
156+
- containerPort: 443
157+
- containerPort: 80
158+
volumeMounts:
159+
- name: data
160+
mountPath: /data/
161+
- name: images
162+
mountPath: /data/pathdb/files/wsi
163+
- name: pathdb-sites
164+
mountPath: /quip/web/sites/default/
165+
- name: pathdb-files
166+
mountPath: /quip/web/sites/default/files/
167+
- name: pathdb-config
168+
mountPath: /config/
169+
- name: jwtkeys
170+
mountPath: /keys/
171+
- apiVersion: v1
172+
kind: Service
173+
metadata:
174+
name: pathdb
175+
labels:
176+
service: pathdb
177+
spec:
178+
type: NodePort
179+
selector:
180+
service: pathdb
181+
ports:
182+
- name: "443"
183+
port: 443
184+
targetPort: 443
185+
nodePort: 30443
186+
- name: "80"
187+
port: 80
188+
targetPort: 80
189+
nodePort: 30180
190+
type: LoadBalancer

quip-pathdb.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ services:
1515
- ./images/:/data/images/
1616
back:
1717
build:
18-
context: "https://github.com/camicroscope/caracal.git#v3.9.10"
18+
context: "https://github.com/camicroscope/caracal.git#v3.9.11"
1919
args:
20-
viewer: "v3.9.10"
20+
viewer: "v3.9.11"
2121
depends_on:
2222
- "mongo"
2323
ports:

0 commit comments

Comments
 (0)