Skip to content

mjavault/cf-rabbitmq-release

 
 

Repository files navigation

Cloud Foundry RabbitMQ Service

This repository contains the release for RabbitMQ for Cloud Foundry. It is deployable by BOSH in the usual way.

This release is now using BOSH v2 job links and cloud config and requires at least BOSH Director v255.5

Dependencies

  • bundler

  • phantomjs: In order to run the integration tests you need to have phantomjs available in the $PATH. phantomjs is required by capybara at runtime.

Updating

Clone the repository and run ./scripts/update-release to update submodules and install dependencies.

Deploying

Once you have a BOSH Lite up and running locally, run scripts/deploy-to-bosh-lite.

To deploy the release into BOSH you will need a deployment manifest. You can generate a deployment manifest using the following command:

alias boshgo=bosh # This is just to make pcf-rabbitmq tile team's life simpler
boshgo interpolate \
  --vars-file=manifests/lite-vars-file.yml \
  --var=director-uuid=$(bosh status --uuid) \
  manifests/cf-rabbitmq-server-only-template.yml > manifests/cf-rabbitmq.yml

Testing

To run all the tests do bundle exec rake spec.

Unit Tests

To run only unit tests locally, run: bundle exec rake spec:unit.

Embedded Release Tests

Sometimes testing BOSH releases can lead to writing many tests at the top of the test pyramid, which can increase the feedback loop. Also when tests fail the analysis can become complicated since there are many components working together. Embedded release tests are jobs that we deploy in a colocated way so that we can execute tests within a deployment, inside a VM. The goal is to pull tests down the test pyramid trying to shorten the feedback loop and bring the tests closer to the code.

To execute embedded release tests you need to colocate the tests within the release being tested and deploy. The deployment should fail if the tests fail.

boshgo interpolate \
  --ops-file=manifests/add-rmq-server-tests.yml \
  --vars-file=manifests/lite-vars-file.yml \
  --var=director-uuid=$(bosh status --uuid) \
  manifests/cf-rabbitmq-server-only-template.yml > manifests/cf-rabbitmq.yml
bosh deployment manifests/cf-rabbitmq.yml
bosh deploy

Integration Tests

Integration tests require this release to be deployed into a BOSH director (see Deploying section above).

To run integration tests do bundle exec rake spec:integration.

Use SKIP_SYSLOG=true bundle exec rake spec:integration to skip syslog tests if you don't have PAPERTRAIL_TOKEN and PAPERTRAIL_GROUP_ID environment variables configured.

For testing with syslog, remove the SKIP_SYSLOG environment variable from the command line and generate and deploy a new manifest with syslog:

boshgo interpolate \
  --ops-file=manifests/add-syslog-release.yml \
  --vars-file=manifests/lite-vars-file.yml \
  --var=director-uuid=$(bosh status --uuid) \
  manifests/cf-rabbitmq-server-only-template.yml > manifests/cf-rabbitmq.yml

System Tests

System tests require this release to be deployed colocated within the multitenant-broker release.

Ensure you have deployed the release to BOSH Lite (see Deploying section above).

Use the bosh command below to create a manifest with cf-rabbitmq and multitenant-broker.

boshgo interpolate \
  --vars-file=manifests/lite-vars-file.yml \
  --vars-file=manifests/lite-multitenant-broker-vars-file.yml \
  --var=director-uuid=$(bosh status --uuid) \
  manifests/cf-rabbitmq-colocated-with-multitenant-broker-template.yml > manifests/cf-rabbitmq.yml

To run the system tests do bundle exec rake spec:system

If you want to run tests on custom BOSH you need to set following environment variables:

Documentation

About

A BOSH Release of RabbitMQ for Cloud Foundry

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 51.3%
  • Shell 46.4%
  • HTML 2.3%