diff options
author | David Ansari <david.ansari@gmx.de> | 2022-07-04 13:45:59 +0000 |
---|---|---|
committer | David Ansari <david.ansari@gmx.de> | 2022-07-04 13:54:26 +0000 |
commit | b08ef4583e6ed434e0acedb698f6d6fb6de8f223 (patch) | |
tree | d8bfc42c0ce8267d42ad4656d1a72d96ce8d10c9 /BUILD.bazel | |
parent | 891046b6725e86ab3d9ec966240dfa57e683a970 (diff) | |
download | rabbitmq-server-git-b08ef4583e6ed434e0acedb698f6d6fb6de8f223.tar.gz |
Add Bazel targets start-cluster and stop-cluster
to have the equivalent of `make start-cluster` and `make stop-cluster`.
To create a 3-node RabbitMQ cluster:
```
bazel run --config=local start-cluster
```
To define number of nodes or a custom directory:
```
bazel run --config=local start-cluster NODES=5 TEST_TMPDIR="$HOME/scratch/myrabbit"
```
To stop the cluster:
```
bazel run --config=local stop-cluster
```
or, if started by the 2nd command:
```
bazel run --config=local stop-cluster NODES=5 TEST_TMPDIR="$HOME/scratch/myrabbit"
```
Diffstat (limited to 'BUILD.bazel')
-rw-r--r-- | BUILD.bazel | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/BUILD.bazel b/BUILD.bazel index b4fe4899cc..ea9dfe4c07 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -58,6 +58,22 @@ rabbitmq_run_command( subcommand = "run-broker", ) +# Allow us to `bazel run start-cluster` +# for the equivalent of `make start-cluster` +rabbitmq_run_command( + name = "start-cluster", + rabbitmq_run = ":rabbitmq-run", + subcommand = "start-cluster", +) + +# Allow us to `bazel run stop-cluster` +# for the equivalent of `make stop-cluster` +rabbitmq_run_command( + name = "stop-cluster", + rabbitmq_run = ":rabbitmq-run", + subcommand = "stop-cluster", +) + # `bazel run rabbitmqctl` rabbitmqctl( name = "rabbitmqctl", |