A generic BOSH release for registering service brokers

There are a lot of CloudFoundry services + service brokers available as BOSH releases. Many of those have errands for registering the service broker with CloudFoundry. Unfortunately some of them don’t, and some organizations might have version restrictions on the services that leave the broker-registrar errand slightly out of reach.

This is where broker-registrar-boshrelease comes to the rescue! It’s a standalone BOSH release, providing the broker-registrar + broker-deregistrar jobs. This means you can colocate it on other BOSH deployments and update it as needed, without introducing any service-affecting changes to your existing BOSH deployments.

To add it to your existing deployments, just add this snippet to the releases: key in your BOSH manifest:

releases:
# other stuff is likely here
- name: broker-registrar-boshrelease
  version: 1

And this snippet to your jobs: key:

jobs:
# other stuff is likely here
- name: broker-registrar
  lifecycle: errand
  instances: 1
  resource_pool: small_z1
  networks: (( param "set the errand network configs here" ))
  templates:
  - name: broker-registrar
    release: broker-registrar
- name: broker-deregistrar
  lifecycle: errand
  instances: 1
  resource_pool: small_z1
  networks: (( param "set the errand network configs here" ))
  templates:
  - name: broker-deregistrar
    release: broker-registrar

And this snippet to your properties: key (if not already there):

properties:
  # other things are likely here too
  cf:
    admin_username: (( param "CF Admin Username" ))
    admin_password: (( param "CF Admin Password" ))
    api_url: (( param "CF API URL" ))
  broker:
    name: (( param "Broker name (registered with CF)" ))
    host: (( param "hostname/ip of broker node" ))
    port: 443 # or maybe 80?
    protocol: https # or maybe http?
    username: (( param "broker API username" ))
    password: (( param "broker API password" ))

Lastly, bosh upload the release (you can grab it from bosh.io), and bosh deploy the new manifest.

To register the broker, simply bosh run errand broker-registrar. If you want to forcibly delete the broker, all of its service offerings, and their service instances (a SUPER destructive task), you can bosh run errand broker-deregistrar… Just make sure that’s really what you wanted to do first!

Spread the word

twitter icon facebook icon linkedin icon