Skip to content

Commit e01e813

Browse files
authored
Merge pull request #86 from Project-MONAI/vchang/mde-0.2.0
Update MD Express container images to latest
2 parents 201efcd + 79403fb commit e01e813

14 files changed

Lines changed: 497 additions & 100 deletions

File tree

deploy/monai-deploy-express/.env

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
# Container Images
2-
INFORMATICS_GATEWAY_IMAGE=ghcr.io/project-monai/monai-deploy-informatics-gateway:0.3.1
2+
INFORMATICS_GATEWAY_IMAGE=ghcr.io/project-monai/monai-deploy-informatics-gateway:0.3.2
33
INFORMATICS_GATEWAY_CONFIG_IMAGE=dwdraju/alpine-curl-jq:latest
4-
WORKFLOW_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-workflow-manager:develop-nightly-2022-09-26
5-
TASK_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-task-manager:develop-nightly-2022-09-26
4+
WORKFLOW_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-workflow-manager:0.1.0
5+
TASK_MANAGER_IMAGE=ghcr.io/project-monai/monai-deploy-task-manager:0.1.0
66

77
MINIO_IMAGE=minio/minio:latest
88
MINIO_MC_IMAGE=minio/mc
99
MONGODB_IMAGE=mongo:5.0.12
1010
ORTHANC_IMAGE=osimis/orthanc:22.9.0
1111
RABBITMQ_IMAGE=rabbitmq:3.10-management
1212

13+
ELK_VERSION=8.4.2
14+
ELASTICSEARCH_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
15+
LOGSTASH_IMAGE=docker.elastic.co/logstash/logstash:${ELK_VERSION}
16+
KIBANA_IMAGE=docker.elastic.co/kibana/kibana:${ELK_VERSION}
17+
KIBANA_CONFIG_IMAGE=dwdraju/alpine-curl-jq:latest
1318

1419
# Default Listening AE Title
1520
INFORMATICS_GATEWAY_AE_TITLE=MONAI-DEPLOY
@@ -33,6 +38,12 @@ ORTHANC_UI_PORT=8042
3338
RABBITMQ_MGT_PORT=15672
3439
RABBITMQ_PORT=5672
3540

41+
ELASTIC_PORT=9200
42+
ELASTIC_PORT_COMM=9300
43+
LOGSTASH_PORT=50000
44+
LOGSTASH_PORT_API=9600
45+
KIBANA_PORT=5601
46+
3647
# Static IP allocations & hostnames
3748
# Changing of IPs/host names require updates to the service configuration files
3849
SUBNET=172.29.0.0/16
@@ -70,6 +81,22 @@ RABBITMQ_HOSTNAME=rabbitmq
7081
RABBITMQ_CONTAINERNAME=mdl-rabbitmq
7182
RABBITMQ_IP=172.29.0.20
7283

84+
# change the following values may require updating the configuration files in configs/logging/*
85+
ELASTICSEARCH_HOSTNAME=elasticsearch
86+
ELASTICSEARCH_CONTAINERNAME=mdl-es
87+
ELASTICSEARCH_PASSWORD=monai
88+
ELASTICSEARCH_IP=172.29.0.101
89+
90+
LOGSTASH_HOSTNAME=logstash
91+
LOGSTASH_CONTAINERNAME=mdl-logstash
92+
LOGSTASH_IP=172.29.0.102
93+
94+
KIBANA_HOSTNAME=kibana
95+
KIBANA_CONTAINERNAME=mdl-kibana
96+
KIBANA_CFG_CONTAINERNAME=mdl-kibana-cfg
97+
KIBANA_IP=172.29.0.103
98+
KIBANA_CFG_IP=172.29.0.104
99+
73100
# Host Data Volume Paths
74101
INFORMATICS_GATEWAY_PAYLOADS=.md/mdig/payloads/
75102
INFORMATICS_GATEWAY_DATABASE=.md/mdig/database/

deploy/monai-deploy-express/README.md

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,23 @@ The [Docker compose file](docker-compose.yml) spins up the following services. S
4949
Execute one of the following commands in the directory where the `docker-compose.yml` resides to start, stop all the services or to view the logs.
5050

5151
```bash
52-
docker compose up # start all services
52+
docker compose up # start MONAI Deploy Express
5353
docker compose up -d # or run detached
5454
docker compose logs -t -f # view output from all containers
5555
docker compose down # stop all services
5656
```
5757

58-
The first time calling `docker compose up` may take longer as it needs to pull all the container images. However, once all container images are pulled and available on the local system, all the services should spin up within 20 to 60 seconds.
58+
Use the following commands to launch MONAI Deploy Express with ELK (ElasticSearch-LogStash-Kibana):
59+
60+
```bash
61+
./init.sh # required to setup Elastic volume mapping permissions on Linux
62+
docker compose --profile elk up # start MONAI Deploy Express & ELK
63+
docker compose --profile elk up -d # or run detached
64+
docker compose logs -t -f # view output from all containers
65+
docker compose --profile elk down # stop all services
66+
```
67+
68+
The first time calling `docker compose up` may take longer as it needs to pull all the container images. However, once all container images are pulled and available on the local system, all the services should spin up between 20 to 65 seconds.
5969

6070
### MONAI Deploy Services
6171

@@ -75,6 +85,9 @@ The first time calling `docker compose up` may take longer as it needs to pull a
7585
| MongoDB (default database for Worklflow Manager & Task Manager) | http://localhost:27017 | http://172.29.0.30:27017 |
7686
| Orthanc UI (optional) | http://localhost:8042 | http://172.29.0.100:8042 |
7787
| Orthanc SCP (optional) | 4242 | 4242 |
88+
| Elastic Search | 9200, 9300 | 9200,9300 |
89+
| Log Stash | 9600, 50000 | 9600, 50000 |
90+
| Kibana | http://localhost:5601 | http://172.29.0.103:5601 |
7891

7992
*Note: Orthanc is included for convenience and to demo end-to-end workflow execution. It may be disabled and have MONAI Deploy Express integrated with external Orthanc, PACS or other DICOM devices.*
8093

@@ -166,12 +179,17 @@ This example uses the `alpine` container image instead of a MAP to print all fil
166179
In this section, we will download a DICOM dataset, upload it to Orthanc and then run the [Liver Segmentation MAP](https://github.com/Project-MONAI/monai-deploy-app-sdk/tree/main/examples/apps/ai_livertumor_seg_app) from the
167180
[MONAI Deploy App SDK](https://github.com/Project-MONAI/monai-deploy-app-sdk). Finally, we can expect the AI-generated segmentation result to appear in Orthanc.
168181

182+
169183
#### Steps
170184

171185
1. Download the [Abdomen CT dataset](#running-a-monai-deploy-workflow) dataset
172-
2. Upload the dataset as described in [Uploading Data](#upload-dicom-datasets)
173-
3. Deploy the workflow definition to MONAI Deploy Workflow Manager:
174-
4.
186+
2. Download the AI Liver Tumor MAP
187+
```bash
188+
docker pull ghcr.io/mmelqin/monai_ai_livertumor_seg_app:1.0
189+
```
190+
3. Upload the dataset as described in [Uploading Data](#upload-dicom-datasets)
191+
4. Deploy the workflow definition to MONAI Deploy Workflow Manager:
192+
5.
175193
```bash
176194
curl --request POST --header 'Content-Type: application/json' --data "@sample-workflows/liver-seg.json" http://localhost:5001/workflows
177195
```
@@ -182,10 +200,10 @@ In this section, we will download a DICOM dataset, upload it to Orthanc and then
182200
{"workflow_id":"811620da-381f-4daa-854d-600948e67228"}
183201
```
184202

185-
5. Navigate to Orthanc, select any study and then click *Send to DICOM Modality* from the menu on the left.
203+
6. Navigate to Orthanc, select any study and then click *Send to DICOM Modality* from the menu on the left.
186204
In the popup dialog, select **MONAI-DEPLOY** to start a C-STORE request to the Informatics Gateway.
187-
6. Wait for the workflow to complete; the entire workflow takes roughly one minute and thirty seconds to complete. To see the AI-generated segmentation object, reload the Orthanc study page.
188-
7. To see the output of the container, run the following commands:
205+
7. Wait for the workflow to complete; the entire workflow takes roughly one minute and thirty seconds to complete. To see the AI-generated segmentation object, reload the Orthanc study page.
206+
8. To see the output of the container, run the following commands:
189207
```bash
190208
> docker container list -a | grep monai_ai_livertumor_seg_app
191209
# locate the container ID and run the following
@@ -202,9 +220,13 @@ In this section, we will download a DICOM dataset, upload it to Orthanc and then
202220
#### Steps
203221

204222
1. Download the [Chest CT dataset](#running-a-monai-deploy-workflow) dataset
205-
2. Upload the dataset as described in [Uploading Data](#upload-dicom-datasets)
206-
3. Deploy the workflow definition to MONAI Deploy Workflow Manager:
207-
4.
223+
2. Download the AI Lung Segmentation MAP
224+
```bash
225+
docker pull ghcr.io/mmelqin/monai_ai_lung_seg_app:1.0
226+
```
227+
3. Upload the dataset as described in [Uploading Data](#upload-dicom-datasets)
228+
4. Deploy the workflow definition to MONAI Deploy Workflow Manager:
229+
5.
208230
```
209231
curl --request POST --header 'Content-Type: application/json' --data "@sample-workflows/lung-seg.json" http://localhost:5001/workflows
210232
```
@@ -215,10 +237,10 @@ In this section, we will download a DICOM dataset, upload it to Orthanc and then
215237
{"workflow_id":"811620da-381f-4daa-854d-600948e67228"}
216238
```
217239

218-
5. Navigate to Orthanc, select any study and then click *Send to DICOM Modality* from the menu on the left.
240+
6. Navigate to Orthanc, select any study and then click *Send to DICOM Modality* from the menu on the left.
219241
In the popup dialog, select **MONAI-DEPLOY** to start a C-STORE request to the Informatics Gateway.
220-
6. Wait for the workflow to complete; the entire workflow takes roughly one minute to complete. To see the AI-generated segmentation object, reload the Orthanc study page.
221-
7. To see the output from the container, run the following commands:
242+
7. Wait for the workflow to complete; the entire workflow takes roughly one minute to complete. To see the AI-generated segmentation object, reload the Orthanc study page.
243+
8. To see the output from the container, run the following commands:
222244
```bash
223245
> docker container list -a | grep monai_ai_lung_seg_app
224246
# locate the container ID and run the following
@@ -230,9 +252,14 @@ In this section, we will download a DICOM dataset, upload it to Orthanc and then
230252
In the `liver-lung-seg.json` workflow definition, we combined the AI Lung MAP and the AI Liver MAP into one single workflow definition. With this workflow definition, the Workflow Manager would route the incoming data based on the routing rules defined.
231253

232254
1. Download one or both of the [datasets](#running-a-monai-deploy-workflow) provided above
233-
2. Upload the dataset as described in [Uploading Data](#upload-dicom-datasets)
234-
3. Deploy the workflow definition to MONAI Deploy Workflow Manager:
235-
4.
255+
2. Download the AI Liver Tumor & the AI Lung Segmentation MAPs
256+
```bash
257+
docker pull ghcr.io/mmelqin/monai_ai_lung_seg_app:1.0
258+
docker pull ghcr.io/mmelqin/monai_ai_livertumor_seg_app:1.0
259+
```
260+
3. Upload the dataset as described in [Uploading Data](#upload-dicom-datasets)
261+
4. Deploy the workflow definition to MONAI Deploy Workflow Manager:
262+
5.
236263
```
237264
curl --request POST --header 'Content-Type: application/json' --data "@sample-workflows/liver-lung-seg.json" http://localhost:5001/workflows
238265
```
@@ -243,19 +270,24 @@ In the `liver-lung-seg.json` workflow definition, we combined the AI Lung MAP an
243270
{"workflow_id":"6d5e1e73-bd07-4e71-b1fa-b66408d43b82"}
244271
```
245272

246-
5. Navigate to Orthanc, select one of the studies and then click *Send to DICOM Modality* from the menu on the left.
273+
6. Navigate to Orthanc, select one of the studies and then click *Send to DICOM Modality* from the menu on the left.
247274
In the popup dialog, choose **MONAI-DEPLOY** to start a C-STORE request to the Informatics Gateway.
248-
6. Wait for the workflow to complete and reload the Orthanc study page and expect a new series to be added.
249-
7. To see the output from the container, run the following commands:
275+
7. Wait for the workflow to complete and reload the Orthanc study page and expect a new series to be added.
276+
8. To see the output from the container, run the following commands:
250277
```bash
251278
> docker container list -a | grep monai_ai_
252279
# locate the container ID and run the following
253280
> docker logs {CONTAINER ID}
254281
```
255-
8. Repeat the steps with the other dataset.
282+
9. Repeat the steps with the other dataset.
256283

257284
In this example, the [Chest CT dataset](https://drive.google.com/file/d/1IGXUgZ7NQCwsix57cdSgr-iYErevqETO/view?usp=sharing) should only launch the AI Lung MAP, while the [Abdomen CT dataset](https://drive.google.com/file/d/1d8Scm3q-kHTqr_-KfnXH0rPnCgKld2Iy/view?usp=sharing) would launch the AI Liver MAP.
258285

286+
## Using Kibana
287+
288+
A default dataview is imported to Kibana at startup. To load the saved search, navigate to http://localhost:5601/, click on Analytics > Discover from the 🍔 menu. From the top right click *Open* and select *MONAI-Default*.
289+
290+
259291
## Tips
260292

261293
- If you are using your DICOM dataset, please remove the router task or modify the routing conditions to meet your needs.

deploy/monai-deploy-express/configs/informatics-gateway.json

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"rejectUnknownSources": false
1111
},
1212
"scu": {
13-
"aeTitle": "MonaiSCU",
13+
"aeTitle": "MONAISCU",
1414
"logDimseDatasets": false,
1515
"logDataPDUs": false
1616
}
@@ -38,12 +38,15 @@
3838
}
3939
},
4040
"storage": {
41-
"bufferRootPath": "/temp",
41+
"bufferRootPath": "/payloads",
4242
"tempStorageRootPath": "/incoming",
4343
"bucketName": "monaideploy",
4444
"storageRootPath": "/payloads",
4545
"temporaryBucketName": "monaideploy",
4646
"serviceAssemblyName": "Monai.Deploy.Storage.MinIO.MinIoStorageService, Monai.Deploy.Storage.MinIO",
47+
"watermarkPercent": 75,
48+
"reserveSpaceGB": 5,
49+
"concurrentUploads": 4,
4750
"settings": {
4851
"endpoint": "minio:9000",
4952
"accessKey": "minioadmin",
@@ -61,42 +64,6 @@
6164
"sendAck": true
6265
}
6366
},
64-
"Logging": {
65-
"LogLevel": {
66-
"Default": "Information",
67-
"Dicom": "Warning",
68-
"System": "Warning",
69-
"Microsoft": "Warning",
70-
"Microsoft.EntityFrameworkCore": "Warning",
71-
"Microsoft.Hosting.Lifetime": "Warning",
72-
"Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker": "Error",
73-
"Monai": "Information"
74-
},
75-
"Console": {
76-
"FormatterOptions": {
77-
"ColorBehavior": "Enabled",
78-
"IncludeScopes": true,
79-
"SingleLine": false,
80-
"TimestampFormat": " HH:mm:ss ",
81-
"UseUtcTimestamp": true
82-
}
83-
},
84-
"File": {
85-
"BasePath": "logs",
86-
"FileEncodingName": "utf-8",
87-
"DateFormat": "yyyyMMdd",
88-
"CounterFormat": "000",
89-
"MaxFileSize": 10485760,
90-
"IncludeScopes": true,
91-
"MaxQueueSize": 100,
92-
"TextBuilderType": "Monai.Deploy.InformaticsGateway.Logging.FileLoggingTextFormatter, Monai.Deploy.InformaticsGateway",
93-
"Files": [
94-
{
95-
"Path": "MIG-<date>-<counter>.log"
96-
}
97-
]
98-
}
99-
},
10067
"Kestrel": {
10168
"EndPoints": {
10269
"Http": {
@@ -114,4 +81,4 @@
11481
"InformaticsGatewayServerEndpoint": "http://localhost:5000",
11582
"DockerImagePrefix": "ghcr.io/project-monai/monai-deploy-informatics-gateway"
11683
}
117-
}
84+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2022 MONAI Consortium
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
17+
## Default Elasticsearch configuration from Elasticsearch base image.
18+
## https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/config/elasticsearch.yml
19+
#
20+
cluster.name: "docker-cluster"
21+
network.host: 0.0.0.0
22+
23+
## X-Pack settings
24+
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html
25+
#
26+
xpack.security.enabled: false
27+
xpack.license.self_generated.type: basic
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"attributes":{"fieldAttrs":"{\"@version\":{\"count\":1},\"EventId\":{\"count\":3},\"Level\":{\"count\":4},\"LoggerName\":{\"count\":3},\"MachineName\":{\"count\":1},\"Message\":{\"count\":2},\"ServiceName\":{\"count\":1},\"ServiceVersion\":{\"count\":1}}","fields":"[]","name":"monai-deploy","runtimeFieldMap":"{}","sourceFilters":"[]","timeFieldName":"@timestamp","title":"monai-deploy-*","typeMeta":"{}"},"coreMigrationVersion":"8.4.2","id":"6c4ef8fa-f382-4dad-8c82-f180f09fc88d","migrationVersion":{"index-pattern":"8.0.0"},"references":[],"type":"index-pattern","updated_at":"2022-10-11T21:54:09.450Z","version":"Wzc2MiwxXQ=="}
2+
{"attributes":{"columns":["EventId","Level","LoggerName","Message"],"description":"","grid":{"columns":{"EventId":{"width":124},"Level":{"width":67.66666666666663},"LoggerName":{"width":668.1666666666667}}},"hideChart":false,"isTextBasedQuery":false,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"type\":\"phrases\",\"key\":\"Level\",\"params\":[\"TRACE\"],\"alias\":null,\"negate\":true,\"disabled\":false,\"value\":[\"TRACE\"],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"bool\":{\"should\":[{\"match_phrase\":{\"Level\":\"TRACE\"}}],\"minimum_should_match\":1}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[["@timestamp","desc"]],"title":"MONAI-Default"},"coreMigrationVersion":"8.4.2","id":"48ce7db0-49af-11ed-bde2-430e63791a09","migrationVersion":{"search":"8.0.0"},"references":[{"id":"6c4ef8fa-f382-4dad-8c82-f180f09fc88d","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"6c4ef8fa-f382-4dad-8c82-f180f09fc88d","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2022-10-11T21:54:30.795Z","version":"Wzc3NSwxXQ=="}
3+
{"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":2,"missingRefCount":0,"missingReferences":[]}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2022 MONAI Consortium
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
## Default Kibana configuration from Kibana base image.
17+
## https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/templates/kibana_yml.template.ts
18+
#
19+
server.name: kibana
20+
server.host: 0.0.0.0
21+
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
22+
monitoring.ui.container.elasticsearch.enabled: true
23+
24+
## X-Pack security credentials
25+
#
26+
elasticsearch.username: kibana_system
27+
elasticsearch.password: monai
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2022 MONAI Consortium
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
## Default Logstash configuration from Logstash base image.
16+
## https://github.com/elastic/logstash/blob/main/docker/data/logstash/config/logstash-full.yml
17+
#
18+
http.host: "0.0.0.0"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2022 MONAI Consortium
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
- pipeline.id: monei-deploy
15+
path.config: "/usr/share/logstash/pipeline/monai-deploy.conf"
16+
queue.type: persisted

0 commit comments

Comments
 (0)