On Tue, Sep 5, 2017 at 10:28 AM, Youcef HILEM <youcef.hi...@laposte.fr>
 wrote:

> Hi Imesh,
>
> That's what I was looking for.
>

Thanks for your feedback Youcef!


> Before this solution, to avoid creating as many docker images as
> environments and components, and taking into account the current limit
> (https://github.com/wso2/kubernetes-apim/issues/15), I planned to use the
> solution (https://github.com/eleks/wso2-dockers)
>

Yes, I went through the above solution and it looks neat! We also
implemented something similar sometime back called Configurator in Python
and later deprecated it:

https://github.com/wso2/private-paas-cartridges/tree/
master/common/configurator/modules/distribution

Please try out the ConfigMaps approach and let us know how it works for
you. Thanks again!

On Wed, Sep 6, 2017 at 8:19 PM, Pubudu Gunatilaka <pubu...@wso2.com> wrote:

> Hi,
>
> I tried ConfigMaps for APIM and encountered the following issues.
>
> 1. When we provide a file as a config, at runtime this file permission is
> set to root:root. As we use wso2user which does not have root permissions,
> we cannot execute the file. This issue came for wso2server.sh file. For
> ConfigMaps, we have only read and write permissions. I was able to set the
> required permission to the file using the init script at server startup. [1]
>

​I did not try to map the bin folder, let me try it out and get back.​

>
> 2. Lose all the files except the added configuration files.
>
> I mounted the bin directory and following is the output of the 'ls-al'
> command for bin directory. I could see only the wso2server.sh file in the
> bin directory.
>

​Yes, that's the expected behaviour.

Since configmaps use volumes to map files to pods, we would need to use
separate mount paths instead of the actual product folders. If we need to
use the actual product folders as the mount paths, we would need to include
all the files in the configmaps.

In EI we have used following folders for mounting config files:

/home/wso2user/wso2ei-6.1.1-conf/integrator/conf
/home/wso2user/wso2ei-6.1.1-conf/integrator/conf-axis2
/home/wso2user/wso2ei-6.1.1-conf/integrator/conf-datasources

https://github.com/wso2/kubernetes-ei/blob/master/pattern-1/integrator-
deployment.yaml#L39

At the container startup we copy them to the relevant product folders:

https://github.com/wso2/kubernetes-ei/blob/master/dockerfiles/integrator/
Dockerfile#L24

Thanks
Imesh

As you can see, this has created a symlink for wso2server.sh file from
> ..data/wso2server.sh location.
>
> drwxrwxrwx.  2 wso2user root  26 Sep  6 14:12
> ..9989_06_09_14_12_05.054012650
> lrwxrwxrwx.  1 wso2user root  31 Sep  6 14:12 ..data ->
> ..9989_06_09_14_12_05.054012650
> lrwxrwxrwx.  1 wso2user root  20 Sep  6 14:12 wso2server.sh ->
> ..data/wso2server.sh
>
> In the sample, I noticed mount paths are not correct [2][3].
>
> It is good if we can limit the number of docker images to 1 and use
> configmaps. But due to the above limitations, I think we need to reconsider
> this approach.
>
> [1] - https://github.com/wso2/kubernetes-apim/blob/2.1.0/base/
> apim/change_ownership.sh
> [2] - https://github.com/wso2/kubernetes-ei/blob/master/pattern-
> 1/integrator-deployment.yaml#L43
> [3] - https://github.com/wso2/kubernetes-ei/blob/master/pattern-
> 1/integrator-deployment.yaml#L45
>
> Thank you!
>
> On Tue, Sep 5, 2017 at 10:28 AM, Youcef HILEM <youcef.hi...@laposte.fr>
> wrote:
>
>> Hi Imesh,
>>
>> That's what I was looking for.
>> Before this solution, to avoid creating as many docker images as
>> environments and components, and taking into account the current limit
>> (https://github.com/wso2/kubernetes-apim/issues/15), I planned to use the
>> solution (https://github.com/eleks/wso2-dockers)
>> I will start with APIM 2.1.0
>> (https://github.com/wso2/kubernetes-apim/tree/2.1.0).
>>
>> Thanks,
>> Youcef HILEM
>>
>>
>>
>> --
>> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Architectur
>> e-f62919.html
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>
>
>
> --
> *Pubudu Gunatilaka*
> Committer and PMC Member - Apache Stratos
> Senior Software Engineer
> WSO2, Inc.: http://wso2.com
> mobile : +94774078049 <%2B94772207163>
>
>


-- 
*Imesh Gunaratne*
Associate Director/Architect
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057 <+94%2077%20374%202057>
W: https://medium.com/@imesh TW: @imesh
lean. enterprise. middleware
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to