-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor utility script to allow for future services #707
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
rabbitmq: | ||
image: rabbitmq:management | ||
container_name: 'rabbitmq' | ||
ports: | ||
- 5672:5672 | ||
- 15672:15672 | ||
- 61613:61613 | ||
volumes: | ||
- ./rabbitmq_setup/enabled_plugins:/etc/rabbitmq/enabled_plugins |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,21 @@ Blueapi acts as a worker that can run bluesky plans against devices for a specif | |
laboratory setup. It can control devices to collect data and export events to tell | ||
downstream services about the data it has collected. | ||
|
||
## Start RabbitMQ | ||
## Start Services | ||
|
||
The worker requires a running instance of RabbitMQ. The easiest way to start it is | ||
to execute the provided script: | ||
The worker requires other infrastructure services running- these are captured in a [compose-spec](https://github.com/compose-spec/compose-spec/blob/main/spec.md) file: `.devcontainer/compose.yml`, and may later be started as part of building the devcontainer when [compatibility with podman is improved](https://github.com/devcontainers/cli/issues/863). | ||
|
||
To run the services: | ||
``` | ||
src/script/start_rabbitmq.sh | ||
# with docker | ||
docker compose -f .devcontainer/compose.yml up | ||
# or with podman-compose | ||
podman-compose -f .devcontainer/compose.yml up | ||
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should: Although we gave up on autostarting these services in the devcontainer, can we make |
||
``` | ||
|
||
This creates and configures: | ||
- RabbitMQ with the rabbitmq_stomp plugin exposed at localhost:61613 | ||
|
||
## Start Worker | ||
|
||
To start the worker: | ||
|
@@ -21,24 +27,26 @@ To start the worker: | |
blueapi serve | ||
``` | ||
|
||
The worker can also be started using a custom config file: | ||
The worker can also be started with additional configuration from file: | ||
|
||
``` | ||
blueapi --config path/to/file serve | ||
# or | ||
blueapi -c path/to/file serve | ||
``` | ||
|
||
An example of a config file that starts STOMP with default values can be found in: | ||
A config file compatible with the services in the compose-spec above is included alongside it: | ||
|
||
``` | ||
src/script/stomp_config.yml | ||
.devcontainer/config.yml | ||
``` | ||
|
||
## Test that the Worker is Running | ||
|
||
Blueapi comes with a CLI so that you can query and control the worker from the terminal. | ||
Blueapi comes with a CLI so that you can query and control the worker from the terminal, this should be passed the same config as the worker: | ||
|
||
``` | ||
blueapi controller plans | ||
blueapi [--config path/to/file] controller plans | ||
``` | ||
|
||
The above command should display all plans the worker is capable of running. | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should: To avoid me having to do another huge rebase, can we get #674 in first and then rebase to suit this (pleeease)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can address my comments ;P