Getting started with Ansible Playbook Bundles on CDK

Install Ansible Service Broker addon into your CDK installation

Start your CDK environment with registration (important as yum get’s used during addon installation)
minishift start --service-catalog
Clone the addon repository and install Ansible Service Broker addon:
git clone
cd minishift-addons/add-ons/
minishift addon install ansible-service-broker
minishift addon apply ansible-service-broker
When logging in to your CDK console you should already see the preinstalled APB’s:

Install the ABP command line on your client machine

Configure your shell to use the minishift Docker daemon
eval $(minishift docker-env)
Fetch the APB command line script and make it available in your PATH
wget && mv apb && chmod +x apb
Verify that your installation works
apb --help
If everything went well you should see something like this:

Test the connection between ABP CLI and CDK

You will need special permissions to work with the broker on your CDK installation. Therefore we need to execute the following:
oc adm policy add-cluster-role-to-user cluster-admin developer
oc login -u developer
Now let’s see if we can list the preinstalled APB’s:
apb list

Configure Ansible Service Broker to pull images from local registry

In the default config of our Ansible Service Broker the APB’s are pulled from “”. We need to change this to our local registry running within CDK.
 - type: local_openshift
 name: lo
 - openshift
 - ".*-apb$"
The Ansible Service Broker pod now needs to be restarted in order to pull in the new configuration.

Create your first APB

Firstly we use the CLI to scaffold our new service:
apb init sample-service-apb
cd sample-service-apb
Now we locally build our APB. After the process has completed, the newly build APB docker image should appear in your local docker registry:
apb build
Finally we need to push the Docker image to our Service Broker inside CDK:
apb push
Now you should be able to see your first APB in your CDK’s service catalog.

Reference Information

Ansible Playbook Documentation Getting started with APB development Minishift Addon – Ansible Service Broker

1 thought on “Getting started with Ansible Playbook Bundles on CDK

Leave a Comment

%d bloggers like this: