[Ansible-service-broker] Instantiating APB with CLI

Ryan Hallisey rhallise at redhat.com
Thu Mar 22 16:05:44 UTC 2018


It's something that's been brought up in the past Siamak.  We are planning
a large refactoring of the apb tool that should make it more compatible
with the oc client. After that, we should have an easier time bringing this
up with the client folks and potentially merging this in oc client. Thanks
for your perspective on this.

- Ryan

On Thu, Mar 22, 2018 at 11:32 AM, Siamak Sadeghianfar <ssadeghi at redhat.com>
wrote:

> Jason,
>
> svcat helps but it means that users now have to download two different
> CLIs to create apps on OpenShift. To me as a user it makes no difference
> that one thing comes from the service catalog and the other from a
> template. I just need to create for example a MySQL pod which doesn't seem
> to be possible via OpenShift CLI if the service is provisioned via the
> service catalog.
>
> Kind Regards,
> Siamak
>
>
> On Fri, Mar 16, 2018 at 3:03 PM Jason Montleon <jmontleo at redhat.com>
> wrote:
>
>> svcat is friendlier output if you want to build it from source:
>> https://github.com/kubernetes-incubator/service-catalog/
>> tree/master/cmd/svcat
>>
>> Or if you're on EL7 or Fedora 26/27 I've created an rpm until official
>> ones come along. This page has instructions for setting up the repo.
>>
>> https://copr.fedorainfracloud.org/coprs/g/ansible-service-
>> broker/ansible-service-broker-latest/
>>
>>  From there yum or dnf install svcat
>> I've played spacing for sake of clarity in email but output is roughly:
>> $ svcat get classes
>>          NAME          DESCRIPTION                   UUID
>> +-----------------+-------------------+--------------------------------+
>>   dh-pyzip-demo-apb Python Zip Demo APB 0e991006d21029e47abe71acc255e807
>>   ...
>>
>> On 03/16/2018 09:38 AM, Ryan Hallisey wrote:
>> > Hey Siamak,
>> >
>> > In the apb tool, there's the command ```apb serviceinstance```. It will
>> > generate 'most' of a serviceinstance template.  You will still need to
>> > lookup the external name, so I recommend using ```oc get
>> > clusterserviceclass -o
>> > custom-columns=Name:spec.externalName,externalID:spec.
>> externalID,Broker:spec.clusterServiceBrokerName```.
>> >
>> > The 'serviceinstance' command
>> > <https://github.com/ansibleplaybookbundle/ansible-
>> playbook-bundle/blob/master/src/apb/engine.py#L1235>
>> > has a lot of potential improvement, so if you have anything you want to
>> > contribute feel free to!
>> >
>> > Thanks,
>> > -Ryan
>> >
>> > On Fri, Mar 16, 2018 at 8:41 AM, Siamak Sadeghianfar
>> > <ssadeghi at redhat.com <mailto:ssadeghi at redhat.com>> wrote:
>> >
>> >     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
>> >     <http://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
>> >     <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>
>> <tel:+46%2073%20183%2055%2053> | T: @siamaks
>> >     redhat.com <http://redhat.com> | TRIED. TESTED. TRUSTED.
>> >
>> >
>> >
>> >
>> >     _______________________________________________
>> >     Ansible-service-broker mailing list
>> >     Ansible-service-broker at redhat.com
>> >     <mailto:Ansible-service-broker at redhat.com>
>> >     https://www.redhat.com/mailman/listinfo/ansible-service-broker
>> >     <https://www.redhat.com/mailman/listinfo/ansible-service-broker>
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Ansible-service-broker mailing list
>> > Ansible-service-broker at redhat.com
>> > https://www.redhat.com/mailman/listinfo/ansible-service-broker
>> >
>>
>> --
>> Jason Montleon     | email: jmontleo at redhat.com
>> Software Engineer  | gpg key: 0x069E3022
>> Red Hat, Inc.      | irc: jmontleo
>> desk: 978-392-3930 <(978)%20392-3930> | cell: 508-496-0663
>> <(508)%20496-0663>
>>
>> _______________________________________________
>> Ansible-service-broker mailing list
>> Ansible-service-broker at redhat.com
>> https://www.redhat.com/mailman/listinfo/ansible-service-broker
>>
>
> _______________________________________________
> Ansible-service-broker mailing list
> Ansible-service-broker at redhat.com
> https://www.redhat.com/mailman/listinfo/ansible-service-broker
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ansible-service-broker/attachments/20180322/f2fae114/attachment.htm>


More information about the Ansible-service-broker mailing list