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
5 changes: 5 additions & 0 deletions docs/how-to/just-run-blueapi-and-services-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ Before starting, ensure you have followed the [Installation instructions](../tut
- `just repl`: will give you a repl with pre-configured and logged in client
- `just compose down`: tear down adjacent services

6. On the Diamond network you can also run the NeXus file converter, which writes NeXus files from the documents blueapi publishes to RabbitMQ:
- `just compose-diamond`: launch the services above plus the converter
- Written files appear in `/tmp/blueapi-nexus` on the host (override with `NEXUS_OUTPUT_DIR`)
- `just compose --profile diamond down`: tear down everything, including the converter

Channel Access

To log in through the BlueAPI CLI:
Expand Down
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ init-example-services:
compose +ARGS="up -d --no-recreate": init-example-services _check-runner
{{ RUNNER }} compose -f tests/system_tests/compose.yaml {{ ARGS }}

[doc('Bring up the example services plus the NeXus file converter (Diamond registry only)')]
compose-diamond: (compose "--profile diamond up -d --no-recreate")

[doc('Run the blueapi server with the system test config')]
serve *OPTS:
#!/usr/bin/env bash
Expand Down
21 changes: 21 additions & 0 deletions tests/system_tests/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,24 @@ services:
condition: service_healthy
security_opt:
- label=disable

# Internal Diamond registry so not pulled in CI, enable with `--profile diamond`
nexus:
profiles: [diamond]
image: gitlab.diamond.ac.uk:5050/daq/d2acq/services/nexus-file-converter:4.1.6
network_mode: host # Port 8084
environment:
- BEAMLINE=adsim
# Consume the start/descriptor/event/stop documents blueapi publishes
# on /topic/public.worker.event (amq.topic exchange)
- SPRING_PROFILES_ACTIVE=rabbitmq
- SPRING_RABBITMQ_HOST=localhost
volumes:
# numtracker's data_session_directory is /tmp/, expose written files on the host
- ${NEXUS_OUTPUT_DIR:-/tmp/blueapi-nexus}:/tmp
depends_on:
- rabbitmq
# rabbitmq has no healthcheck, retry until the broker accepts connections
restart: on-failure
security_opt:
- label=disable
Loading