Friday, October 28, 2016

Bluemix: How to Register Your Own Service Broker

Dashboard from Sample Service
In Cloud Foundry and hence in IBM Bluemix so-called service brokers manage the provisioning and removal of service instances. They provide the necessary metadata about the managed service to the catalog, so that users can find and request that service. Bluemix offers 100+ services in its catalog, but what if you want to add your own service? The answer is to register your own private broker and there are even two different kinds. Want to know how to do it? Then read on.



IBM Bluemix allows to run applications on Cloud Foundry. It comes in three flavors: Bluemix Public provides a shared cloud infrastructure whereas Bluemix Dedicated is a customer-specifc dedicated cloud. Lastly, Bluemix Local is a private cloud in the customer data center. The Bluemix service catalog is based on Cloud Foundry. Using brokers new services can be published to the Bluemix catalog and provisioned by users. Because of the Bluemix delivery model (Public/Dedicated/Local) the individual user privileges differ which may impact what kind of service brokers can be added to Bluemix.

Cloud Foundry distinguishes between Standard Private Brokers and Space-Scoped Private Brokers. The service offered by a space-scoped private broker is only visible in the space where the broker has been registered. On the plus side no special administrator privileges are needed to create such a broker.
For standard private brokers administrator privileges with write access to the catalog are needed. Once registered the service and its plans can be made available to all or only select organizations in the Bluemix instance. The standard private brokers are only available on Bluemix Dedicated and Bluemix Local.

I created a tutorial on GitHub to demonstrate how brokers can be registered and managed in Bluemix both as space-scoped and standard private broker. The repository contains a sample broker which can be easily deployed as Cloud Foundry app on Bluemix and then taken for the step-by-step instructions. Let me know if something is missing in the tutorial. And to at least answer how to register brokers, let me finish the blog entry with the commands... ;-)

cf create-service-broker yourBrokerName userID password URL4yourBroker --space-scoped

cf ba add-service-broker yourBrokerName userID password URL4yourBroker


(All commands and explanation are in the broker tutorial)