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

Re: Simple Java S2I

2017-03-02 Thread Graham Dumpleton
Have you seen: https://blog.openshift.com/using-openshift-enterprise-grade-spring-boot-deployments/ Graham > On 3 Mar 2017, at 5:55 PM, Sobkowiak Krzysztof > wrote: > > Hi > >

Re: Running sshd in a Docker Container on Openshift

2017-07-09 Thread Graham Dumpleton
If your applications are in the same project, you may find it easier to mount an extra persistent volume temporarily in the source pod. Access the pod using 'oc rsh' and copy the files into that persistent volume and then detach it from that pod. Then mount the persistent volume into the target

Re: Running sshd in a Docker Container on Openshift

2017-07-09 Thread Graham Dumpleton
t have to worry about what the IP address is. Graham > On 10 Jul 2017, at 7:43 AM, Graham Dumpleton <gdump...@redhat.com> wrote: > > If your applications are in the same project, you may find it easier to mount > an extra persistent volume temporarily in the source pod. Access

Re: Running sshd in a Docker Container on Openshift

2017-07-10 Thread Graham Dumpleton
> On 10 Jul 2017, at 11:55 PM, Itamar Turner-Trauring > wrote: > > It is possible to run sshd on OpenShift, if other options don't work - we do > it as part of the Telepresence remote debugging tool we built for OpenShift > and Kubernetes (https://telepresence.io

Re: no mcrypt in s2i-php

2017-07-18 Thread Graham Dumpleton
> On 19 Jul 2017, at 10:10 AM, Ben Parees wrote: > > > > On Tue, Jul 18, 2017 at 6:26 PM, Piotr Baranowski > wrote: > Is there any reason for the s2i-php-builder not to contain the mcrypt library > and

Re: How could I deploy redis cluster on openshift origin cluster?

2017-07-23 Thread Graham Dumpleton
See: https://github.com/sclorg/redis-container The image can be found at: https://hub.docker.com/r/centos/redis-32-centos7/ Graham > On 24 Jul 2017, at 1:26 PM, Yu Wei

Re: Using Custom SCC and Service Account in Deployment

2017-07-26 Thread Graham Dumpleton
What is documented in that blog does work. Instead of: oc adm policy add-scc-to-user anyuid system:serviceaccount:mysvcacct use: oc adm policy add-scc-to-user anyuid -z mysvcacct as the blog explains, and make sure you are in the correct project in case when you switched to admin you

Re: help with redinessProbe check

2017-06-05 Thread Graham Dumpleton
If you need to use a complex command as a readiness or liveness probe, you are better off having a script which is part of the container image and running that, having all knowledge of what to do inside of the script. This has the benefit that the details of the probe can be a part of the Git

Re: How to grant system:admin rights to admin?

2017-06-06 Thread Graham Dumpleton
Username: system:admin >> Password: >> error: username system:admin is invalid for basic auth >> Any idea what I'm doing wrong? >> Cheers! >> pon., 5 cze 2017 o 12:28 użytkownik Graham Dumpleton <gdump...@redhat.com >> <mailto:gdump...@redhat.com> <mai

Re: openshift origin graphs?

2017-05-21 Thread Graham Dumpleton
> On 21 May 2017, at 11:30 AM, Hetz Ben Hamo wrote: > > Hi, > > I just installed Openshift Origin using the Ansible installer. Everything > seems to work, but on many youtube video I have seen some really nice graphs > like maps (containers, pods, nodes, network etc) as well

Re: Permissions problem mounting file from ConfigMap

2017-12-13 Thread Graham Dumpleton
c period + ttl. What are the OpenShift defaults for > that? > > On Wed, Dec 13, 2017 at 8:41 PM Graham Dumpleton <gdump...@redhat.com > <mailto:gdump...@redhat.com>> wrote: > If you copy it rather than symlink, you will loose the ability that an update > to the confi

Re: Permissions problem mounting file from ConfigMap

2017-12-13 Thread Graham Dumpleton
in a way similar to how you > described (but copying not symlinking). Not nice, but it works! > > On 12/12/17 21:10, Graham Dumpleton wrote: >> A belated update on this. >> >> The problem with using subPath is due to a SELinux issue in the kernel. >> >&g

Re: Permissions problem mounting file from ConfigMap

2017-12-12 Thread Graham Dumpleton
l > name: squonk-sso-config > subPath: context.xml > readOnly: true > > If the whole configMap is mounted to a directory the contents are readable. > > And as mentioned already, if you do this in Minishift it works fine

Re: OpenShift environment in Prod: Security: pro and cons

2017-11-18 Thread Graham Dumpleton
You could start out by reading the OpenShift Security Container Guide if you haven't already. * https://docs.openshift.com/container-platform/latest/security/index.html There was also this Tech N’ Talk briefing about

Re: Builder unable to resolve github.com

2017-11-12 Thread Graham Dumpleton
The required setup instructions can be seen at: https://github.com/openshift/origin/blob/master/docs/cluster_up_down.md#linux It describes what you need to do with the firewall. > On 13 Nov 2017, at 7:35 am, Marc

Re: Version 3.8 and 3.9 confusion

2017-12-11 Thread Graham Dumpleton
Others can fill in more details, but as I understand it yes, the next full release will be 3.9. This is in order to catch back up with the Kubernetes releases. > On 11 Dec 2017, at 7:28 pm, Per Carlson wrote: > > Hi. > > I just noticed a message on the dev mailinglist: > >

Re: Permissions problem mounting file from ConfigMap

2017-12-08 Thread Graham Dumpleton
The permissions is correct. It is shown as decimal, not the octal you are setting it with. >>> '%o' % 420 '644' What happens when you mount the configmap onto a directory separate from anything else? Graham > On 9 Dec 2017, at 4:02 am, Tim Dudgeon wrote: > > More on

Re: OpenShift cluster up --host-data-dir on Docker for Windows on a shared Drive

2018-05-09 Thread Graham Dumpleton
My experience in the past has been that using a local Windows directory for host data and persistent volumes when running oc cluster up on Windows caused problems. One reason for this is the inability to delete a file if it is in use. The case insensitive file system also caused issues for some

Re: simple hello world in python keeps crashing how to see why?

2018-05-21 Thread Graham Dumpleton
If that is really your whole application then as soon as the loop completes, the container will exit and the pod restarted. If that happens quick enough and keeps happening it would go into a fail state. For a normal deployment, you need to have an application, such as a WSGI application

Re: how can I use a custom image with openshift

2018-05-24 Thread Graham Dumpleton
> On 24 May 2018, at 7:20 am, Brian Keyes wrote: > > I want to use a custom image that has alpline with python and boto3 installed > on it > > I am seeing the console might have some way to do this , but I am not sure on > the procedure at all > > would I , create a

Re: suggestion for a long running python container for a demo

2018-05-22 Thread Graham Dumpleton
Hello world type application: * https://github.com/OpenShiftDemos/os-sample-python More involved application which can optionally be hooked up to database etc. * https://github.com/openshift-katacoda/blog-django-py

Re: error running python script in openshift

2018-05-30 Thread Graham Dumpleton
If you want to supply your own way of starting up your application when using Python S2I, supply an executable 'app.sh' file. This should be a shell script which runs your application. Ensure that the final application is run using 'exec'. Eg. #!/bin/bash exec python my-custom-app.py

Re: how to execute a script with S2i in openshift?

2018-05-30 Thread Graham Dumpleton
Sorry, obviously meant to credit Frédéric. > On 31 May 2018, at 8:00 am, Graham Dumpleton wrote: > > As Brian says, use a custom assemble script that calls the original. > > For a description of customising the S2I build process, check out the free > eBook for OpenSh

Re: error running python script in openshift

2018-05-30 Thread Graham Dumpleton
t 8:06 am, Graham Dumpleton wrote: > > If you want to supply your own way of starting up your application when using > Python S2I, supply an executable 'app.sh' file. This should be a shell > script which runs your application. Ensure that the final application is run > using 'exec'.

Re: how to execute a script with S2i in openshift?

2018-05-30 Thread Graham Dumpleton
As Brian says, use a custom assemble script that calls the original. For a description of customising the S2I build process, check out the free eBook for OpenShift at: https://www.openshift.com/deploying-to-openshift/ Chapter 9 covers this

Re: errors accessing egressnetworkpolicies.network.openshift.io when attempting to export project

2018-06-01 Thread Graham Dumpleton
For the basic Python application you wouldn't need to export most of those and for some doing so would cause problems when you try to load them again. For a basic application with no secrets, configmaps or persistent volumes, all you need is: oc export is,bc,dc,svc,route -o yaml Do not

Re: errors accessing egressnetworkpolicies.network.openshift.io when attempting to export project

2018-06-02 Thread Graham Dumpleton
to be careful with service accounts and role bindings. Work out just the extra ones required by the application. This is why should not always export secrets. Graham > On 2 Jun 2018, at 16:58, Aleksandar Lazic wrote: > > Hi. > >> On 02/06/2018 13:18, Graham Dumpleton wrote: >&

Re: boto import command not found

2018-06-04 Thread Graham Dumpleton
The 'run' file must be an executable application. For a shell script, that means it must start with: #!/bin/bash Thus you should be using: #!/bin/bash python /opt/app-root/src/.s2i/bin/app.py You also should not be putting your 'app.py' file in the '.s2i/bin' directory. It

Re: OC debug command does not show command prompt

2018-06-06 Thread Graham Dumpleton
Also ensure you have the correct oc command line client version corresponding to the oc cluster. When they are divergent you can get subtle problems. Graham > On 7 Jun 2018, at 7:05 am, Brian Keyes wrote: > > if I ssh into one of the worker nodes and "oc login" I can start the debug >

Re: Hard Disk is full because of OpenShift Origin

2017-10-26 Thread Graham Dumpleton
See if you have a lot of docker volumes that haven't been cleaned up properly. docker volume ls Maybe that is hanging onto space. Graham > On 27 Oct 2017, at 8:37 am, Tien Hung Nguyen wrote: > > Hi everybody, > > I have a problem with my hard drive space. Since

Re: Hard Disk is full because of OpenShift Origin

2017-10-27 Thread Graham Dumpleton
on my Hard > Disk. That‘s why I started to manually delete those images with the docker > command: docker rmi [imageid], but that didn‘t change my hard disk space at > all. > > Do you have any other ideas? > >> Am 27.10.2017 um 01:24 schrieb Graham Dumpleton <gdump.

Re: Hard Disk is full because of OpenShift Origin

2017-10-27 Thread Graham Dumpleton
A question for OP. Are you using options to oc cluster up to persist data when shutting it down? > On 27 Oct 2017, at 10:58 pm, Mauricio Améndola > wrote: > > Hello, > The correct way to remove old images is using “oadm prune….”[1] command. I > remember that there

Re: Absence of master-config.yaml

2018-02-08 Thread Graham Dumpleton
> On 9 Feb 2018, at 1:50 am, Cesar Wong wrote: > > If using cluster up, you will find the config by default both inside the > container and on the file system of the host at > /var/lib/origin/openshift.local.config/master Just be aware that if using Docker for Mac or

Re: Deployment Strategy: lifecycle hooks how to inject configuration

2018-02-21 Thread Graham Dumpleton
you will build your custom image. This > is the way containers are supposed to work, with or without OpenShift. > > > []s, Fernando Lozano > > > On Wed, Feb 21, 2018 at 6:15 PM, Graham Dumpleton <gdump...@redhat.com > <mailto:gdump...@redhat.com>> wrote: &

Re: Deployment Strategy: lifecycle hooks how to inject configuration

2018-02-21 Thread Graham Dumpleton
& PID=$! wait $PID trap - TERM INT wait $PID STATUS=$? exit $STATUS This simple alternative to a mini init process manager such as tini, will work fine in many cases. Replace /usr/libexec/s2i/run with actual program to run. Graham > On 22 Feb 2018, at 9:33 am, Graham Dumpleton

Re: Deployment Strategy: lifecycle hooks how to inject configuration

2018-02-22 Thread Graham Dumpleton
ernando Lozano > > > > On Wed, Feb 21, 2018 at 7:40 PM, Graham Dumpleton <gdump...@redhat.com > <mailto:gdump...@redhat.com>> wrote: > Another example of where this can be useful is where the primary process in > the container doesn't do what is required of p

Re: Deployment Strategy: lifecycle hooks how to inject configuration

2018-02-21 Thread Graham Dumpleton
> On 22 Feb 2018, at 3:21 am, Fernando Lozano wrote: > > Hi Dan, > > As you learned, lifecycle hooks were not made to change anything inside a > container image. Remember that container images are, by design, immutable. It > looks you want to build a custom container

Re: User "admin" cannot get securitycontextconstraints at the cluster scope

2018-08-02 Thread Graham Dumpleton
For Minishift I believe you can run: oc adm policy add-scc-to-user anyuid -z default -n tomcat8 --as system:admin So use user impersonation to run as system:admin. > On 2 Aug 2018, at 6:46 pm, Clayton Coleman wrote: > > User “admin” (that’s the user name) must be given real admin >

Re: How to retrieve session token via rest api?

2018-08-02 Thread Graham Dumpleton
You can see what commands do by adding '--loglevel 9' option. oc whoami -t --loglevel 9 What you will find in this case though is that for that token in particular it doesn't actually make any API calls, as all it is doing is getting it from the ~/.kube/config file. What do you want to

Re: error running application using customized image stream

2018-08-17 Thread Graham Dumpleton
A typical OpenShift environment isn't going to let you run 'sudo' anyway even if you resolve the error. As to the error, it is because the /etc/passwd file lacks a user entry for that user ID. See section 'Support Arbitrary User IDs' in:

Re: Inject Custom CA during builds

2018-07-16 Thread Graham Dumpleton
The first will not work because you aren't root when a build occurs so can't copy files to locations which require root access. For the second option, how has the build secret been set up in the build config? Specifically, what does the spec.source.secrets part of the build config look like,

Re: Help using ImageStreams, DCs and ImagePullSecrets templates with a GitLab private registry (v3.6)

2018-04-09 Thread Graham Dumpleton
You are possibly hitting a bug with oc where it was generating the dockerconfig json in wrong format in 3.7. If you used 3.6 oc client with 3.7 backend just when creating the secret it will work, if this is the issue I am thinking of. If want confirmation, perhaps try with a 3.6 client.

Re: Openshift starter not routing

2018-04-16 Thread Graham Dumpleton
Are you on ca-central-1? An issue with routes on that cluster is being investigated. > On 17 Apr 2018, at 6:33 am, Leandro wrote: > > Hi All, > > Is there currently any problem with the openshift Starter? Since last > Thursday, I have noticed the following problems: > > -

Re: How to create an app in OpenShift with existing local docker image

2018-12-13 Thread Graham Dumpleton
If you can't put the image up on a image registry where OpenShift can pull it from, you need to push it to the internal image registry of OpenShift. This creates an image stream in your project, you can then deploy it, or use it as an image for docker builds or source builds. For uploading the

Re: OpenShift Jenkins - Anonymous Web-hooks

2019-02-07 Thread Graham Dumpleton
I believe you should be using the web book URL from the pipeline build config. You can get them from the web console page for the pipeline. See: * https://ruddra.com/posts/openshift-python-gunicorn-nginx-jenkins-pipelines-part-three/