Skip to content

Commit

Permalink
Merge pull request #194 from camicroscope/develop
Browse files Browse the repository at this point in the history
For 3.9.11
  • Loading branch information
birm authored Aug 5, 2022
2 parents 361d11e + 3fcfc16 commit 928f40c
Show file tree
Hide file tree
Showing 15 changed files with 567 additions and 289 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Running QuIP with PathDB (https://github.com/SBU-BMI/PathDB):
3) build with, "docker-compose -f quip-pathdb.yml build"<br>
4) run with, "docker-compose -f quip-pathdb.yml up -d"

The default login for pathdb is `admin` with password `bluecheese2018`. Please change this password before exposing this service to the internet.

## Support
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).

Expand Down
13 changes: 3 additions & 10 deletions caMicroscope.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,11 @@ services:
max-size: "10m"
volumes:
- ./db:/data/db
command: bash /config/run_idx.sh
logging:
options:
max-file: "5"
max-size: "10m"
depends_on:
- mongo
back:
build:
context: "https://github.com/camicroscope/caracal.git#v3.9.10"
context: "https://github.com/camicroscope/caracal.git#v3.9.11"
args:
viewer: "v3.9.10"
viewer: "v3.9.11"
depends_on:
- "mongo"
ports:
Expand Down Expand Up @@ -55,7 +48,7 @@ services:
volumes:
- ./images/:/images/
loader:
build: "https://github.com/camicroscope/SlideLoader.git#v3.9.10"
build: "https://github.com/camicroscope/SlideLoader.git#v3.9.11"
container_name: ca-load
restart: always
logging:
Expand Down
2 changes: 1 addition & 1 deletion config/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3>Please Sign In With Your Google Account</h3>
if (x.hasOwnProperty("token")) {
document.cookie = cookie_name + "=" + x.token;
let token_data = parseJwt(x.token);
window.location = "./apps/landing/landing.html";
window.location = "./apps/table.html";
} else {
window.alert("User not added");
window.location = "./apps/signup/signup.html";
Expand Down
32 changes: 32 additions & 0 deletions config/pathdbmysql.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[mysqld]
datadir=/data/pathdb/mysql
user=mysql
skip-name-resolve
symbolic-links=0
max_connections = 150
max_user_connections = 150
key_buffer = 36M
myisam_sort_buffer_size = 64M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 3M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 1000
query_cache_limit = 1M
query_cache_size = 0
query_cache_type = 0
tmp_table_size = 16M

innodb-flush-log-at-trx-commit=2
innodb_file_per_table=ON
innodb_buffer_pool_size = 4G
innodb_log_file_size=512M
innodb_stats_on_metadata=0
innodb_buffer_pool_instances=4

[mysqld_safe]
2 changes: 1 addition & 1 deletion config/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
{"function":"mongoUpdate", "args": ["camic", "freeform"]}
]
},

{
"route":"/data/Configuration/find",
"method":"get",
Expand Down
17 changes: 8 additions & 9 deletions kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Kubernetes Version of caMicroscope and quip

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

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

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


## caMicroscope
TODO
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.

## quip
TODO
(worried about non-optional config mounts and image mount in particular)
* Setup required configuration by running `pathdb_add_config.sh`
* Change the persistent volume configuration in quip-pathdb.yml to match where your slide and other data files are.
* Run `kubectl apply -f quip-pathdb.yml` to create the pod
* When using minikube, run `minikube tunnel` then `minikube service pathdb --url` to get the url.
40 changes: 39 additions & 1 deletion kubernetes/caMicroscope.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-images
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /data/images
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-images-claim
spec:
storageClassName: manual
volumeName: pv-images
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
- apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -25,7 +51,14 @@ items:
- "ca-back"
volumes:
- name: images
emptyDir: {}
persistentVolumeClaim:
claimName: pv-images-claim
- name: jwtkeys
secret:
secretName: camic-jwt-keys
- name: loginpage
configMap:
name: camic-login
containers:
- name: mongo
image: mongo:4.2-bionic
Expand All @@ -35,6 +68,11 @@ items:
image: ghcr.io/camicroscope/caracal:master
ports:
- containerPort: 4010
volumeMounts:
- name: jwtkeys
mountPath: /src/keys/
- name: loginpage
mountPath: /src/static/
env:
- name: PORT
value: "4010"
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/camicroscope_add_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
kubectl create secret generic camic-jwt-keys --from-file=key=../jwt_keys/key --from-file=key.pub=../jwt_keys/key.pub
kubectl create configmap camic-login --from-file=login.html=../config/login.html
2 changes: 2 additions & 0 deletions kubernetes/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
kubectl delete --all service
kubectl delete --all deploy
kubectl delete --all pod
kubectl delete --all secret
kubectl delete --all configmap
4 changes: 4 additions & 0 deletions kubernetes/pathdb_add_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
kubectl create secret generic camic-jwt-keys --from-file=key=../jwt_keys/key --from-file=key.pub=../jwt_keys/key.pub
kubectl create configmap pathdb-sites --from-file=settings.php=../config/pathdb/settings.php
kubectl create configmap pathdb-config --from-file=../config/ --from-file=httpd.conf=../config/httpd.conf.template
3 changes: 3 additions & 0 deletions kubernetes/pv_cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
kubectl delete --all pvc
kubectl delete --all pv
190 changes: 190 additions & 0 deletions kubernetes/quip-pathdb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-images
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /data/images
- apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-data
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /data
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-data-claim
spec:
storageClassName: manual
volumeName: pv-data
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-images-claim
spec:
storageClassName: manual
volumeName: pv-images
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
- apiVersion: apps/v1
kind: Deployment
metadata:
name: pathdb
labels:
service: pathdb
spec:
selector:
matchLabels:
service: pathdb
template:
metadata:
labels:
service: pathdb
spec:
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "quip-pathdb"
- "quip-imageloader"
- "quip-segloader"
- "quip-hmloader"
- "ca-iip"
- "ca-mongo"
- "ca-back"
- "ca-security"
volumes:
- name: images
persistentVolumeClaim:
claimName: pv-images-claim
- name: data
persistentVolumeClaim:
claimName: pv-data-claim
- name: pathdb-files
emptyDir: {}
- name: jwtkeys
secret:
secretName: camic-jwt-keys
- name: pathdb-sites
configMap:
name: pathdb-sites
- name: pathdb-config
configMap:
name: pathdb-config
containers:
- name: mongo
image: mongo:4.2-bionic
ports:
- containerPort: 27017
- name: back
image: ghcr.io/camicroscope/caracal:master
ports:
- containerPort: 4010
volumeMounts:
- name: jwtkeys
mountPath: /src/keys/
env:
- name: PORT
value: "4010"
- name: JWK_URL
value: "https://www.googleapis.com/oauth2/v3/certs"
- name: IIP_PATH
value: "http://localhost:8080/fcgi-bin/iipsrv.fcgi"
- name: MONGO_URI
value: "mongodb://localhost"
- name: GENERATE_KEY_IF_MISSING
value: "true"
- name: "DEFAULT_USER_TYPE"
value: "Editor"
- name: "DISABLE_SEC"
value: "true"
- name: "DISABLE_CSP"
value: "true"
- name: iip
image: camicroscope/iipimage:latest
ports:
- containerPort: 8080
volumeMounts:
- name: images
mountPath: /data/images/
- name: imageloader
image: camicroscope/pathdb-imageloader:latest
volumeMounts:
- name: data
mountPath: /data/
- name: images
mountPath: /data/images/
- name: heatmaploader
image: camicroscope/pathdb-heatmaploader:latest
volumeMounts:
- name: data
mountPath: /mnt/data/
env:
- name: "TZ"
value: "America/New_York"
- name: "DEBIAN_FRONTEND"
value: "noninteractive"
- name: pathdb
image: camicroscope/pathdb:latest
ports:
- containerPort: 443
- containerPort: 80
volumeMounts:
- name: data
mountPath: /data/
- name: images
mountPath: /data/pathdb/files/wsi
- name: pathdb-sites
mountPath: /quip/web/sites/default/
- name: pathdb-files
mountPath: /quip/web/sites/default/files/
- name: pathdb-config
mountPath: /config/
- name: jwtkeys
mountPath: /keys/
- apiVersion: v1
kind: Service
metadata:
name: pathdb
labels:
service: pathdb
spec:
type: NodePort
selector:
service: pathdb
ports:
- name: "443"
port: 443
targetPort: 443
nodePort: 30443
- name: "80"
port: 80
targetPort: 80
nodePort: 30180
type: LoadBalancer
4 changes: 2 additions & 2 deletions quip-pathdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ services:
- ./images/:/data/images/
back:
build:
context: "https://github.com/camicroscope/caracal.git#v3.9.10"
context: "https://github.com/camicroscope/caracal.git#v3.9.11"
args:
viewer: "v3.9.10"
viewer: "v3.9.11"
depends_on:
- "mongo"
ports:
Expand Down
Loading

0 comments on commit 928f40c

Please sign in to comment.