<div dir="ltr"><div>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.<br><br></div>- Ryan<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 22, 2018 at 11:32 AM, Siamak Sadeghianfar <span dir="ltr"><<a href="mailto:ssadeghi@redhat.com" target="_blank">ssadeghi@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Jason,<div><br></div><div>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.</div><div><br></div><div>Kind Regards,</div><div>Siamak<div><div class="h5"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 16, 2018 at 3:03 PM Jason Montleon <<a href="mailto:jmontleo@redhat.com" target="_blank">jmontleo@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">svcat is friendlier output if you want to build it from source:<br>
<a href="https://github.com/kubernetes-incubator/service-catalog/tree/master/cmd/svcat" rel="noreferrer" target="_blank">https://github.com/kubernetes-<wbr>incubator/service-catalog/<wbr>tree/master/cmd/svcat</a><br>
<br>
Or if you're on EL7 or Fedora 26/27 I've created an rpm until official<br>
ones come along. This page has instructions for setting up the repo.<br>
<br>
<a href="https://copr.fedorainfracloud.org/coprs/g/ansible-service-broker/ansible-service-broker-latest/" rel="noreferrer" target="_blank">https://copr.fedorainfracloud.<wbr>org/coprs/g/ansible-service-<wbr>broker/ansible-service-broker-<wbr>latest/</a><br>
<br>
 From there yum or dnf install svcat<br>
I've played spacing for sake of clarity in email but output is roughly:<br>
$ svcat get classes<br>
         NAME          DESCRIPTION                   UUID<br>
+-----------------+-----------<wbr>--------+---------------------<wbr>-----------+<br>
  dh-pyzip-demo-apb Python Zip Demo APB 0e991006d21029e47abe71acc255e8<wbr>07<br>
  ...<br>
<br>
On 03/16/2018 09:38 AM, Ryan Hallisey wrote:<br>
> Hey Siamak,<br>
><br>
> In the apb tool, there's the command ```apb serviceinstance```. It will<br>
> generate 'most' of a serviceinstance template.  You will still need to<br>
> lookup the external name, so I recommend using ```oc get<br>
> clusterserviceclass -o<br>
> custom-columns=Name:spec.<wbr>externalName,externalID:spec.<wbr>externalID,Broker:spec.<wbr>clusterServiceBrokerName```.<br>
><br>
> The 'serviceinstance' command<br>
> <<a href="https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/blob/master/src/apb/engine.py#L1235" rel="noreferrer" target="_blank">https://github.com/<wbr>ansibleplaybookbundle/ansible-<wbr>playbook-bundle/blob/master/<wbr>src/apb/engine.py#L1235</a>><br>
> has a lot of potential improvement, so if you have anything you want to<br>
> contribute feel free to!<br>
><br>
> Thanks,<br>
> -Ryan<br>
><br>
> On Fri, Mar 16, 2018 at 8:41 AM, Siamak Sadeghianfar<br>
> <<a href="mailto:ssadeghi@redhat.com" target="_blank">ssadeghi@redhat.com</a> <mailto:<a href="mailto:ssadeghi@redhat.com" target="_blank">ssadeghi@redhat.com</a>>> wrote:<br>
><br>
>     Hi,<br>
><br>
>     I have been trying to use oc to create services so that it can be<br>
>     automated in Jenkins, etc. There is a flow that works but leaves<br>
>     quite a lot to be desired. Is there a better way to do this with "oc<br>
>     new-app" similar to images, imagestreams and templates?<br>
><br>
>     Here is the flow:<br>
><br>
>     1. List APBs<br>
><br>
>     oc get clusterserviceclasses --all-namespaces -o<br>
>     custom-columns=NAME:.<a href="http://metadata.name" rel="noreferrer" target="_blank">metadata<wbr>.name</a><br>
>     <<a href="http://metadata.name" rel="noreferrer" target="_blank">http://metadata.name</a>>,<wbr>DISPLAYNAME:spec.<wbr>externalMetadata.displayName<br>
>     | grep APB<br>
><br>
>     2. Find out the selected APB's external name<br>
><br>
>     oc get clusterserviceclasses e171fe1a84c3750a0957e7e917af95<wbr>30 -o yaml<br>
><br>
>     3. Find the source of the APB (apb.yml) to figure out the parameter<br>
>     names and plans e.g.<br>
>     <a href="https://github.com/ansibleplaybookbundle/postgresql-apb/blob/master/apb.yml" rel="noreferrer" target="_blank">https://github.com/<wbr>ansibleplaybookbundle/<wbr>postgresql-apb/blob/master/<wbr>apb.yml</a><br>
>     <<a href="https://github.com/ansibleplaybookbundle/postgresql-apb/blob/master/apb.yml" rel="noreferrer" target="_blank">https://github.com/<wbr>ansibleplaybookbundle/<wbr>postgresql-apb/blob/master/<wbr>apb.yml</a>><br>
><br>
>     4. Create a yml file for the serviceinstance, specifying values for<br>
>     external apb name, params, plans, etc<br>
><br>
>     5. Create the service instance using CLI<br>
>     oc create -f postgresql-si.yml<br>
><br>
><br>
>     Kind Regards,<br>
>     Siamak Sadeghianfar<br>
>     Principal Technical Marketing Manager<br>
>     OpenShift, Red Hat Inc.<br>
>     M: <a href="tel:+46%2073%20183%2055%2053" value="+46731835553" target="_blank">+46-73-183-5553</a> <tel:+46%2073%20183%2055%2053> | T: @siamaks<br>
>     <a href="http://redhat.com" rel="noreferrer" target="_blank">redhat.com</a> <<a href="http://redhat.com" rel="noreferrer" target="_blank">http://redhat.com</a>> | TRIED. TESTED. TRUSTED.<br>
><br>
><br>
><br>
><br>
>     _____________________________<wbr>__________________<br>
>     Ansible-service-broker mailing list<br>
>     <a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-broker@<wbr>redhat.com</a><br>
>     <mailto:<a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-<wbr>broker@redhat.com</a>><br>
>     <a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/ansible-<wbr>service-broker</a><br>
>     <<a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/ansible-<wbr>service-broker</a>><br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Ansible-service-broker mailing list<br>
> <a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-broker@redhat.<wbr>com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/ansible-<wbr>service-broker</a><br>
><br>
<br>
--<br>
Jason Montleon     | email: <a href="mailto:jmontleo@redhat.com" target="_blank">jmontleo@redhat.com</a><br>
Software Engineer  | gpg key: 0x069E3022<br>
Red Hat, Inc.      | irc: jmontleo<br>
desk: <a href="tel:(978)%20392-3930" value="+19783923930" target="_blank">978-392-3930</a> | cell: <a href="tel:(508)%20496-0663" value="+15084960663" target="_blank">508-496-0663</a><br>
<br>
______________________________<wbr>_________________<br>
Ansible-service-broker mailing list<br>
<a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-broker@redhat.<wbr>com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/ansible-<wbr>service-broker</a><br>
</blockquote></div></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Ansible-service-broker mailing list<br>
<a href="mailto:Ansible-service-broker@redhat.com">Ansible-service-broker@redhat.<wbr>com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/ansible-<wbr>service-broker</a><br>
<br></blockquote></div><br></div>