CONTRIBUTING.md in bunny-2.6.4 vs CONTRIBUTING.md in bunny-2.6.5

- old
+ new

@@ -22,45 +22,58 @@ ``` RABBITMQ_NODENAME=bunny RABBITMQ_CONFIG_FILE=./spec/config/rabbitmq RABBITMQ_ENABLED_PLUGINS_FILE=./spec/config/enabled_plugins rabbitmq-server ``` -The specs use the RabbitMQ management plugin and require a TLS port to be available. The config files in the spec/config directory enable these. +The specs use the RabbitMQ management plugin and require a TLS port to +be available. The config files in the spec/config directory enable +these. TLS (x509 PEM) certificates include a hostname-specific fields, +the tests allow for expecting hostname overriding using the `BUNNY_RABBITMQ_HOSTNAME` +environment variables (default value is `127.0.0.1`). +Server, CA and client certificates can be found under `spec/tls`. They are supposed to be +generated with [tls-gen](github.com/michaelklishin/tls-gen) or similar in the target environment. + Next up you'll need to prepare your node for the specs (just once): ``` RABBITMQ_NODENAME=bunny ./bin/ci/before_build ``` +The script uses `rabbitmqctl` and `rabbitmq-plugins` +to set up RabbitMQ in a way that Bunny test suites expect. Two environment variables, +`RABBITMQCTL` and `RABBITMQ_PLUGINS`, are available to control what `rabbitmqctl` and +`rabbitmq-plugins` commands will be used. By default they are taken from `PATH` +and prefixed with `sudo`. + And then run the core integration suite: ``` RABBITMQ_NODENAME=bunny CI=true rspec ``` #### Running a RabbitMQ server in a Docker container -First off you have to [install Docker](https://docs.docker.com/engine/installation/) (>= 1.9). +First off you have to [install Docker Compose](https://docker.github.io/compose/install/) (and by proxy Docker). +Version >= 1.6.0+ is required for compose version 2 syntax. -After Docker has been installed (and the `docker` command is available on your command line path), run +After those have been installed (and the `docker-compose` command is available on your command line path), run - ./bin/ci/start_rabbitmq +``` +docker-compose up +``` The first time you do this, it will take some time, since it has to download everything it needs to build the Docker image. The RabbitMQ server will run in the foreground in the terminal where you started it. You can stop -it by pressing CTRL+C. +it by pressing CTRL+C. If you want to run it in the background, run `docker-compose up -d`. ### Running Test Suites -Prior to running the tests, configure the RabbitMQ permissions -by running `./bin/ci/before_build`. The script uses `rabbitmqctl` and `rabbitmq-plugins` -to set up RabbitMQ in a way that Bunny test suites expect. Two environment variables, -`RABBITMQCTL` and `RABBITMQ_PLUGINS`, are available to control what `rabbitmqctl` and -`rabbitmq-plugins` commands will be used. By default they are taken from `PATH` -and prefixed with `sudo`. +Prior to running the tests, configure the RabbitMQ permissions by running `./bin/ci/before_build` +if you have RabbitMQ locally installed, if you are running RabbitMQ via Docker as above this step +is not required as the setup is baked in. Make sure you have those two installed and then run integration tests: bundle install rake integration