Re: oc .env files

2016-12-14 Thread Clayton Coleman
Mostly we wanted to do it as part of git, but not enough clear flows that
supported it.  For instance, deploying the same repo to multiple projects
or clusters.  Or whether we should be more on the simple flow (like heroku)
or be more flexible.

I started a PR exploring this earlier this year - it's not that some sort
of context is terrible, but being careful not to go too far.

I'd ask you guys - what sorts of workflows do you have today that are
single target?  What sorts of workflows beyond the ones mentioned would
work well with contexts?

On Dec 14, 2016, at 6:54 PM, Mateus Caruccio 
wrote:

It makes total sense to me having a local context config for the cluster,
just like git with .git/.
People is used to it and as it's already common on most languages/framework
like python's requirements.txt/setup.py, ruby's Gemfile, node's
packages.json and so on.

Clayton, could you please elaborate a little bit on the downsides you've
mentioned or point for the discussion thread?

--
Mateus Caruccio / Master of Puppets
GetupCloud.com - Eliminamos a Gravidade

On Wed, Dec 14, 2016 at 8:24 PM, Ben Parees  wrote:

>
>
> On Wed, Dec 14, 2016 at 5:17 PM, Graham Dumpleton 
> wrote:
>
>>
>> On 15 Dec 2016, at 9:06 AM, Ben Parees  wrote:
>>
>>
>>
>> On Wed, Dec 14, 2016 at 4:53 PM, Clayton Coleman 
>> wrote:
>>
>>> The process command does now include an "--env-file" option - so you
>>> could do "oc process -f template-file.yaml --env-file .oc_env | oc apply -f
>>> -"
>>>
>>
>> ​I think Phillipe is looking for a "cluster environment definition" file
>> which controls what cluster+namespace the resources are "applied" to, not
>> env variable inputs to the template processing, but that's basically what
>> the .kube/config file specifies/controls today (ie it controls what
>> cluster+project your oc commands are going to operate against)
>>
>>
>> The problem being though that it can only refer to one cluster at a time.
>> Thus you can easily stuff up when have multiple windows open against apps
>> for different clusters or users and you forgot that you had changed which
>> one you were logged in to. Yes, you can use --cluster=‘’ option (if that
>> works how I think), but still have to remember to add it explicitly, where
>> as if you could capture that in a configuration file in the repo itself and
>> oc would look for it in some way you could be sure you were always working
>> against correct cluster.
>>
>> BTW, I can’t find any docs about —env-file in oc help strings for that
>> command. Also just noticed that ‘oc options’ sends output to stderr and not
>> stdout which is a bit strange. If using —help on a command still goes to
>> stdout.
>>
>
> --
> ​env-file support just merged (today, I think, or this week anyway).
> Clayton is, as always, on the cutting edge of functionality.
>
>
>
>
>>
>> Graham
>>
>>
>>> On Wed, Dec 14, 2016 at 4:06 PM, Philippe Lafoucrière <
>>> philippe.lafoucri...@tech-angels.com> wrote:
>>>
 Hi,

 We're having fun with the "oc apply" command, which solves a lot of
 configuration issues we've had in the past.
 There's just one thing I would like to have in oc: a local .oc_env file
 to define some defaults, like:

 - Current cluster url (make sure we're hitting the production cluster,
 not any of the test clusters)
 - Current namespace (to make sure apply won't fu.. up another project
 if we forget to specify it).

 Is there something we could see in the future?

 Thanks,
 Philippe

 --
 Philippe Lafoucrière - CEO
 http://www.tech-angels.com
 https://gemnasium.com
 France : +33 (0) 3 65 96 02 92
 Canada: +1 (418) 478-1175 <%28418%29%20478-1175>
 USA: +1 (954) 607-7443 <%28954%29%20607-7443>



 ___
 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
>>
>>
>>
>
>
> --
> Ben Parees | OpenShift
>
>
> ___
> 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

Re: oc .env files

2016-12-14 Thread Graham Dumpleton

> On 15 Dec 2016, at 9:06 AM, Ben Parees  wrote:
> 
> 
> 
> On Wed, Dec 14, 2016 at 4:53 PM, Clayton Coleman  > wrote:
> The process command does now include an "--env-file" option - so you could do 
> "oc process -f template-file.yaml --env-file .oc_env | oc apply -f -"
> 
> ​I think Phillipe is looking for a "cluster environment definition" file 
> which controls what cluster+namespace the resources are "applied" to, not env 
> variable inputs to the template processing, but that's basically what the 
> .kube/config file specifies/controls today (ie it controls what 
> cluster+project your oc commands are going to operate against)
> 

The problem being though that it can only refer to one cluster at a time. Thus 
you can easily stuff up when have multiple windows open against apps for 
different clusters or users and you forgot that you had changed which one you 
were logged in to. Yes, you can use --cluster=‘’ option (if that works how I 
think), but still have to remember to add it explicitly, where as if you could 
capture that in a configuration file in the repo itself and oc would look for 
it in some way you could be sure you were always working against correct 
cluster.

BTW, I can’t find any docs about —env-file in oc help strings for that command. 
Also just noticed that ‘oc options’ sends output to stderr and not stdout which 
is a bit strange. If using —help on a command still goes to stdout.

Graham

> 
> On Wed, Dec 14, 2016 at 4:06 PM, Philippe Lafoucrière 
>  > wrote:
> Hi,
> 
> We're having fun with the "oc apply" command, which solves a lot of 
> configuration issues we've had in the past.
> There's just one thing I would like to have in oc: a local .oc_env file to 
> define some defaults, like:
> 
> - Current cluster url (make sure we're hitting the production cluster, not 
> any of the test clusters)
> - Current namespace (to make sure apply won't fu.. up another project if we 
> forget to specify it).
> 
> Is there something we could see in the future?
> 
> Thanks,
> Philippe
> 
> -- 
> Philippe Lafoucrière - CEO
> http://www.tech-angels.com 
> https://gemnasium.com 
> France : +33 (0) 3 65 96 02 92
> Canada: +1 (418) 478-1175 
> USA: +1 (954) 607-7443 
> 
> 
> 
> ___
> 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

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


Re: oc .env files

2016-12-14 Thread Clayton Coleman
You could always put --context and --server flags on your "apply" call, and
source those from a config file so they cannot accidentally be used.  When
this has come up there has been a bias towards doing it that way in other
scripting scenarios.

We've talked about local context for the command line, but I'm somewhat
hesitant to bring it in.  Could this be something that you do with an
"oc-apply" bash wrapper?

On Wed, Dec 14, 2016 at 5:06 PM, Ben Parees  wrote:

>
>
> On Wed, Dec 14, 2016 at 4:53 PM, Clayton Coleman 
> wrote:
>
>> The process command does now include an "--env-file" option - so you
>> could do "oc process -f template-file.yaml --env-file .oc_env | oc apply -f
>> -"
>>
>
> ​I think Phillipe is looking for a "cluster environment definition" file
> which controls what cluster+namespace the resources are "applied" to, not
> env variable inputs to the template processing, but that's basically what
> the .kube/config file specifies/controls today (ie it controls what
> cluster+project your oc commands are going to operate against)
>
>
>
>
>>
>> On Wed, Dec 14, 2016 at 4:06 PM, Philippe Lafoucrière <
>> philippe.lafoucri...@tech-angels.com> wrote:
>>
>>> Hi,
>>>
>>> We're having fun with the "oc apply" command, which solves a lot of
>>> configuration issues we've had in the past.
>>> There's just one thing I would like to have in oc: a local .oc_env file
>>> to define some defaults, like:
>>>
>>> - Current cluster url (make sure we're hitting the production cluster,
>>> not any of the test clusters)
>>> - Current namespace (to make sure apply won't fu.. up another project if
>>> we forget to specify it).
>>>
>>> Is there something we could see in the future?
>>>
>>> Thanks,
>>> Philippe
>>>
>>> --
>>> Philippe Lafoucrière - CEO
>>> http://www.tech-angels.com
>>> https://gemnasium.com
>>> France : +33 (0) 3 65 96 02 92
>>> Canada: +1 (418) 478-1175 <(418)%20478-1175>
>>> USA: +1 (954) 607-7443 <(954)%20607-7443>
>>>
>>>
>>>
>>> ___
>>> 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: oc .env files

2016-12-14 Thread Ben Parees
On Wed, Dec 14, 2016 at 4:53 PM, Clayton Coleman 
wrote:

> The process command does now include an "--env-file" option - so you could
> do "oc process -f template-file.yaml --env-file .oc_env | oc apply -f -"
>

​I think Phillipe is looking for a "cluster environment definition" file
which controls what cluster+namespace the resources are "applied" to, not
env variable inputs to the template processing, but that's basically what
the .kube/config file specifies/controls today (ie it controls what
cluster+project your oc commands are going to operate against)




>
> On Wed, Dec 14, 2016 at 4:06 PM, Philippe Lafoucrière <
> philippe.lafoucri...@tech-angels.com> wrote:
>
>> Hi,
>>
>> We're having fun with the "oc apply" command, which solves a lot of
>> configuration issues we've had in the past.
>> There's just one thing I would like to have in oc: a local .oc_env file
>> to define some defaults, like:
>>
>> - Current cluster url (make sure we're hitting the production cluster,
>> not any of the test clusters)
>> - Current namespace (to make sure apply won't fu.. up another project if
>> we forget to specify it).
>>
>> Is there something we could see in the future?
>>
>> Thanks,
>> Philippe
>>
>> --
>> Philippe Lafoucrière - CEO
>> http://www.tech-angels.com
>> https://gemnasium.com
>> France : +33 (0) 3 65 96 02 92
>> Canada: +1 (418) 478-1175 <(418)%20478-1175>
>> USA: +1 (954) 607-7443 <(954)%20607-7443>
>>
>>
>>
>> ___
>> 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


oc .env files

2016-12-14 Thread Philippe Lafoucrière
Hi,

We're having fun with the "oc apply" command, which solves a lot of
configuration issues we've had in the past.
There's just one thing I would like to have in oc: a local .oc_env file to
define some defaults, like:

- Current cluster url (make sure we're hitting the production cluster, not
any of the test clusters)
- Current namespace (to make sure apply won't fu.. up another project if we
forget to specify it).

Is there something we could see in the future?

Thanks,
Philippe

-- 
Philippe Lafoucrière - CEO
http://www.tech-angels.com
https://gemnasium.com
France : +33 (0) 3 65 96 02 92
Canada: +1 (418) 478-1175
USA: +1 (954) 607-7443
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


OpenShift Origin 1.3.0: Is it normal that my "host URL" is translated to his IP every time?

2016-12-14 Thread Den Cowboy
Hi,


We use our own private/internal DNS. We have one centos from where we trigger 
our install and one atomic host on which the install is performed.


A part of my playbook.


# host group for masters
[masters]
master.test.env

We can do a nslookup with our DNS (on install server and on atomic host).
$ nslookup master.test.env
Server:192.168.x.2
Address:192.168.x.2#53

Name:master.test.env
Address: 192.168.x.3

After our install our master.config looks like

masterPublicURL: https://192.168.x.3:8443 (etc...) instead of 
https://master.test.env:8443


Is this the normal approach? On our environment we're able to login of course 
with:

./oc login https://master.test.env:8443


But we would expect to see those hostnames/urls in our configs too instead of 
ip's.


Thanks.

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


Re: OpenShift S2I cannot push image on EC2

2016-12-14 Thread Thomas Diesler
Thanks Andy, that helped

> On 07 Dec 2016, at 17:07, Andy Goldstein  wrote:
> 
> It looks like you don't have 172.30.0.0/16  listed as 
> in insecure registry in /etc/sysconfig/docker, or you haven't secured your 
> registry.
> 
> On Wed, Dec 7, 2016 at 11:04 AM, Thomas Diesler  > wrote:
> Folks, 
> 
> there seems to be an authentication problem 
>  in OpenShift 
> when installed on EC2.
> 
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 20.492 s
> [INFO] Finished at: 2016-12-07T15:39:09+00:00
> [INFO] Final Memory: 31M/267M
> [INFO] 
> 
> [WARNING] The requested profile "openshift" could not be activated because it 
> does not exist.
> Copying built war files into /wildfly/standalone/deployments for later 
> deployment...
> Copying all war artifacts from /opt/app-root/src/target directory into 
> /wildfly/standalone/deployments for later deployment...
> '/opt/app-root/src/target/example-camel-cdi-4.4.0.war' -> 
> '/wildfly/standalone/deployments/example-camel-cdi-4.4.0.war'
> Copying all ear artifacts from /opt/app-root/src/target directory into 
> /wildfly/standalone/deployments for later deployment...
> Copying all rar artifacts from /opt/app-root/src/target directory into 
> /wildfly/standalone/deployments for later deployment...
> Copying all jar artifacts from /opt/app-root/src/target directory into 
> /wildfly/standalone/deployments for later deployment...
> ...done
> 
> 
> Pushing image 172.30.183.73:5000/wildfly-camel/camel-cdi:latest 
>  ...
> Registry server Address: 
> Registry server User Name: serviceaccount
> Registry server Email: serviceacco...@example.org 
> 
> Registry server Password: <>
> error: build error: Failed to push image: Get 
> https://172.30.183.73:5000/v1/_ping:  
> http: server gave HTTP response to HTTPS client
> 
> 
> The OpenShift installation process that we follow is documented here: 
> http://wildfly-extras.github.io/wildfly-camel/#_openshift_on_ec2 
> 
> 
> cheers
> — thomas
> 
> ___
> 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