Enabling BOSH DNS in your RabbitMQ On Demand Service Instances
search cancel

Enabling BOSH DNS in your RabbitMQ On Demand Service Instances

book

Article ID: 293256

calendar_today

Updated On:

Products

VMware RabbitMQ

Issue/Introduction

RabbitMQ for TAS Tile recommends/requires BOSH DNS to be enabled when installed. For some reason, if you find yourself installing RabbitMQ or TAS without BOSH DNS enabled, this article discuss how to enable BOSH DNS on RabbitMQ for TAS and what the impact is once BOSH DNS is enabled on your on-demand Service instances. 

Starting PCF 2.0 BOSH DNS is enabled by default.

Environment

Product Version: 1.21

Resolution

To enable BOSH DNS on your RabbitMQ for TAS tile, run the following:

bosh -d <p-rabbitmq-deployment> manifest > rabbit_for_tas_manifest.yaml


Make a backup of the manifest in case you ran into issues, you can revert to the original manifest later on:

cp  rabbit_for_tas_manifest.yaml rabbit_for_tas_manifest_backup.yaml


Edit the manifest and add binding_with_dns section, see the example below. For more info, please refer to our doc for Using BOSH DNS Addresses for Bindings.

metadata:
  display_name: RabbitMQ On-Demand
  ...
  plans:
  - binding_with_dns:
    - instance_group: rabbitmq-server
      link_provider: rabbitmq-server     
      name: rabbitmq-server


Then deploy using the following command:

bosh -d <p-rabbitmq-deployment> deploy rabbit_for_tas_manifest.yaml


After deploying the manifest, please ensure that you run the errand below:

upgrade-all-service-instance errands

 
All service instance will be updated with the new changes. If you have a client application that is bounded to a RabbitMQ on-demand instance, it will contain IP addresses such as hostname under VCAP_SERVICES. If BOSH ENABLED is enabled, your environment variable on VCAP_SERVICES will still use IP addresses, meaning it will remain unchanged. This is okay as long as the service instances' IPs don't change, but it is recommended for client apps to rebind.

cf unbind-service <app> <rmq-service-instance>


Then, run the following command:

cf bind-service <app> <rmq-service-instance>

 
The hostname under VCAP_SERVICES will be changed from IP address to hostnames.

Note: You need to cf restage after rebinding RabbitMQ service instances.