[Ansible-service-broker] Instantiating APB with CLI

Siamak Sadeghianfar ssadeghi at redhat.com
Fri Mar 16 12:41:36 UTC 2018


Hi,

I have been trying to use oc to create services so that it can be automated
in Jenkins, etc. There is a flow that works but leaves quite a lot to be
desired. Is there a better way to do this with "oc new-app" similar to
images, imagestreams and templates?

Here is the flow:

1. List APBs

oc get clusterserviceclasses --all-namespaces -o custom-columns=NAME:.
metadata.name,DISPLAYNAME:spec.externalMetadata.displayName | grep APB

2. Find out the selected APB's external name

oc get clusterserviceclasses e171fe1a84c3750a0957e7e917af9530 -o yaml

3. Find the source of the APB (apb.yml) to figure out the parameter names
and plans e.g.
https://github.com/ansibleplaybookbundle/postgresql-apb/blob/master/apb.yml

4. Create a yml file for the serviceinstance, specifying values for
external apb name, params, plans, etc

5. Create the service instance using CLI
oc create -f postgresql-si.yml


Kind Regards,
Siamak Sadeghianfar
Principal Technical Marketing Manager
OpenShift, Red Hat Inc.
M: +46-73-183-5553 <+46%2073%20183%2055%2053> | T: @siamaks
redhat.com | TRIED. TESTED. TRUSTED.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ansible-service-broker/attachments/20180316/699fae6e/attachment.htm>


More information about the Ansible-service-broker mailing list