Re: Runtime values in sti-php ini templates

2016-02-04 Thread Ben Parees
On Thu, Feb 4, 2016 at 11:41 AM, Mateus Caruccio < mateus.caruc...@getupcloud.com> wrote: > Yeah, that's exactly the use case I'm talking about. > Since there's .sti/environment, it seams to me a natural path to have > .sti/templates/ containing a mirror-like tree, i.e. everything inside > .sti/te

Re: Runtime values in sti-php ini templates

2016-02-04 Thread Mateus Caruccio
The target dir must be prepared to receive those files, like it's being done today: https://github.com/openshift/sti-php/blob/master/5.6/s2i/bin/run#L20-L21 *Mateus Caruccio* Master of Puppets +55 (51) 8298.0026 gtalk: *mateus.caruc...@getupcloud.com twitter: @MateusCaruccio

Re: Runtime values in sti-php ini templates

2016-02-04 Thread Michal Fojtik
That will not work as the assemble script runs as non-root so it can't copy files into / On Thu, Feb 4, 2016 at 5:41 PM, Mateus Caruccio < mateus.caruc...@getupcloud.com> wrote: > Yeah, that's exactly the use case I'm talking about. > Since there's .sti/environment, it seams to me a natural path

Re: Runtime values in sti-php ini templates

2016-02-04 Thread Mateus Caruccio
Yeah, that's exactly the use case I'm talking about. Since there's .sti/environment, it seams to me a natural path to have .sti/templates/ containing a mirror-like tree, i.e. everything inside .sti/templates/ becomes / inside the container. *Mateus Caruccio* Master of Puppets +55 (51) 8298.0026

Re: Runtime values in sti-php ini templates

2016-02-04 Thread Erik Jacobs
Hi Mateus, At this time each image kind of handles this differently, as best I can tell. For example, the JBoss EAP image will look for settings.xml in the code repository and substitute that instead of the built-in one (over-simplifying). The issue is how you would do this in some kind of "gener

Re: Runtime values in sti-php ini templates

2016-02-04 Thread Ben Parees
On Wed, Feb 3, 2016 at 9:50 PM, Erik Jacobs wrote: > Hi Mateus, > > Maybe I'm misunderstanding the problem, but would the secrets mechanism > not work for this? You could have the ini file be a secret which would be > attached/mounted into the pod at run-time and could be in that folder as an > .

Re: Runtime values in sti-php ini templates

2016-02-04 Thread Mateus Caruccio
Hi Erik. That may work, but it won't be able to substitute runtime env vars. Also, it adds an extra step for something that should be simple: custom configs. The point here is not my specific use case. I'm looking now for a more generic way to allow users to define/overwrite container config in a

Re: Runtime values in sti-php ini templates

2016-02-03 Thread Erik Jacobs
Hi Mateus, Maybe I'm misunderstanding the problem, but would the secrets mechanism not work for this? You could have the ini file be a secret which would be attached/mounted into the pod at run-time and could be in that folder as an .ini file... I think? Ben? Erik M Jacobs, RHCA Principal Techn

Re: Runtime values in sti-php ini templates

2016-02-03 Thread Mateus Caruccio
No, composer is just fine pulling its dependencies. The problem are packages not found on composer. Newrelic.so, for instance, must be installed by newrelic's own yum repo, thus it need to be inside the build image already. *Mateus Caruccio* Master of Puppets +55 (51) 8298.0026 gtalk: *mateus.ca

Re: Runtime values in sti-php ini templates

2016-02-03 Thread Ben Parees
On Wed, Feb 3, 2016 at 9:40 AM, Mateus Caruccio < mateus.caruc...@getupcloud.com> wrote: > On Tue, Feb 2, 2016 at 9:51 PM, Ben Parees wrote: > >> >> >> On Tue, Feb 2, 2016 at 12:21 PM, Mateus Caruccio < >> mateus.caruc...@getupcloud.com> wrote: >> >>> This could lead to an issue since most .ini f

Re: Runtime values in sti-php ini templates

2016-02-03 Thread Mateus Caruccio
On Tue, Feb 2, 2016 at 9:51 PM, Ben Parees wrote: > > > On Tue, Feb 2, 2016 at 12:21 PM, Mateus Caruccio < > mateus.caruc...@getupcloud.com> wrote: > >> This could lead to an issue since most .ini files depend on some module >> to be available, newrelic.so in my case. Simply processing templates

Re: Runtime values in sti-php ini templates

2016-02-02 Thread Ben Parees
On Tue, Feb 2, 2016 at 12:21 PM, Mateus Caruccio < mateus.caruc...@getupcloud.com> wrote: > This could lead to an issue since most .ini files depend on some module to > be available, newrelic.so in my case. Simply processing templates with no > way to install modules my not suffice. > > ​well i'd

Re: Runtime values in sti-php ini templates

2016-02-02 Thread Steven Merrill
Mateus, Would the built-in php configuration files' support for env vars be enough for a first pass at this implementation? http://php.net/manual/en/configuration.file.php#example-77 . On Tue, Feb 2, 2016 at 12:21 PM, Mateus Caruccio < mateus.caruc...@getupcloud.com> wrote: > This could lead to

Re: Runtime values in sti-php ini templates

2016-02-02 Thread Mateus Caruccio
This could lead to an issue since most .ini files depend on some module to be available, newrelic.so in my case. Simply processing templates with no way to install modules my not suffice. In my case i've create an sti-php-extra[1] docker image with a bunch of new modules (in fact, only one for now

Re: Runtime values in sti-php ini templates

2016-02-02 Thread Ben Parees
On Tue, Feb 2, 2016 at 2:39 AM, Honza Horak wrote: > It seems fine to me as well, we need to make the images extensible. > > I'd just like to make sure I understand the use case -- that would mean > you'd add a file like /etc/opt/rh/rh-php56/php.d/newrelic.ini.template > (using bind-mount or in a

Re: Runtime values in sti-php ini templates

2016-02-02 Thread Mateus Caruccio
Exactly. I'm going to send a PR today. Just need to test it here. Em 02/02/2016 05:39, "Honza Horak" escreveu: > It seems fine to me as well, we need to make the images extensible. > > I'd just like to make sure I understand the use case -- that would mean > you'd add a file like /etc/opt/rh/rh-p

Re: Runtime values in sti-php ini templates

2016-02-01 Thread Ben Parees
I think that sounds reasonable, i'd be inclined to accept it as a PR. Adding Honza since his team technically controls the PHP image now (5.6 anyway). On Mon, Feb 1, 2016 at 4:43 PM, Mateus Caruccio < mateus.caruc...@getupcloud.com> wrote: > Hi. > > I need to run newrelic on a php container. Its

Runtime values in sti-php ini templates

2016-02-01 Thread Mateus Caruccio
Hi. I need to run newrelic on a php container. Its license must be set ​from ​ php.ini ​ or ​ any .ini inside /etc/opt/rh/rh-php56/php.d/ ​. ​ The problem is it need ​s​ to be set on run time, not build time because the license key is stored ​in a n​ env var. What is the best way to do that? Wo