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)

 

More How-tos Stories

Building financial insight starts with WealthEngine

The WealthEngine API lets you look up the net worth and financial capacity of almost anyone in the United States, in real time, giving you insight into the wallet share of clients and prospects. Simple to use, it's a restful API that returns JSON.

Continue reading

Kubernetes and Service Policies

While working with a client a few weeks ago, we defined a process and organizational governance model for managing Kubernetes clusters in a Bluemix PaaS environment. This blog will outline these best practices to deploy Kubernetes clusters in your environment and the importance of leveraging service policies.

Continue reading

Using Spring for REST on Liberty Buildpack

During a recent development sprint our team was investigating frameworks in place to support Social Login for a RESTful application. In our research, we found that the common social login areas we were looking at Twitter, Facebook and Google all provided solid documentation on how to integrate into an application.

Continue reading