-
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
Include convenience bash script for running rabbit mq locally #668
base: main
Are you sure you want to change the base?
Changes from 6 commits
81450e2
6dee4d9
45e7e3f
eb21429
3d6e1be
00518c1
bdf341f
5bc059a
cf25570
7227eea
023632f
75fcee8
cf06c77
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 |
---|---|---|
|
@@ -17,6 +17,12 @@ way to start it is to run it via a container: | |
podman run -it --rm --net host rmohr/activemq:5.15.9-alpine | ||
``` | ||
|
||
Alternatively, a script is available: | ||
Relm-Arrowny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
``` | ||
src/script/start_rabbitmq.sh | ||
``` | ||
|
||
## Start Worker | ||
|
||
To start the worker: | ||
|
@@ -31,6 +37,12 @@ The worker can also be started using a custom config file: | |
blueapi --config path/to/file serve | ||
``` | ||
|
||
An example of a config file that starts STOMP with default values can be found in: | ||
|
||
``` | ||
src/script/stomp_config.yml | ||
``` | ||
|
||
Comment on lines
+30
to
+35
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: As above with ActiveMQ vs RabbitMQ, if we're going to make rabbitMQ the default for new users then maybe this should be the default config? 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. It used to be, but I changed it. I think it's important for a complete beginner to clone -> build -> run with no extra steps, because once you add 1 extra step it's very easy to get into a "just one more..." mentality. The message bus is an optional feature that adds rich feedback and that we use in production, but configuring it is part 2 of the tutorial. |
||
## Test that the Worker is Running | ||
|
||
Blueapi comes with a CLI so that you can query and control the worker from the terminal. | ||
|
@@ -41,4 +53,6 @@ Blueapi comes with a CLI so that you can query and control the worker from the t | |
|
||
The above command should display all plans the worker is capable of running. | ||
|
||
|
||
|
||
See also [full cli reference](../reference/cli.md) |
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: If possible, I would like to use an image from dockerhub rather than build our own. Do we know of any that give us what we want (STOMP plugin etc.)? Paging @DiamondJoseph |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM rabbitmq:3.13.2-management | ||
RUN rabbitmq-plugins enable rabbitmq_stomp | ||
COPY rabbitmq.conf /etc/rabbitmq/rabbitmq.conf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
loopback_users = none | ||
listeners.tcp.default = 5672 | ||
default_pass = admin | ||
default_user = admin | ||
hipe_compile = false | ||
management.listener.port = 15672 | ||
management.listener.ssl = false | ||
stomp.listeners.tcp.1 = 61613 | ||
stomp.default_user = admin | ||
stomp.default_pass = admin |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
cmd1='build -t rabbitmq-stomp ./rabbitmq_setup/.' | ||
cmd2='run -p 5672:5672 -p 15672:15672 -p 61613:61613 rabbitmq-stomp' | ||
|
||
echo "Checking docker/podman installation" | ||
if command -v docker &> /dev/null; then | ||
docker $cmd1 | ||
docker $cmd2 | ||
elif command -v podman &> /dev/null; then | ||
podman $cmd1 | ||
podman $cmd2 | ||
else | ||
echo "Docker/Podman installation not found. Please install docker/podman." | ||
exit 1 | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
stomp: | ||
host: "localhost" | ||
port: "61613" | ||
Relm-Arrowny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
auth: | ||
username: "admin" | ||
password: "admin" |
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: Also remove this reference to activemq
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.
I have removed activemq reference, a couple of things I notice while doing so which are the side effects of removing the Stomp default:
blueapi controller run count '{"detectors": ["current_det", "image_det"]}
in the quickstart guide will not work unless we set the env with add env loading #649 or do
blueapi -c src/script/stomp_config.yml controller run count '{"detectors": ["current_det", "image_det"]}'
blueapi serve
will technically work but there will be half a page of warning ever 10 secs.