Community

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

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)

 

Share this post:

Share on LinkedIn

Add Comment
No Comments

Leave a Reply

Your email address will not be published.Required fields are marked *

More Community Stories

What’s new in Bluemix for Mobile Developers

Earlier this week the Bluemix and MobileFirst teams released updated offerings for building mobile apps that leverage the awesome power of IBM Bluemix. Sometimes it’s easy to miss things or get lost in the details, so let’s take a look at some of the notable changes for developers.

Deploy a Hello World PHP Application to Zend Server on IBM Bluemix

Having covered how to deploy a trivial Node.js application to IBM Bluemix, this post goes deeper into features available for creating reusable manifest.yml files and covers Cloud Foundry buildpacks used during deployment. By the end of the post you will have deployed a trivial Hello World application written in PHP to a Zend Server's PHP container running on IBM Bluemix.

Application Security on Cloud for Bluemix

You probably believe your application might be the next big thing. You may be right! Before you embark on your trail to success, I want to share with you one important fact: Applications that are popular quickly become a target for hackers. It doesn’t matter if you are writing a small gaming mobile app or a big web application to serve financial institutes, if people are using your application and you don’t protect it well, your application, your data and your users may become a hacker’s next prey. Thanks to the new Application Security on Cloud for Bluemix, you can protect your application from the most commonly used attacks without needing to be a security expert.