Extend Bluemix: Use a Service Broker to Bring Your Own Services

Share this post:

In Cloud Foundry and in IBM Bluemix, so-called service brokers manage the provisioning and removal of service instances. The Bluemix catalog lists those services. There you can browse, find and request services for use. The brokers provide the service metadata to the catalog. Metadata could be the service description, an icon, links to the service dashboard and the available service plans. In its catalog Bluemix already offers many services, but what if you want to add your own? Maybe you want to make your infrastructure, such as a database cluster or business-specific functionality available in the Bluemix catalog? The answer is to register your own private broker. Here is how to get started.

Dashboard of Sample Service, Registered via Broker

Service Dashboard of Sample Service

Bluemix Flavors

IBM Bluemix allows running applications on Cloud Foundry and comes in three flavors:

  1. Public: It provides a shared, multi-tenant cloud infrastructure
  2. Bluemix Dedicated is a private, single-tenant cloud in an IBM Cloud data center
  3. Lastly, Bluemix Local is delivered as a private cloud in a customer data center

Because of the Bluemix delivery model (Public/Dedicated/Local) the administration and individual user privileges differ. As a consequence it impacts what kind of service broker (yes, there are two) can be added to the Bluemix you are using.

Broker Types

Cloud Foundry distinguishes between Standard Private and Space-Scoped Private Brokers. The service offered by a space-scoped private broker is only visible in the space in which you registered the broker. You don’t need any special administrator privileges to create such a broker. Therefore it works well in Bluemix Public. In contrast, only administrators with write access to the catalog can register standard private brokers. Once such a broker is registered, the service and its plans can be made available to all or only specific organizations in the Bluemix Dedicated or Bluemix Local instance.

The commands to register a broker and make its service visible differ depending on the broker type. To get you started 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. The included README then takes you step-by-step through the registration. If you are already curious how the commands look, there is the syntax for the registration itself of a space-scoped and a standard private broker:

  • 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 found at


More How-tos stories

A predictive Machine Learning model from Build to Retrain

This post is an excerpt from our solution tutorial that walks you through the process of building a predictive machine learning model, deploying it as an API to be used in applications, testing the model and retraining the model with feedback data. All of this happening in an integrated and unified self-service experience on IBM Cloud.

Continue reading

How to organize users, teams and applications in IBM Cloud

Learn how to organize your project with multiple deployment environments

Continue reading

How to build a cloud native app in 30 minutes

I’m one of the IBM Cloud App Service architects and have been involved in leading the team in the engineering and delivery of this tool for accelerating development of cloud native apps. After giving an overview of app architecture and stating the game plan,  I’ll take you through video demos of creating two microservices and an iOS […]

Continue reading