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 php-mcrypt extension?
> 
> It is very popular and I'd say crucial to majority of LAMP apps. 
> 
> I had to recreate a s2i-php image so it contains the missing php packages, 
> but still, I'd like to understand why.
> 
> It comes down to what packages our SCL team is able to package/maintain.  If 
> there's an SCL package for it, it should be easy to include in the image, 
> otherwise it will need to be packaged so we can properly 
> build+maintain/support it.

You will also get concerns from the SCL team and others about the size of any 
packages which people suggest be added. If every single package that someone 
wanted were added, the size of the image would grow dramatically. We would end 
up with same as the overly bloated official Docker images using Debian on 
Docker Hub for various language stacks.

If weren't for the pushback on that, I am sure I would have a string of 
packages would like to see added. One right now for example which encountered 
in last day is ImageMagick being missing. It stops me from using official 
Python S2I builder for a specific application in Python space.

> 
> Note that there's already an issue open requesting this particular package:
> https://github.com/sclorg/s2i-php-container/issues/161 
> 
> 
> I'm also copying Honza who leads the SCL team responsible for the images.
> 
> 
>  
> 
> best regards
> -- 
> Piotr Baranowski
> 
> ___
> 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: Building php with composer using private repos in composer.json

2017-07-18 Thread Ben Parees
On Tue, Jul 18, 2017 at 6:24 PM, Piotr Baranowski 
wrote:

> Hey group!
>
> I'm looking for some tips how to approach a problem I'm facing right now.
>
> My app is build using php so composer.json is used.
>
> It works like this:
> The source code of the app itself is on a private bitbucket repo.
> I'm using the ssh secret to pull the source. That part works perfectly.
>
> Once the source is pulled, composer on the builder s2i image is trying to
> fetch dependencies.
> I fails like this:
>
> Cloning "g...@bitbucket.org:/y.git" ...
> Commit: blah
> Author: foo
> Date: Mon Jul 17 12:12:22 2017 +0200
> ---> Installing application source...
> Found 'composer.json', installing dependencies using composer.phar...
>   % Total% Received % Xferd  Average Speed   TimeTime Time
>  Current
>  Dload  Upload   Total   SpentLeft
>  Speed
>
>   0 00 00 0  0  0 --:--:-- --:--:-- --:--:--
>   0
>   0 00 00 0  0  0 --:--:-- --:--:-- --:--:--
>   0
> 100  298k  100  298k0 0   183k  0  0:00:01  0:00:01 --:--:--
>  183k
> All settings correct for using Composer
> Downloading...
>
> Composer (version 1.4.2) successfully installed to:
> /opt/app-root/src/composer.phar
> Use it: php composer.phar
>
> Loading composer repositories with package information
> Installing dependencies (including require-dev) from lock file
> Package operations: 155 installs, 0 updates, 0 removals
>   - Installing doctrine/lexer (v1.0.1): Downloading (100%)
>   - Installing doctrine/inflector (v1.1.0): Downloading (100%)
>   - Installing privaterepo/someproject (1.0.1): Cloning 
> .
> .
>
>
>
>
>
>   [RuntimeException]
>
>
>
>   Failed to execute git clone --no-checkout 'g...@bitbucket.org:blah/foo.git'
> '/opt/app-root/src/vendor/privaterepo/someproject' && cd
> '/opt/app-root/src/vendor/privaterepo/someproject' && git remote add
> composer 'g...@bitbucket.org:blah/foo.git' && git fetch composer
>   Host key verification failed.
>
>
>
>   fatal: Could not read from remote repository.
>
>
>
>   Please make sure you have the correct access rights
>
>
>
>   and the repository exists.
>
>
>
> --
>
> The same key is actually used to auth to main repo as well as the one used
> by the composer.
> I checked that by cloning the repos manually.
>
>
> What is the "proper" way to put the required key inside the builder so
> that composer can use it to access the private repos?
>

i'm not sure how to feed the key to composer (you may need a custom
assemble script to do that) but the right way to make the key available to
the assemble script is described here:

https://docs.openshift.org/latest/dev_guide/builds/build_inputs.html#using-secrets-during-build



>
> best regards
>
>
> --
> Piotr Baranowski
>
> ___
> 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: no mcrypt in s2i-php

2017-07-18 Thread Ben Parees
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 php-mcrypt extension?
>
> It is very popular and I'd say crucial to majority of LAMP apps.
>
> I had to recreate a s2i-php image so it contains the missing php packages,
> but still, I'd like to understand why.
>

It comes down to what packages our SCL team is able to package/maintain.
If there's an SCL package for it, it should be easy to include in the
image, otherwise it will need to be packaged so we can properly
build+maintain/support it.

Note that there's already an issue open requesting this particular package:
https://github.com/sclorg/s2i-php-container/issues/161

I'm also copying Honza who leads the SCL team responsible for the images.




>
> best regards
> --
> Piotr Baranowski
>
> ___
> 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


Building php with composer using private repos in composer.json

2017-07-18 Thread Piotr Baranowski
Hey group! 

I'm looking for some tips how to approach a problem I'm facing right now. 

My app is build using php so composer.json is used. 

It works like this: 
The source code of the app itself is on a private bitbucket repo. 
I'm using the ssh secret to pull the source. That part works perfectly. 

Once the source is pulled, composer on the builder s2i image is trying to fetch 
dependencies. 
I fails like this: 

Cloning "g...@bitbucket.org:/y.git" ... 
Commit: b lah 
Author: f oo 
Date: Mon Jul 17 12:12:22 2017 +0200 
---> Installing application source... 
Found 'composer.json', installing dependencies using composer.phar... 
% Total % Received % Xferd Average Speed Time Time Time Current 
Dload Upload Total Spent Left Speed 

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 
100 298k 100 298k 0 0 183k 0 0:00:01 0:00:01 --:--:-- 183k 
All settings correct for using Composer 
Downloading... 

Composer (version 1.4.2) successfully installed to: 
/opt/app-root/src/composer.phar 
Use it: php composer.phar 

Loading composer repositories with package information 
Installing dependencies (including require-dev) from lock file 
Package operations: 155 installs, 0 updates, 0 removals 
- Installing doctrine/lexer (v1.0.1): Downloading (100%) 
- Installing doctrine/inflector (v1.1.0): Downloading (100%) 
- Installing privaterepo/someproject (1.0.1): Cloning  
. 
. 

[RuntimeException] 
Failed to execute git clone --no-checkout 'g...@bitbucket.org:blah/foo.git' 
'/opt/app-root/src/vendor/privaterepo/someproject' && cd 
'/opt/app-root/src/vendor/privaterepo/someproject' && git remote add composer 
'g...@bitbucket.org:blah/foo.git' && git fetch composer 
Host key verification failed. 
fatal: Could not read from remote repository. 
Please make sure you have the correct access rights 
and the repository exists. 
-- 
The same key is actually used to auth to main repo as well as the one used by 
the composer. 
I checked that by cloning the repos manually. 


What is the "proper" way to put the required key inside the builder so that 
composer can use it to access the private repos? 

best regards 


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


Re: timeout expired waiting for volumes to attach/mount for pod

2017-07-18 Thread Philippe Lafoucrière
I'm pretty sure it's not related, but I took a look at the git log from the
day we started to have issues, and noticed it was the first time we were
using env vars set from secrets (env[x].valueFrom.secretKeyRef).
Maybe it will ring a bell for someone.
​
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users