Skip to content

Commit

Permalink
Remove use of local-path-provisioner and create PVs
Browse files Browse the repository at this point in the history
  • Loading branch information
mocsharp committed Sep 13, 2023
1 parent edb76ff commit 0b786b3
Show file tree
Hide file tree
Showing 31 changed files with 632 additions and 118 deletions.
1 change: 1 addition & 0 deletions deploy/helm-charts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/*.tgz
7 changes: 2 additions & 5 deletions deploy/helm-charts/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@ dependencies:
- name: argo-workflows
repository: https://argoproj.github.io/argo-helm
version: 0.33.1
- name: local-path-provisioner
repository: https://charts.containeroo.ch
version: 0.0.24
digest: sha256:6c6f22833d7b04577238156ef04787025ff112a3fce93e1b7aef4664cf483b4b
generated: "2023-09-01T14:33:33.804030468-07:00"
digest: sha256:bc9fd492011835b2ebb1d418f860eda28691ab8805d3215be2f488fc00cfe236
generated: "2023-09-07T10:32:16.447050486-07:00"
5 changes: 1 addition & 4 deletions deploy/helm-charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,5 @@ sources:
- https://github.com/Project-MONAI/monai-deploy-workflow-manager/
dependencies:
- name: argo-workflows
version: 0.33.1
version: 0.33.3
repository: https://argoproj.github.io/argo-helm
- name: local-path-provisioner
version: 0.0.24
repository: https://charts.containeroo.ch
1 change: 0 additions & 1 deletion deploy/helm-charts/charts/.gitignore

This file was deleted.

19 changes: 18 additions & 1 deletion deploy/helm-charts/docs/01.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,31 @@ Use the following commands to install MONAI Deploy Helm charts and its dependenc
- Orthanc
- RabbitMQ
- [Argo Workflows](https://github.com/argoproj/argo-helm/tree/main/charts/argo-workflows)
- [local-path-provisioner](https://github.com/rancher/local-path-provisioner)
- Postgres - archives Argo jobs (can be disabled in `values.yaml` > `argo-workflows` > `controller` > `persistence` > `archive=false`)

```bash
helm upgrade -i monai-deploy . # default/current namespace
helm upgrade -i monai-deploy -n my-space . # install in namespace "my-namespace"
```

> **Note**
> Persistent volumes are created in `/opt/monai-deploy` by default, please ensure the volume has enough space required for each service:
> - Informatics Gateway: 1Gi (logs), 10Gi (payloads) - `/opt/monai-deploy/mig`
> - MinIO: 100Gi (data), 1Gi (config) - `/opt/monai-deploy/minio`
> - Mongo: 1Gi - `/opt/monai-deploy/mongo`
> - Orthanc: 100Gi - `/opt/monai-deploy/orthanc`
> - RabbitMQ: 1Gi - `/opt/monai-deploy/rabbitmq`
> - Postgres: 1Gi - `/opt/monai-deploy/postgres`
> **Note**
> Informatics Gateway creates two buckets at startup:
> 1. monaideploy - stores input and output
> 2. argologs - archives application logs from Argo
> **Warning**
> While data can be persisted between reinstallations, you may still need to reconfigure DICOM AE Titles so the IP addresses and ports
> can be configured correctly.
Upon successfully installation, optionally follow the on screen instructions to initialize Informatics Gateway & Orthanc.

## Advanced Configuration
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm-charts/files/informatics-gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scp": {
"port": 104,
"logDimseDatasets": false,
"rejectUnknownSources": true
"rejectUnknownSources": false
},
"scu": {
"aeTitle": "MONAISCU",
Expand Down Expand Up @@ -47,7 +47,7 @@
"region": "local",
"executableLocation": "/bin/mc",
"serviceName": "MinIO",
"createBuckets": "monaideploy"
"createBuckets": "monaideploy,argologs"
}
},
"hl7": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ spec:
metadata: {}
container:
name: ''
image: alpine:latest
image: ubuntu:latest
command:
- /bin/sh
args:
- '-c'
- date && cp -vr /var/monai/input/* /var/monai/output && date
- date -Ins && cp -r /var/monai/input/* /var/monai/output && date -Ins
2 changes: 1 addition & 1 deletion deploy/helm-charts/files/sample-workflows/hello-world.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"informatics_gateway": {
"ae_title": "MONAI-DEPLOY",
"data_origins": [
"ORTHANC"
"ORTHANC", "STORESCU"
],
"export_destinations": [
"ORTHANC"
Expand Down
11 changes: 8 additions & 3 deletions deploy/helm-charts/files/welcome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,18 @@ printf "\nDeleting existing MONAI Deploy AE Title..."
curl -s --request DELETE "http://$NODE_IP:$MIG_API_PORT/config/ae/MONAI-DEPLOY" >/dev/null
printf "\nDeleting existing DICOM Source..."
curl -s --request DELETE "http://$NODE_IP:$MIG_API_PORT/config/source/ORTHANC" >/dev/null
curl -s --request DELETE "http://$NODE_IP:$MIG_API_PORT/config/source/STORESCU" >/dev/null
printf "\nDeleting existing DICOM Destination..."
curl -s --request DELETE "http://$NODE_IP:$MIG_API_PORT/config/destination/ORTHANC" >/dev/null

printf "\nAdding MONAI Deploy AE Title..."
curl -s --request POST "http://$NODE_IP:$MIG_API_PORT/config/ae" --header "Content-Type: application/json" --data-raw "{\"name\": \"MONAI-DEPLOY\",\"aeTitle\": \"MONAI-DEPLOY\"}" >/dev/null
printf "\nAdding DICOM Source..."
printf "\nAdding MONAI Deploy AE Title (MONAI-DEPLOY)..."
curl -s --request POST "http://$NODE_IP:$MIG_API_PORT/config/ae" --header "Content-Type: application/json" --data-raw "{\"name\": \"MONAI-DEPLOY\",\"aeTitle\": \"MONAI-DEPLOY\", \"timeout\": 3}" >/dev/null
printf "\nAdding DICOM Source (ORTHANC)..."
curl -s --request POST "http://$NODE_IP:$MIG_API_PORT/config/source" --header "Content-Type: application/json" --data-raw "{\"name\": \"ORTHANC\",\"hostIp\": \"$ORTHANC_IP\",\"aeTitle\": \"ORTHANC\"}" >/dev/null

HOST_IP=$(hostname -I | awk '{print $1}')
printf "\nAdding DICOM Source (STORESCU @ $HOST_IP)..."
curl -s --request POST "http://$NODE_IP:$MIG_API_PORT/config/source" --header "Content-Type: application/json" --data-raw "{\"name\": \"STORESCU\",\"hostIp\": \"$HOST_IP\",\"aeTitle\": \"STORESCU\"}" >/dev/null
printf "\nAdding DICOM Destination..."
curl -s --request POST "http://$NODE_IP:$MIG_API_PORT/config/destination" --header "Content-Type: application/json" --data-raw "{\"name\": \"ORTHANC\",\"hostIp\": \"$NODE_IP\",\"port\": $ORTHANC_DIMSE_PORT,\"aeTitle\": \"ORTHANC\"}" >/dev/null

Expand Down
28 changes: 28 additions & 0 deletions deploy/helm-charts/templates/01-mongodb-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-{{ .Values.mongo.name }}-volume
labels:
type: local
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.mongo.name }}-volume-class
capacity:
storage: {{ .Values.mongo.size }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.mongo.storagePath }}
type: "DirectoryOrCreate"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-{{ .Values.mongo.name }}-volume-claim
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.mongo.name }}-volume-class
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.mongo.size }}
11 changes: 0 additions & 11 deletions deploy/helm-charts/templates/01-mongodb-pvc.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions deploy/helm-charts/templates/02-rabbitmq-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-{{ .Values.rabbitmq.name }}-volume
labels:
type: local
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.rabbitmq.name }}-volume-class
capacity:
storage: {{ .Values.rabbitmq.size }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.rabbitmq.storagePath }}
type: "DirectoryOrCreate"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-{{ .Values.rabbitmq.name }}-volume-claim
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.rabbitmq.name }}-volume-class
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.rabbitmq.size }}
11 changes: 0 additions & 11 deletions deploy/helm-charts/templates/02-rabbitmq-pvc.yaml

This file was deleted.

59 changes: 59 additions & 0 deletions deploy/helm-charts/templates/03-minio-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# MinIO data volume and volume claim
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-{{ .Values.minio.name }}-data-volume
labels:
type: local
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.minio.name }}-data-volume-class
capacity:
storage: {{ .Values.minio.dataSize }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.minio.storagePath }}
type: "DirectoryOrCreate"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-{{ .Values.minio.name }}-data-volume-claim
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.minio.name }}-data-volume-class
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.minio.dataSize }}
---
# MinIO config volume and volume claim
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-{{ .Values.minio.name }}-config-volume
labels:
type: local
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.minio.name }}-config-volume-class
capacity:
storage: {{ .Values.minio.configSize }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.minio.storagePath }}
type: "DirectoryOrCreate"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-{{ .Values.minio.name }}-config-volume-claim
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.minio.name }}-config-volume-class
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.minio.configSize }}
23 changes: 0 additions & 23 deletions deploy/helm-charts/templates/03-minio-pvc.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions deploy/helm-charts/templates/04-orthanc-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-{{ .Values.orthanc.name }}-volume
labels:
type: local
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.orthanc.name }}-volume-class
capacity:
storage: {{ .Values.orthanc.size }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.orthanc.storagePath }}
type: "DirectoryOrCreate"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-{{ .Values.orthanc.name }}-volume-claim
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.orthanc.name }}-volume-class
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.orthanc.size }}
11 changes: 0 additions & 11 deletions deploy/helm-charts/templates/04-orthanc-pvc.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions deploy/helm-charts/templates/05-postgres-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if index .Values "argo-workflows" "controller" "persistence" "archive" -}}
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-{{ .Values.postgres.name }}-volume
labels:
type: local
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.postgres.name }}-volume-class
capacity:
storage: {{ .Values.postgres.size }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.postgres.storagePath }}
type: "DirectoryOrCreate"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-{{ .Values.postgres.name }}-volume-claim
spec:
storageClassName: {{ .Release.Name }}-{{ .Values.postgres.name }}-volume-class
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.postgres.size }}
{{- end }}
13 changes: 0 additions & 13 deletions deploy/helm-charts/templates/05-postgres-pvc.yaml

This file was deleted.

Loading

0 comments on commit 0b786b3

Please sign in to comment.