Skip to content

Commit 71cfee3

Browse files
committed
Documentation & CLI updates
Signed-off-by: Victor Chang <[email protected]>
1 parent 512a106 commit 71cfee3

File tree

9 files changed

+257
-28
lines changed

9 files changed

+257
-28
lines changed

docs/setup/cli.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium
3+
SPDX-License-Identifier: Apache License 2.0
4+
-->
5+
6+
7+
# Command-line Interface (CLI)
8+
9+
The command-line interface (CLI) for Informatics Gateway allows users to configure settings and control the Informatics Gateway.
10+
11+
## Available Commands
12+
13+
To see all available commands:
14+
15+
```bash
16+
> mig-cli
17+
18+
mig-cli
19+
MONAI Deploy Informatics Gateway CLI
20+
21+
Usage:
22+
mig-cli [options] [command]
23+
24+
Options:
25+
-v, --verbose Show verbose output [default: False]
26+
--version Show version information
27+
-?, -h, --help Show help and usage information
28+
29+
Commands:
30+
config Configure the CLI endpoint
31+
start Start the MONAI Deploy Informatics Gateway service
32+
stop Stop the MONAI Deploy Informatics Gateway service
33+
restart Restart the MONAI Deploy Informatics Gateway service
34+
aet, aetitle Configure SCP Application Entities
35+
source, src Configure DICOM sources
36+
dest, destination, dst Configure DICOM destinations
37+
status MONAI Deploy Informatics Gateway service status
38+
```
39+
40+
## Help & Logging
41+
42+
The verbose switch `-v` and the help switch `-h` are available for all commands.
43+
44+
For example:
45+
46+
```bash
47+
> mig-cli aet add -h
48+
49+
add
50+
Add a new SCP Application Entity
51+
52+
Usage:
53+
mig-cli [options] aet add
54+
55+
Options:
56+
-n, --name <name> Name of the SCP Application Entity
57+
-a, --aetitle <aetitle> (REQUIRED) AE Title of the SCP
58+
-g, --grouping <grouping> DICOM tag used to group instances [default: 0020,000D]
59+
-t, --timeout <timeout> Timeout, in seconds, to wait for instances [default: 5]
60+
-w, --workflows <workflows> A space separated list of workflow names or IDs to be associated with the SCP AE Title [default: ]
61+
-i, --ignored-sops <ignored-sops> A space separated list of SOP Class UIDs to be ignoredS [default: ]
62+
-v, --verbose Show verbose output [default: False]
63+
-?, -h, --help Show help and usage information
64+
```
65+
66+
67+
## Controlling Informatics Gateway
68+
69+
Use the following commands to start, stop or restart the Informatics Gateway:
70+
71+
```bash
72+
mig-cli start
73+
mig-cli stop
74+
mig-cli restart
75+
```
76+
77+
## System Health
78+
79+
`mig-cli status` displays status of all running services inside the Informatics Gateway & number of active associations.
80+
81+
```bash
82+
> mig-cli status
83+
84+
info: Number of active DIMSE connections: 8
85+
info: Service Status:
86+
info: space Reclaimer Service: Running
87+
info: dicom SCP Service: Running
88+
info: dicoMweb Export Service: Running
89+
info: dicom Export Service: Running
90+
info: data Retrieval Service: Running
91+
info: payload Notification Service: Running
92+
```
93+
94+
## Configure AE Titles
95+
96+
The CLI provides three commands to configure the listening AE Titles, sources and destinations. Each command allows you to add (`add`), delete (`rm`) and list (`list`) configured AE Titles. Use the `-h` switch for additional options.
97+
98+
### Listening AE Titles
99+
100+
```bash
101+
> mig-cli aet
102+
103+
Description:
104+
Configure SCP Application Entities
105+
106+
Usage:
107+
mig-cli aet [command] [options]
108+
109+
Options:
110+
-?, -h, --help Show help and usage information
111+
-v, --verbose Show verbose output [default: False]
112+
113+
Commands:
114+
add Add a new SCP Application Entity
115+
del, rm Remove a SCP Application Entity
116+
list, ls List all SCP Application Entities
117+
```
118+
119+
### Source AE Titles
120+
121+
```bash
122+
> mig-cli src
123+
124+
Description:
125+
Configure DICOM sources
126+
127+
Usage:
128+
mig-cli src [command] [options]
129+
130+
Options:
131+
-?, -h, --help Show help and usage information
132+
-v, --verbose Show verbose output [default: False]
133+
134+
Commands:
135+
add Add a new DICOM source
136+
del, rm Remove a DICOM source
137+
list, ls List all DICOM sources
138+
139+
```
140+
141+
### Destination/Export AE Titles
142+
143+
```bash
144+
> mig-cli dst
145+
146+
Description:
147+
Configure DICOM destinations
148+
149+
Usage:
150+
mig-cli dst [command] [options]
151+
152+
Options:
153+
-?, -h, --help Show help and usage information
154+
-v, --verbose Show verbose output [default: False]
155+
156+
Commands:
157+
add Add a new DICOM destination
158+
del, rm Remove a DICOM destination
159+
list, ls List all DICOM destinations
160+
```

docs/setup/schema.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ The configuration file (`appsettings.json`) controls the behaviors and parameter
3030

3131
The `InformaticsGateway` configuration section contains the following sub-sections:
3232

33-
| Section | Description | Reference |
34-
| -------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
35-
| dicom | DICOM DIMSE service configuration options | [DicomConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DicomConfiguration) |
36-
| dicomWeb | DICOMweb service configuration options | [DicomWebConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DicomWebConfiguration) |
37-
| export | Export service configuration options | [DataExportConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DataExportConfiguration) |
38-
| fhir | FHIR service configuration options | [FhirConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.FhirConfiguration) |
39-
| storage | Storage configuration options, including storage service and disk usage monitoring | [StorageConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.StorageConfiguration) |
40-
| Cli | The configuration used by the CLI | - |
33+
| Section | Description | Reference |
34+
| --------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
35+
| dicom | DICOM DIMSE service configuration options | [DicomConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DicomConfiguration) |
36+
| dicomWeb | DICOMweb service configuration options | [DicomWebConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DicomWebConfiguration) |
37+
| export | Export service configuration options | [DataExportConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DataExportConfiguration) |
38+
| fhir | FHIR service configuration options | [FhirConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.FhirConfiguration) |
39+
| storage | Storage configuration options, including storage service and disk usage monitoring | [StorageConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.StorageConfiguration) |
40+
| messaging | Message broker configuration options | [MessageBrokerConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.MessageBrokerConfiguration) |
41+
| Cli | The configuration used by the CLI | - |
4142

4243
---
4344

@@ -62,13 +63,15 @@ The `InformaticsGateway` configuration section contains the following sub-sectio
6263
}
6364
},
6465
"messaging": {
66+
"publisherServiceAssemblyName":"Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ",
6567
"publisherSettings": {
6668
"endpoint": "localhost",
6769
"username": "username",
6870
"password": "password",
6971
"virtualHost": "monaideploy",
7072
"exchange": "monaideploy"
7173
},
74+
"subscriberServiceAssemblyName":"Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ",
7275
"subscriberSettings": {
7376
"endpoint": "localhost",
7477
"username": "username",
@@ -79,15 +82,15 @@ The `InformaticsGateway` configuration section contains the following sub-sectio
7982
}
8083
},
8184
"storage": {
82-
"temporary": "./payloads",
85+
"temporary": "/payloads",
8386
"bucketName": "monaideploy",
87+
"serviceAssemblyName": "Monai.Deploy.Storage.MinIO.MinIoStorageService, Monai.Deploy.Storage.MinIO",
8488
"settings": {
8589
"endpoint": "localhost:9000",
86-
"accessKey": "username",
90+
"accessKey": "admin",
8791
"accessToken": "password",
8892
"securedConnection": false,
89-
"region": "na",
90-
"credentialServiceUrl": "http://localhost:9000"
93+
"region": "local"
9194
}
9295
}
9396
},
@@ -139,12 +142,14 @@ The `InformaticsGateway` configuration section contains the following sub-sectio
139142
"Cli": {
140143
"Runner": "Docker",
141144
"HostDataStorageMount": "~/.mig/data",
145+
"HostPlugInsStorageMount": "~/.mig/plug-ins",
142146
"HostDatabaseStorageMount": "~/.mig/database",
143147
"HostLogsStorageMount": "~/.mig/logs",
144148
"InformaticsGatewayServerEndpoint": "http://localhost:5000",
145149
"DockerImagePrefix": "ghcr.io/project-monai/monai-deploy-informatics-gateway"
146150
}
147151
}
152+
148153
```
149154

150155
### Configuration Validation

docs/setup/setup.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ the repository and install it.
2424

2525
```bash
2626
# Download the CLI
27-
curl -LO https://github.com/Project-MONAI/monai-deploy-informatics-gateway/releases/download/0.1.0/mig-cli-0.1.0-linux-x64.zip
27+
curl -LO https://github.com/Project-MONAI/monai-deploy-informatics-gateway/releases/download/0.2.0/mig-cli-0.2.0-linux-x64.zip
2828
# Calculate the SHA256 checksum and verify the output with the checksum on the Releases page.
29-
sha256sum mig-cli-0.1.0-linux-x64.zip
29+
sha256sum mig-cli-0.2.0-linux-x64.zip
3030
# Unzip the CLI
31-
unzip mig-cli-0.1.0-linux-x64.zip
31+
unzip mig-cli-0.2.0-linux-x64.zip
3232
# Install it in bin
3333
sudo mv mig-cli /usr/local/bin
3434
```
@@ -37,11 +37,11 @@ sudo mv mig-cli /usr/local/bin
3737

3838
```powershell
3939
# Download the CLI
40-
curl -LO https://github.com/Project-MONAI/monai-deploy-informatics-gateway/releases/download/0.1.0/mig-cli-0.1.0-win-x64.zip
40+
curl -LO https://github.com/Project-MONAI/monai-deploy-informatics-gateway/releases/download/0.2.0/mig-cli-0.2.0-win-x64.zip
4141
# Calculate the SHA256 checksum and verify the output with the checksum on the Releases page.
42-
Get-FileHash mig-cli-0.1.0-win-x64.zip
42+
Get-FileHash mig-cli-0.2.0-win-x64.zip
4343
# Unzip the CLI
44-
Expand-Archive -Path mig-cli-0.1.0-win-x64.zip
44+
Expand-Archive -Path mig-cli-0.2.0-win-x64.zip
4545
```
4646

4747
### Informatics Gateway Docker Image
@@ -53,7 +53,7 @@ page and locate the version to download.
5353
# for the latest build
5454
docker pull ghcr.io/project-monai/monai-deploy-informatics-gateway:latest
5555
# or for a versioned build
56-
docker pull ghcr.io/project-monai/monai-deploy-informatics-gateway:0.1.0
56+
docker pull ghcr.io/project-monai/monai-deploy-informatics-gateway:0.2.0
5757
```
5858

5959
## Configure Informatics Gateway
@@ -62,12 +62,12 @@ Use the following commands to initialize the Informatics Gateway and default con
6262

6363
```bash
6464
mig-cli config init
65-
mig-cli config endpoint http://localhost:5000
65+
mig-cli config endpoint http://localhost:5000 #skip if running locally
6666
```
6767

6868
```powershell
6969
mig-cli.exe config init
70-
mig-cli.exe config endpoint http://localhost:5000
70+
mig-cli.exe config endpoint http://localhost:5000 #skip if running locally
7171
```
7272

7373
The first command extracts the default `appsettings.json` file into the home directory:
@@ -83,6 +83,7 @@ The second command passes the endpoint for the Informatics Gateway RESTful API t
8383

8484
> [!Note]
8585
> To see available commands, simply execute `mig-cli` or `mig-cli.exe`.
86+
> Refer to [CLI](./cli.md) for complete reference.
8687
8788
## Storage Consideration & Configuration
8889

@@ -106,6 +107,7 @@ To change the temporary storage location, locate the `./InformaticsGateway/stora
106107
> size of a single study multiplied by the number of configured AE Titles.
107108
108109
### Shared Storage
110+
109111
Informatics Gateway includes MinIO as the default storage service provider. To integrate with another storage service provider, please refer to the [Data Storage](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/blob/main/guidelines/srs.md#data-storage) section of the SRS.
110112

111113
Download and install MinIO by following the [quickstart guide](https://docs.min.io/docs/minio-quickstart-guide.html). Once MinIO is installed and configured, modify the storage configuration to enable communication between the Informatics Gateway and MinIO.
@@ -121,11 +123,15 @@ Locate the storage section of the configuration in `appsettings.json`:
121123
"dicom": { ... },
122124
"storage": {
123125
"storageServiceCredentials": {
124-
"endpoint": "192.168.1.1:9000", # IP & port to MinIO instance
126+
"endpoint": "localhost:9000", # IP & port to MinIO instance
125127
"accessKey": "admin", # Access key or username
126-
"accessToken": "password" # Access token or password
128+
"accessToken": "password", # Access token or password
129+
"securedConnection": false, # Indicates if connection should be secured using HTTPS
130+
"region": "local", # Region
131+
"executableLocation": "/bin/mc", # Path to minio client
132+
"serviceName": "MinIO" # Name of the service
127133
},
128-
"storageService": "Monai.Deploy.InformaticsGateway.Storage.MinIoStorageService, Monai.Deploy.InformaticsGateway.Storage.MinIo", # Fully qualified type name of the storage service
134+
"storageService": "Monai.Deploy.Storage.MinIO.MinIoStorageService, Monai.Deploy.Storage.MinIO", # Fully qualified type name of the storage service
129135
"securedConnection": false, # Indicates if a secured connection is required to access MinIO
130136
"storageServiceBucketName": "igbucket" # The name of the bucket where data is uploaded to
131137
},
@@ -134,6 +140,20 @@ Locate the storage section of the configuration in `appsettings.json`:
134140
}
135141
```
136142

143+
#### Install the Stoage Plug-in
144+
145+
The default plug-in configured as shown above is __MinIO__.
146+
147+
To install the default MinIO plug-in, download the plug-in `Monai.Deploy.Storage.MinIO.zip` from [MONAI Deploy Storage](https://github.com/Project-MONAI/monai-deploy-storage/releases)
148+
and unzip the files to the `plug-ins` directory in your home directory:
149+
150+
* Linux: `~/.mig/plug-ins`
151+
* Windows: `C:\Users\[username]\.mig\plug-ins`
152+
153+
> [!Note]
154+
> If a plug-in other than MinIO is used, please do update `storageService` in the appsettings.json file.
155+
156+
137157
### Message broker
138158

139159
The nformatics Gateway communicates with other MONAI Deploy components through a message broker. The default messaging service
@@ -151,13 +171,15 @@ Informatics Gateway.
151171
{
152172
"InformaticsGateway": {
153173
"messaging": {
174+
"publisherServiceAssemblyName":"Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ",
154175
"publisherSettings": {
155176
"endpoint": "localhost",
156177
"username": "username",
157178
"password": "password",
158179
"virtualHost": "monaideploy",
159180
"exchange": "monaideploy"
160181
},
182+
"subscriberServiceAssemblyName":"Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ",
161183
"subscriberSettings": {
162184
"endpoint": "localhost",
163185
"username": "username",
@@ -171,9 +193,23 @@ Informatics Gateway.
171193
}
172194
```
173195

196+
#### Install the Messaging Plug-in
197+
198+
The default plug-in configured as shown above is __RabbitMQ__.
199+
200+
To install the default RabbitMQ plug-in, download the plug-in `Monai.Deploy.Messaging.RabbitMQ.zip` from [MONAI Deploy Messaging](https://github.com/Project-MONAI/monai-deploy-messaging/releases)
201+
and unzip the files to the `plug-ins` directory in your home directory:
202+
203+
* Linux: `~/.mig/plug-ins`
204+
* Windows: `C:\Users\[username]\.mig\plug-ins`
205+
206+
> [!Note]
207+
> If a plug-in other than Rabbit is used, please do update `publisherServiceAssemblyName` & `subscriberServiceAssemblyName` in the appsettings.json file.
208+
209+
174210
## Start/Stop Informatics Gateway
175211

176-
To start or stop the Informatics Gateway, update the value of `DockerImagePrefix` in `appsettings.json` with the repository name of the Docker image:
212+
To start or stop the Informatics Gateway, update the value of `DockerImagePrefix` in `appsettings.json` with the repository name of the Docker image (default value shown below):
177213

178214
```json
179215
{

docs/setup/toc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ SPDX-License-Identifier: Apache License 2.0
55

66
# [Setup](setup.md)
77
# [Configuration](schema.md)
8+
# [CLI](cli.md)

0 commit comments

Comments
 (0)