How-tos

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 https://github.com/IBM-Bluemix/Bluemix-ServiceBroker)

 

Technical Offering Manager

More How-tos stories
October 15, 2018

Add Custom Domain and TLS Certificate to Your Secure Cloud App

Secure your cloud app end to end. Use a custom domain with TLS certificate for apps deployed on IBM Cloud Kubernetes Service.

Continue reading

October 12, 2018

Cloud Functions Package Design and Best Practices

Whether they're JARs, libs, Gems, or modules, successful programming languages provide an ability to share and re-use code. IBM Cloud Functions is no different—it enables developer productivity through installable packages. But what makes a good package?

Continue reading

October 5, 2018

Deploying a Microservices-Based Solution to Cloud Foundry Enterprise Environment (CFEE)

With Cloud Foundry Enterprise Environment (CFEE), you can instantiate multiple, isolated, enterprise-grade Cloud Foundry platforms on demand. Instances of the CFEE service run within your own account in IBM Cloud.

Continue reading