<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<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">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-incubator/service-catalog/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.org/coprs/g/ansible-service-broker/ansible-service-broker-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>
+-----------------+-------------------+--------------------------------+<br>
dh-pyzip-demo-apb Python Zip Demo APB 0e991006d21029e47abe71acc255e807<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.externalName,externalID:spec.externalID,Broker:spec.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/ansibleplaybookbundle/ansible-playbook-bundle/blob/master/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.name</a><br>
> <<a href="http://metadata.name" rel="noreferrer" target="_blank">http://metadata.name</a>>,DISPLAYNAME:spec.externalMetadata.displayName<br>
> | grep APB<br>
><br>
> 2. Find out the selected APB's external name<br>
><br>
> oc get clusterserviceclasses e171fe1a84c3750a0957e7e917af9530 -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/ansibleplaybookbundle/postgresql-apb/blob/master/apb.yml</a><br>
> <<a href="https://github.com/ansibleplaybookbundle/postgresql-apb/blob/master/apb.yml" rel="noreferrer" target="_blank">https://github.com/ansibleplaybookbundle/postgresql-apb/blob/master/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>
> _______________________________________________<br>
> Ansible-service-broker mailing list<br>
> <a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-broker@redhat.com</a><br>
> <mailto:<a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-broker@redhat.com</a>><br>
> <a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/ansible-service-broker</a><br>
> <<a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/ansible-service-broker</a>><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Ansible-service-broker mailing list<br>
> <a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-broker@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/ansible-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>
_______________________________________________<br>
Ansible-service-broker mailing list<br>
<a href="mailto:Ansible-service-broker@redhat.com" target="_blank">Ansible-service-broker@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/ansible-service-broker" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/ansible-service-broker</a><br>
</blockquote></div></div></div>