Skip to content
Open
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
46 changes: 0 additions & 46 deletions .github/workflows/portalbackend-integration-tests.yml

This file was deleted.

13 changes: 9 additions & 4 deletions deployment/dev/.env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# Versions
EXAFLOW=1.1.0
PLATFORM_BACKEND=9.3.0
PLATFORM_UI=1.2.0
MIP=9.1.0
EXAFLOW=1.3.0
PLATFORM_BACKEND=10.0.0_candidate
PLATFORM_UI=2.0.0_candidate
MIP=9.2.0

# Toggle authentication
AUTHENTICATION=0

# Frontend base URL used for post-logout redirect.
PLATFORM_UI_BASE_URL=http://localhost

# JupyterLab (published on 127.0.0.1:8888 only).
JUPYTER_TOKEN=dev
# Keycloak access token for the notebook client; required when AUTHENTICATION=1.
MIP_TOKEN=

# External Keycloak
KEYCLOAK_AUTH_URL=https://iam.ebrains.eu/auth/
KEYCLOAK_REALM=MIP
Expand Down
13 changes: 8 additions & 5 deletions deployment/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@
```
./start.sh
```
The script waits for `http://172.17.0.1:8080/services/data-models` and verifies 4 data models are loaded.
The script starts the MIP stack plus direct JupyterLab, then checks that the `dementia` data model is available.

4. To test if the MIP stack is properly setup run the 'test.sh':
Open:
```
./test.sh
http://localhost
http://localhost:8888/lab/tree/workspace/examples/feres_analysis.ipynb?token=dev
```

5. To stop the MIP stack run the 'stop.sh' script to stop all the containers:

JupyterLab uses the compose backend URL `http://platform-backend:8080/services` inside Docker. It is published on `127.0.0.1` only; change `JUPYTER_TOKEN` in `.env` if the host is shared. With `AUTHENTICATION=1`, set `MIP_TOKEN` in `.env` to a Keycloak access token so the notebook client can call the backend.

4. To stop the MIP stack run the 'stop.sh' script to stop all the containers:
```
./stop.sh
```
1 change: 0 additions & 1 deletion deployment/dev/config/disabledAlgorithms.json

This file was deleted.

16 changes: 15 additions & 1 deletion deployment/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ services:
### Exaflow ###
ALGORITHM_UPDATE_INTERVAL: 30 # seconds
EXAFLOW_URL: http://exaflow_controller:5000
PLATFORM_UI_BASE_URL: "${PLATFORM_UI_BASE_URL}"
PLATFORM_UI_BASE_URL: "${PLATFORM_UI_BASE_URL:-http://localhost}"
### Keycloak (external) ###
AUTHENTICATION: "${AUTHENTICATION}"
KEYCLOAK_AUTH_URL: "${KEYCLOAK_AUTH_URL}"
Expand All @@ -185,6 +185,20 @@ services:
- platform-backend
restart: unless-stopped

mip_jupyter:
image: hbpmip/mip-jupyter:0.0.1_candidate
ports:
- "127.0.0.1:8888:8888"
environment:
PLATFORM_BACKEND_URL: http://platform-backend:8080/services
MIP_TOKEN: "${MIP_TOKEN:-}"
JUPYTER_TOKEN: "${JUPYTER_TOKEN:-dev}"
MIP_NOTEBOOK: workspace/examples/feres_analysis.ipynb
JUPYTER_ENABLE_LAB: "yes"
depends_on:
- platform-backend
restart: unless-stopped

networks:
default:
ipam:
Expand Down
3 changes: 0 additions & 3 deletions deployment/dev/requirements.txt

This file was deleted.

21 changes: 6 additions & 15 deletions deployment/dev/start.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail

set -a
source ./.env
set +a

docker compose down -v
docker compose up -d

endpoint="http://172.17.0.1:8080/services/data-models"
max_attempts=30

for attempt in $(seq 1 "${max_attempts}"); do
for _ in {1..30}; do
response="$(curl -fsS --max-time 5 "${endpoint}" 2>/dev/null || true)"
if printf '%s' "${response}" | grep -q '"code"[[:space:]]*:[[:space:]]*"dementia_longitudinal"' \
&& printf '%s' "${response}" | grep -q '"code"[[:space:]]*:[[:space:]]*"dementia"' \
&& printf '%s' "${response}" | grep -q '"code"[[:space:]]*:[[:space:]]*"mentalhealth"' \
&& printf '%s' "${response}" | grep -q '"code"[[:space:]]*:[[:space:]]*"tbi"'
then
echo "Data models check passed: expected codes are available."
echo "You can see the MIP at 172.17.0.1"
if printf "%s" "${response}" | grep -q "\"code\"[[:space:]]*:[[:space:]]*\"dementia\""; then
echo "Data model check passed: dementia is available."
echo "MIP UI: http://localhost"
echo "JupyterLab: http://localhost:8888/lab/tree/workspace/examples/feres_analysis.ipynb?token=<JUPYTER_TOKEN from .env, default dev>"
exit 0
fi
sleep 2
done

echo "Error: expected data model codes were not found at ${endpoint}." >&2
echo "Error: dementia data model was not found at ${endpoint}." >&2
exit 1
12 changes: 0 additions & 12 deletions deployment/dev/test.sh

This file was deleted.

Loading
Loading