Re: Creating from a template: get parameters from a file

2016-06-25 Thread Clayton Coleman
Let's get an issue opened and we'll do a sweep (to stop using string slice)
for any opaque values.

On Jun 25, 2016, at 5:24 PM, Ben Parees  wrote:



On Fri, Jun 24, 2016 at 7:53 PM, Clayton Coleman 
wrote:

> If new-app -p is splitting on comma we need to fix that.  I'm willing to
> break backwards compatibility on new-app because this is a functionality
> blocker.  Process will be there for people who need the more complex flow.
>

​near as i can tell, pflag appears to be doing the splitting.  looks like
anything that's a StringSlice arg type has that behavior built in:
https://github.com/spf13/pflag/blob/master/string_slice.go#L52

so we probably have this behavior all over the place, unless someone has
already created our own version of StringSlice that doesn't do this?


​


>
> On Thu, Jun 23, 2016 at 3:54 PM, Luke Meyer  wrote:
>
>> `oc process -v` and `oc new-app -p` work exactly the same, both being
>> implemented the same. You can specify multiple of either. I thought there
>> was supposed to be a way to escape commas but I can't find it now.
>>
>> FWIW you can specify newlines - anything, really, except a comma - in
>> parameters.
>>
>> However, have you considered using a Secret or ConfigMap to supply the
>> parameters? It's easy to put strings and files in those with oc create
>> secret|configmap. If they're only needed at runtime, not for the actual
>> template, that seems simplest.
>>
>> On Fri, Jun 17, 2016 at 6:07 PM, Clayton Coleman 
>> wrote:
>>
>>> The -v flag needs to be fixed for sure (splitting flag values is bad).
>>>
>>> New-app should support both -f FILE and -p (which you can specify
>>> multiple -p, one for each param).
>>>
>>> Do you have any templates that require new lines?
>>>
>>> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>>>
>>> I need to create services from a template that has a lot of parameters.
>>> In addition to having a lot of parameters, it has parameters with values
>>> containing commas, which does not play well with the -v flag for oc
>>> process.  Is there any way to make oc process get the parameter values from
>>> a file?  I'm currently tediously copy/pasting the values into the web UI,
>>> which is not a good solution.
>>>
>>> --
>>>
>>> Alex Wauck // DevOps Engineer
>>> *E X O S I T E*
>>> *www.exosite.com *
>>> Making Machines More Human.
>>>
>>> ___
>>> users mailing list
>>> users@lists.openshift.redhat.com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>> ___
>>> users mailing list
>>> users@lists.openshift.redhat.com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>


-- 
Ben Parees | OpenShift
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-25 Thread Ben Parees
On Fri, Jun 24, 2016 at 7:53 PM, Clayton Coleman 
wrote:

> If new-app -p is splitting on comma we need to fix that.  I'm willing to
> break backwards compatibility on new-app because this is a functionality
> blocker.  Process will be there for people who need the more complex flow.
>

​near as i can tell, pflag appears to be doing the splitting.  looks like
anything that's a StringSlice arg type has that behavior built in:
https://github.com/spf13/pflag/blob/master/string_slice.go#L52

so we probably have this behavior all over the place, unless someone has
already created our own version of StringSlice that doesn't do this?


​


>
> On Thu, Jun 23, 2016 at 3:54 PM, Luke Meyer  wrote:
>
>> `oc process -v` and `oc new-app -p` work exactly the same, both being
>> implemented the same. You can specify multiple of either. I thought there
>> was supposed to be a way to escape commas but I can't find it now.
>>
>> FWIW you can specify newlines - anything, really, except a comma - in
>> parameters.
>>
>> However, have you considered using a Secret or ConfigMap to supply the
>> parameters? It's easy to put strings and files in those with oc create
>> secret|configmap. If they're only needed at runtime, not for the actual
>> template, that seems simplest.
>>
>> On Fri, Jun 17, 2016 at 6:07 PM, Clayton Coleman 
>> wrote:
>>
>>> The -v flag needs to be fixed for sure (splitting flag values is bad).
>>>
>>> New-app should support both -f FILE and -p (which you can specify
>>> multiple -p, one for each param).
>>>
>>> Do you have any templates that require new lines?
>>>
>>> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>>>
>>> I need to create services from a template that has a lot of parameters.
>>> In addition to having a lot of parameters, it has parameters with values
>>> containing commas, which does not play well with the -v flag for oc
>>> process.  Is there any way to make oc process get the parameter values from
>>> a file?  I'm currently tediously copy/pasting the values into the web UI,
>>> which is not a good solution.
>>>
>>> --
>>>
>>> Alex Wauck // DevOps Engineer
>>> *E X O S I T E*
>>> *www.exosite.com *
>>> Making Machines More Human.
>>>
>>> ___
>>> users mailing list
>>> users@lists.openshift.redhat.com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>> ___
>>> users mailing list
>>> users@lists.openshift.redhat.com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>


-- 
Ben Parees | OpenShift
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-24 Thread Clayton Coleman
If new-app -p is splitting on comma we need to fix that.  I'm willing to
break backwards compatibility on new-app because this is a functionality
blocker.  Process will be there for people who need the more complex flow.

On Thu, Jun 23, 2016 at 3:54 PM, Luke Meyer  wrote:

> `oc process -v` and `oc new-app -p` work exactly the same, both being
> implemented the same. You can specify multiple of either. I thought there
> was supposed to be a way to escape commas but I can't find it now.
>
> FWIW you can specify newlines - anything, really, except a comma - in
> parameters.
>
> However, have you considered using a Secret or ConfigMap to supply the
> parameters? It's easy to put strings and files in those with oc create
> secret|configmap. If they're only needed at runtime, not for the actual
> template, that seems simplest.
>
> On Fri, Jun 17, 2016 at 6:07 PM, Clayton Coleman 
> wrote:
>
>> The -v flag needs to be fixed for sure (splitting flag values is bad).
>>
>> New-app should support both -f FILE and -p (which you can specify
>> multiple -p, one for each param).
>>
>> Do you have any templates that require new lines?
>>
>> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>>
>> I need to create services from a template that has a lot of parameters.
>> In addition to having a lot of parameters, it has parameters with values
>> containing commas, which does not play well with the -v flag for oc
>> process.  Is there any way to make oc process get the parameter values from
>> a file?  I'm currently tediously copy/pasting the values into the web UI,
>> which is not a good solution.
>>
>> --
>>
>> Alex Wauck // DevOps Engineer
>> *E X O S I T E*
>> *www.exosite.com *
>> Making Machines More Human.
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-23 Thread Luke Meyer
`oc process -v` and `oc new-app -p` work exactly the same, both being
implemented the same. You can specify multiple of either. I thought there
was supposed to be a way to escape commas but I can't find it now.

FWIW you can specify newlines - anything, really, except a comma - in
parameters.

However, have you considered using a Secret or ConfigMap to supply the
parameters? It's easy to put strings and files in those with oc create
secret|configmap. If they're only needed at runtime, not for the actual
template, that seems simplest.

On Fri, Jun 17, 2016 at 6:07 PM, Clayton Coleman 
wrote:

> The -v flag needs to be fixed for sure (splitting flag values is bad).
>
> New-app should support both -f FILE and -p (which you can specify multiple
> -p, one for each param).
>
> Do you have any templates that require new lines?
>
> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>
> I need to create services from a template that has a lot of parameters.
> In addition to having a lot of parameters, it has parameters with values
> containing commas, which does not play well with the -v flag for oc
> process.  Is there any way to make oc process get the parameter values from
> a file?  I'm currently tediously copy/pasting the values into the web UI,
> which is not a good solution.
>
> --
>
> Alex Wauck // DevOps Engineer
> *E X O S I T E*
> *www.exosite.com *
> Making Machines More Human.
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-20 Thread Ben Parees
On Fri, Jun 17, 2016 at 3:07 PM, Clayton Coleman 
wrote:

> The -v flag needs to be fixed for sure (splitting flag values is bad).
>
> New-app should support both -f FILE and -p (which you can specify multiple
> -p, one for each param).
>

-
​f is already used to indicate "instantiate the template defined in this
local file", but i've created this card to track adding some sort of
parameter from file feature:

https://trello.com/c/BMuLvOny/968-supply-oc-new-app-and-oc-process-parameter-list-via-a-file
​



>
> Do you have any templates that require new lines?
>
> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>
> I need to create services from a template that has a lot of parameters.
> In addition to having a lot of parameters, it has parameters with values
> containing commas, which does not play well with the -v flag for oc
> process.  Is there any way to make oc process get the parameter values from
> a file?  I'm currently tediously copy/pasting the values into the web UI,
> which is not a good solution.
>
> --
>
> Alex Wauck // DevOps Engineer
> *E X O S I T E*
> *www.exosite.com *
> Making Machines More Human.
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>


-- 
Ben Parees | OpenShift
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-20 Thread Alex Wauck
Oh, I hadn't thought of that.  I guess a solution for that would be
necessary after all.  Maybe have some special syntax to indicate that the
value should be read from a file?

At any rate, a simple key=value file will suffice for my needs.

On Mon, Jun 20, 2016 at 9:17 AM, Jordan Liggitt  wrote:

> if you have the content of a cert file as a param, that will typically
> contain newlines
>
> On Mon, Jun 20, 2016 at 10:13 AM, Alex Wauck 
> wrote:
>
>> We do not have any parameters that require newlines, thankfully.  In my
>> opinion, that would be kind of insane.
>>
>> new-app isn't a great solution, since the template is intended to set up
>> our entire environment with multiple apps (some apps share parameters).  Or
>> current work-around is a Python script that generates Javascript that we
>> then paste into the Chrome JS console to populate the fields in the web UI.
>>
>> I'd really just like oc process to accept a file containing key=value
>> pairs, one per line.
>>
>> On Fri, Jun 17, 2016 at 5:07 PM, Clayton Coleman 
>> wrote:
>>
>>> The -v flag needs to be fixed for sure (splitting flag values is bad).
>>>
>>> New-app should support both -f FILE and -p (which you can specify
>>> multiple -p, one for each param).
>>>
>>> Do you have any templates that require new lines?
>>>
>>> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>>>
>>> I need to create services from a template that has a lot of parameters.
>>> In addition to having a lot of parameters, it has parameters with values
>>> containing commas, which does not play well with the -v flag for oc
>>> process.  Is there any way to make oc process get the parameter values from
>>> a file?  I'm currently tediously copy/pasting the values into the web UI,
>>> which is not a good solution.
>>>
>>> --
>>>
>>> Alex Wauck // DevOps Engineer
>>> *E X O S I T E*
>>> *www.exosite.com *
>>> Making Machines More Human.
>>>
>>> ___
>>> users mailing list
>>> users@lists.openshift.redhat.com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>
>>
>> --
>>
>> Alex Wauck // DevOps Engineer
>> +1 612 790 1558 (USA Mobile)
>>
>> *E X O S I T E*
>> 275 Market Street, Suite 535
>> Minneapolis, MN 55405
>> *www.exosite.com *
>>
>> This communication may contain confidential information that is proprietary 
>> to
>> Exosite. Any unauthorized use or disclosure of this information is
>> strictly prohibited. If you are not the intended recipient, please delete
>> this message and any attachments, and advise the sender by return e-mail.
>>
>> Making Machines More Human.
>>
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>


-- 

Alex Wauck // DevOps Engineer
+1 612 790 1558 (USA Mobile)

*E X O S I T E*
275 Market Street, Suite 535
Minneapolis, MN 55405
*www.exosite.com *

This communication may contain confidential information that is proprietary to
Exosite. Any unauthorized use or disclosure of this information is
strictly prohibited. If you are not the intended recipient, please delete
this message and any attachments, and advise the sender by return e-mail.

Making Machines More Human.
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-20 Thread Jordan Liggitt
if you have the content of a cert file as a param, that will typically
contain newlines

On Mon, Jun 20, 2016 at 10:13 AM, Alex Wauck  wrote:

> We do not have any parameters that require newlines, thankfully.  In my
> opinion, that would be kind of insane.
>
> new-app isn't a great solution, since the template is intended to set up
> our entire environment with multiple apps (some apps share parameters).  Or
> current work-around is a Python script that generates Javascript that we
> then paste into the Chrome JS console to populate the fields in the web UI.
>
> I'd really just like oc process to accept a file containing key=value
> pairs, one per line.
>
> On Fri, Jun 17, 2016 at 5:07 PM, Clayton Coleman 
> wrote:
>
>> The -v flag needs to be fixed for sure (splitting flag values is bad).
>>
>> New-app should support both -f FILE and -p (which you can specify
>> multiple -p, one for each param).
>>
>> Do you have any templates that require new lines?
>>
>> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>>
>> I need to create services from a template that has a lot of parameters.
>> In addition to having a lot of parameters, it has parameters with values
>> containing commas, which does not play well with the -v flag for oc
>> process.  Is there any way to make oc process get the parameter values from
>> a file?  I'm currently tediously copy/pasting the values into the web UI,
>> which is not a good solution.
>>
>> --
>>
>> Alex Wauck // DevOps Engineer
>> *E X O S I T E*
>> *www.exosite.com *
>> Making Machines More Human.
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
>
> --
>
> Alex Wauck // DevOps Engineer
> +1 612 790 1558 (USA Mobile)
>
> *E X O S I T E*
> 275 Market Street, Suite 535
> Minneapolis, MN 55405
> *www.exosite.com *
>
> This communication may contain confidential information that is proprietary to
> Exosite. Any unauthorized use or disclosure of this information is
> strictly prohibited. If you are not the intended recipient, please delete
> this message and any attachments, and advise the sender by return e-mail.
>
> Making Machines More Human.
>
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-20 Thread Alex Wauck
We do not have any parameters that require newlines, thankfully.  In my
opinion, that would be kind of insane.

new-app isn't a great solution, since the template is intended to set up
our entire environment with multiple apps (some apps share parameters).  Or
current work-around is a Python script that generates Javascript that we
then paste into the Chrome JS console to populate the fields in the web UI.

I'd really just like oc process to accept a file containing key=value
pairs, one per line.

On Fri, Jun 17, 2016 at 5:07 PM, Clayton Coleman 
wrote:

> The -v flag needs to be fixed for sure (splitting flag values is bad).
>
> New-app should support both -f FILE and -p (which you can specify multiple
> -p, one for each param).
>
> Do you have any templates that require new lines?
>
> On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:
>
> I need to create services from a template that has a lot of parameters.
> In addition to having a lot of parameters, it has parameters with values
> containing commas, which does not play well with the -v flag for oc
> process.  Is there any way to make oc process get the parameter values from
> a file?  I'm currently tediously copy/pasting the values into the web UI,
> which is not a good solution.
>
> --
>
> Alex Wauck // DevOps Engineer
> *E X O S I T E*
> *www.exosite.com *
> Making Machines More Human.
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>


-- 

Alex Wauck // DevOps Engineer
+1 612 790 1558 (USA Mobile)

*E X O S I T E*
275 Market Street, Suite 535
Minneapolis, MN 55405
*www.exosite.com *

This communication may contain confidential information that is proprietary to
Exosite. Any unauthorized use or disclosure of this information is
strictly prohibited. If you are not the intended recipient, please delete
this message and any attachments, and advise the sender by return e-mail.

Making Machines More Human.
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Creating from a template: get parameters from a file

2016-06-17 Thread Clayton Coleman
The -v flag needs to be fixed for sure (splitting flag values is bad).

New-app should support both -f FILE and -p (which you can specify multiple
-p, one for each param).

Do you have any templates that require new lines?

On Jun 17, 2016, at 5:55 PM, Alex Wauck  wrote:

I need to create services from a template that has a lot of parameters.  In
addition to having a lot of parameters, it has parameters with values
containing commas, which does not play well with the -v flag for oc
process.  Is there any way to make oc process get the parameter values from
a file?  I'm currently tediously copy/pasting the values into the web UI,
which is not a good solution.

-- 

Alex Wauck // DevOps Engineer
*E X O S I T E*
*www.exosite.com *
Making Machines More Human.

___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Creating from a template: get parameters from a file

2016-06-17 Thread Alex Wauck
I need to create services from a template that has a lot of parameters.  In
addition to having a lot of parameters, it has parameters with values
containing commas, which does not play well with the -v flag for oc
process.  Is there any way to make oc process get the parameter values from
a file?  I'm currently tediously copy/pasting the values into the web UI,
which is not a good solution.

-- 

Alex Wauck // DevOps Engineer
*E X O S I T E*
*www.exosite.com *
Making Machines More Human.
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users