Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating the dev guide so it works #1004

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions guidelines/mwm-developer-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- python 3 installed.
- Helm 3 https://helm.sh/docs/intro/install/
- rabbitmqadmin https://www.rabbitmq.com/management-cli.html
- mc.exe https://github.com/minio/mc install and add its location to the storage_settings_executableLocation setting (appsettings.local.json) including the name itself ! ie `mc.exe` if its in the folder of the running executable (\bin\Debug\net8.0).
- mc.exe https://github.com/minio/mc install and add its location to the storage_settings_executableLocation setting (appsettings.local.json) including the name itself ! ie `mc.exe` if its in the folder of the running executable (\bin\Debug\net8.0). (for TaskManager)

Note. if you already have docker container for Minio Rabbit etc running Stop these.

Expand All @@ -44,6 +44,7 @@ To disable argo authentication run
]}]'

Note. below Im using bash as its my preferred option, But if you to are using bash and your on windows (wsl2) you MUST make sure you windows .kube/config is also pointing to the same K8's cluster, this is because the code running in vs will look in there for the context to write k8's secrets too!
you can do this by coping the relevent sections from ~/.kube/config to C:\Users\yourname\.kube\config

now in a bash window (can be cmd or powershell)

Expand Down Expand Up @@ -73,6 +74,21 @@ from a bash terminal in the root folder of the project
- `helm upgrade -i -n argo -f deploy/helm/rabbitmq-local.yaml rabbit deploy/helm`

### running in VisualStudio
---
### NEW
------
You must now also run Informaticsgateway (mig), this is a separate project and is required for the workflow to validate and run.

### create an AETitle in the mig
below assumes you are running mig on port 5010.
```
curl -X POST 'http://localhost:5010/config/destination' -H 'Content-Type: application/json' -d '{"name": "MY_SCANNER", "hostIp": "127.0.0.1", "port": 10, "aeTitle": "MY_SCANNER"}'

```


----

Now assuming your launchSettings in workflow manager has the line
`"ASPNETCORE_ENVIRONMENT": "Local"`
AND in taskManager has the line
Expand Down Expand Up @@ -181,7 +197,7 @@ You can use Mongo Compass, with connection string `mongodb://root:rootpassword@l
### now we need an argo template to run.
navigate to [https://localhost:2746/workflow-templates?namespace=argo](https://localhost:2746/workflow-templates?namespace=argo) proceed passed the warnings about been insecure. (Chrome, click advance and then proceed to destination)
click on `CREATE NEW WORKFLOW TEMPLATE` button top left.
set the name to `name: simple-workflow` so it matches the workflow we posted above.
set the name to `name: simple-workflow` and its namespace to `namespace: argo` so it matches the workflow we posted above.
then click the `Create` button.
switch the tab back to [workflows](https://localhost:2746/workflows?limit=50) in the left menu

Expand All @@ -190,7 +206,7 @@ switch the tab back to [workflows](https://localhost:2746/workflows?limit=50) in

In the command below replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with the new workflowId from above ie. `9235f5e8-9ad2-44d2-8b41-2c1e4d2464c6`

```rabbitmqadmin -u admin -p admin -P 30672 -V monaideploy publish exchange=monaideploy routing_key=md.workflow.request properties="{\"app_id\": \"16988a78-87b5-4168-a5c3-2cfc2bab8e54\",\"type\": \"WorkflowRequestMessage\",\"message_id\": \"0277e763-316c-4104-aeda-3620e7a642c7\",\"correlation_id\":\"ab482a7c-4da7-4e76-8d36-d194dd35555e\",\"content_type\": \"application/json\"}" payload="{\"payload_id\":\"00000000-1000-0000-0000-000000000000\",\"workflows\":[\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"],\"file_count\":0,\"correlation_id\":\"e4b06f00-5ce3-4477-86cb-4f3bf20680c2\",\"bucket\":\"bucket1\",\"calling_aetitle\":\"MWM\",\"called_aetitle\":\"Basic_AE_3\",\"timestamp\":\"2022-07-13T11:34:34.8428704+01:00\"}"```
```rabbitmqadmin -u admin -p admin -P 30672 -V monaideploy publish exchange=monaideploy routing_key=md.workflow.request properties="{\"app_id\": \"16988a78-87b5-4168-a5c3-2cfc2bab8e54\",\"type\": \"WorkflowRequestMessage\",\"message_id\": \"0277e763-316c-4104-aeda-3620e7a642c7\",\"correlation_id\":\"ab482a7c-4da7-4e76-8d36-d194dd35555e\",\"content_type\": \"application/json\"}" payload="{\"payload_id\":\"00000000-1000-0000-0000-000000000000\",\"workflows\":[\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"],\"trigger\":{\"source\":\"MY_SCANNER\",\"destination\":\"PROD_PACS\"},\"file_count\":0,\"correlation_id\":\"e4b06f00-5ce3-4477-86cb-4f3bf20680c2\",\"bucket\":\"bucket1\",\"calling_aetitle\":\"MWM\",\"called_aetitle\":\"Basic_AE_3\",\"timestamp\":\"2022-07-13T11:34:34.8428704+01:00\"}"```

paste the above (with the proper workflowId) into bash and press enter.

Expand Down
6 changes: 3 additions & 3 deletions src/TaskManager/TaskManager/appsettings.Local.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"WorkloadManagerDatabase": {
"ConnectionString": "mongodb://root:rootpassword@localhost:27017",
"ConnectionString": "mongodb://root:rootpassword@localhost:30017",

Check warning on line 3 in src/TaskManager/TaskManager/appsettings.Local.json

View workflow job for this annotation

GitHub Actions / sonarscanner

Review this hard-coded URI, which may contain a credential. (https://rules.sonarsource.com/csharp/RSPEC-2068)
"DatabaseName": "WorkloadManager"
},
"WorkflowManager": {
Expand Down Expand Up @@ -42,8 +42,8 @@
"publisherSettings": {
"endpoint": "localhost",
"username": "admin",
"password": "admin",

Check warning on line 45 in src/TaskManager/TaskManager/appsettings.Local.json

View workflow job for this annotation

GitHub Actions / sonarscanner

"password" detected here, make sure this is not a hard-coded credential. (https://rules.sonarsource.com/csharp/RSPEC-2068)
"port": "5672",
"port": "30072",
"virtualHost": "monaideploy",
"exchange": "monaideploy",
"deadLetterExchange": "monaideploy-dead-letter",
Expand All @@ -54,8 +54,8 @@
"subscriberSettings": {
"endpoint": "localhost",
"username": "admin",
"password": "admin",

Check warning on line 57 in src/TaskManager/TaskManager/appsettings.Local.json

View workflow job for this annotation

GitHub Actions / sonarscanner

"password" detected here, make sure this is not a hard-coded credential. (https://rules.sonarsource.com/csharp/RSPEC-2068)
"port": "5672",
"port": "30072",
"virtualHost": "monaideploy",
"exchange": "monaideploy",
"exportRequestQueue": "export_tasks"
Expand Down
9 changes: 7 additions & 2 deletions src/WorkflowManager/WorkflowManager/appsettings.Local.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"WorkloadManagerDatabase": {
"ConnectionString": "mongodb://root:rootpassword@localhost:27017",
"ConnectionString": "mongodb://root:rootpassword@localhost:30017",
"DatabaseName": "WorkloadManager"
},
"MonaiDeployAuthentication": {
Expand Down Expand Up @@ -100,7 +100,7 @@
"migExternalAppPlugins2": [
"Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution.DicomDeidentifier, Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution, Version=0.0.0.0"
],
"migExternalAppPlugins": [""],
"migExternalAppPlugins": [ "" ],
"InformaticsGateway": {
"apiHost": "http://localhost:5010",
"username": "aide",
Expand All @@ -117,5 +117,10 @@
"LogHttpResponseBody": true
},
"AllowedHosts": "*"
},
"InformaticsGateway": {
"apiHost": "http://localhost:5010",
"username": "",
"password": ""
}
}
40 changes: 19 additions & 21 deletions tests/UnitTests/WorkflowManager.Tests/packages.lock.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
},
"xunit": {
"type": "Direct",
"requested": "[2.6.5, )",
"resolved": "2.6.5",
"contentHash": "iPSL63kw21BdSsdA79bvbVNvyn17DWI4D6VbgNxYtvzgViKrmbRLr8sWPxSlc4AvnofEuFfAi/rrLSzSRomwCg==",
"requested": "[2.7.0, )",
"resolved": "2.7.0",
"contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==",
"dependencies": {
"xunit.analyzers": "1.9.0",
"xunit.assert": "2.6.5",
"xunit.core": "[2.6.5]"
"xunit.analyzers": "1.11.0",
"xunit.assert": "2.7.0",
"xunit.core": "[2.7.0]"
}
},
"xunit.runner.visualstudio": {
Expand Down Expand Up @@ -1876,39 +1876,37 @@
},
"xunit.analyzers": {
"type": "Transitive",
"resolved": "1.9.0",
"contentHash": "02ucFDty6Y9BBT5c35YueFfbM3uEzeFdRvlNtAPhZVUkGUlhl3jsV2XesgTj986/PZXIjpVoc2D8ee6p1ha/Fw=="
"resolved": "1.11.0",
"contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w=="
},
"xunit.assert": {
"type": "Transitive",
"resolved": "2.6.5",
"contentHash": "gb5uv7vjBFz7nhEa6aXK5sVJwsG/88xf8DN5wqK0ejCDsDybqICyNJIj+eoD43xbmdPZryNDPpeWDCfiKI/bnA=="
"resolved": "2.7.0",
"contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA=="
},
"xunit.core": {
"type": "Transitive",
"resolved": "2.6.5",
"contentHash": "hpdMnSNlx4ejaxpaIAFaqHt4q9ZCnzZLnURrSa5CzYXxHhIQbV8/0yXLjRdublhreonGXVMmsQ1KHlS9WbfpCw==",
"resolved": "2.7.0",
"contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==",
"dependencies": {
"xunit.extensibility.core": "[2.6.5]",
"xunit.extensibility.execution": "[2.6.5]"
"xunit.extensibility.core": "[2.7.0]",
"xunit.extensibility.execution": "[2.7.0]"
}
},
"xunit.extensibility.core": {
"type": "Transitive",
"resolved": "2.6.5",
"contentHash": "dSGRkVxzH27XaL83+Z9kNPllqgsmsiPayXw+0weCGsrZQxfSCBNNkSb9nYUpkVoEBCUviXOmo1tfApqhgqTjog==",
"resolved": "2.7.0",
"contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==",
"dependencies": {
"NETStandard.Library": "1.6.1",
"xunit.abstractions": "2.0.3"
}
},
"xunit.extensibility.execution": {
"type": "Transitive",
"resolved": "2.6.5",
"contentHash": "jUMr88e0lSqDq8Vut0XVqx7plFg91QsKW/rX6gaVnJL6Z19LmNSDmyqd7cg6HQGfboAmyoFZyydA4Kcgouu1BA==",
"resolved": "2.7.0",
"contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==",
"dependencies": {
"NETStandard.Library": "1.6.1",
"xunit.extensibility.core": "[2.6.5]"
"xunit.extensibility.core": "[2.7.0]"
}
},
"ZstdSharp.Port": {
Expand Down
Loading