Skip to content

Commit 0328d87

Browse files
Update CONTRIBUTING.md for main/4.1.x
1 parent 7a71b5e commit 0328d87

File tree

1 file changed

+79
-5
lines changed

1 file changed

+79
-5
lines changed

CONTRIBUTING.md

Lines changed: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,102 @@ Pull requests is the primary place of discussing code changes.
77

88
The process is fairly standard:
99

10+
* Present your idea to the RabbitMQ core team using [GitHub Discussions](https://github.com/rabbitmq/rabbitmq-server/discussions) or [RabbitMQ community Discord server](https://rabbitmq.com/discord)
1011
* Fork the repository or repositories you plan on contributing to
11-
* Run `bazel sync` if you plan to [use Bazel](https://github.com/rabbitmq/contribute/wiki/Bazel-and-BuildBuddy), or `make`
12+
* Run `gmake`
1213
* Create a branch with a descriptive name in the relevant repositories
1314
* Make your changes, run tests, ensure correct code formatting, commit with a [descriptive message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), push to your fork
1415
* Submit pull requests with an explanation what has been changed and **why**
1516
* Submit a filled out and signed [Contributor Agreement](https://cla.pivotal.io/) if needed (see below)
1617
* Be patient. We will get to your pull request eventually
1718

18-
If what you are going to work on is a substantial change, please first ask the core team
19-
of their opinion on [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users).
2019

2120
## Running Tests
2221

23-
See [this guide on how to use Bazel and BuildBuddy for RabbitMQ core development](https://github.com/rabbitmq/contribute/wiki/Bazel-and-BuildBuddy).
22+
Test suites of individual subprojects can be run from the subproject directory under
23+
`deps/*`. For example, for the core broker:
24+
25+
``` shell
26+
# Running all server suites in parallel will take between 30 and 40 minutes on reasonably
27+
# recent multi-core machines. This is rarely necessary in development environments.
28+
# Running individual test suites or groups of test suites can be enough.
29+
#
30+
31+
# Before you start: this will terminate all running nodes, make processes and Common Test processes
32+
killall -9 beam.smp; killall -9 erl; killall -9 make; killall -9 epmd; killall -9 erl_setup_child; killall -9 ct_run
33+
34+
# the core broker subproject
35+
cd deps/rabbit
36+
37+
# cleans build artifacts
38+
gmake clean; gmake distclean
39+
40+
# builds the broker and all of its dependencies
41+
gmake
42+
# runs an integration test suite, tests/rabbit_fifo_SUITE with CT (Common Test)
43+
gmake ct-rabbit_fifo
44+
# runs an integration test suite, tests/quorum_queue_SUITE with CT (Common Test)
45+
gmake ct-quorum_queue
46+
# runs an integration test suite, tests/quorum_queue_SUITE with CT (Common Test)
47+
gmake ct-queue_parallel
48+
# runs a unit test suite tests/unit_log_management_SUITE with CT (Common Test)
49+
gmake ct-unit_log_management
50+
```
51+
52+
## Running Single Nodes from Source
53+
54+
``` shell
55+
# starts a node with the management plugin enabled
56+
gmake run-broker RABBITMQ_PLUGINS=rabbitmq_management
57+
```
58+
59+
The nodes will be started in the background. They will use `rabbit@{hostname}` for its name, so CLI will be able to contact
60+
it without an explicit `-n` (`--node`) argument.
61+
62+
## Running Clusters from Source
63+
64+
``` shell
65+
# starts a three node cluster with the management plugin enabled
66+
gmake start-cluster NODES=3 RABBITMQ_PLUGINS=rabbitmq_management
67+
```
68+
69+
The node will use `rabbit-{n}@{hostname}` for names, so CLI must
70+
be explicitly given explicit an `-n` (`--node`) argument in order to
71+
contact one of the nodes:
72+
73+
* `rabbit-1`
74+
* `rabbit-2`
75+
* `rabbit-3`
76+
77+
The names of the nodes can be looked up via
78+
79+
``` shell
80+
epmd -names
81+
```
82+
83+
``` shell
84+
# makes CLI tools talk to node rabbit-2
85+
rabbitmq-diagnostics cluster_status -n rabbit-2
86+
87+
# makes CLI tools talk to node rabbit-1
88+
rabbitmq-diagnostics status -n rabbit-1
89+
```
90+
91+
To stop a previously started cluster:
92+
93+
``` shell
94+
# stops a three node cluster started earlier
95+
gmake stop-cluster NODES=3
96+
```
2497

2598

2699
## Working on Management UI with BrowserSync
27100

28101
When working on management UI code, besides starting the node with
29102

30103
``` shell
31-
bazel run broker RABBITMQ_ENABLED_PLUGINS=rabbitmq_management
104+
# starts a node with the management plugin enabled
105+
gmake run-broker RABBITMQ_PLUGINS=rabbitmq_management
32106
```
33107

34108
(or any other set of plugins), it is highly recommended to use [BrowserSync](https://browsersync.io/#install)

0 commit comments

Comments
 (0)