Hi Imesh,

Can we share the synapse configs between the nodes in the cluster using
vloume mount?

Thanks

On Thu, May 18, 2017 at 11:36 AM, Imesh Gunaratne <im...@wso2.com> wrote:

> On Wed, Apr 5, 2017 at 10:07 PM, Pubudu Gunatilaka <pubu...@wso2.com>
> wrote:
>
>>
>> We recently introduced rsync for the gateway nodes in docker-compose and
>> I think that change has introduced the user as root [1].
>>
>
> ​May be this can be simplified using a volume mount instead of using rsync.
>
> Thanks
> ​
>
>> Yes, this is not good for the deployment and it is always better use a
>> non-sudo user. This has to be fixed and thank you for pointing this out.
>>
>> Suggested approach regarding the admin credential change is also
>> acceptable and please refer the official doc on password change [2]. You
>> need to change the jndi.properties file as well.
>>
>> [1] - https://github.com/wso2/docker-apim/blob/v2.1.0/docker-com
>> pose/pattern-3/gateway-manager/Dockerfile#L20
>> [2] - https://docs.wso2.com/display/AM210/Maintaining+Logins+and
>> +Passwords#MaintainingLoginsandPasswords-Changingthesuperadminpassword
>>
>> Thank you!
>>
>> On Wed, Apr 5, 2017 at 3:18 PM, Chamara Philips <chcphilips....@gmail.com
>> > wrote:
>>
>>> [Adding Sanjeewa]
>>>
>>> On Wed, Apr 5, 2017 at 3:17 PM, Chamara Philips <
>>> chcphilips....@gmail.com> wrote:
>>>
>>>> Hi devs,
>>>>
>>>> I fixed (temporarily) this by changing the
>>>> supervisord-gateway-manager/worker.conf.
>>>> The reason is that init.sh script is running as root. But the file is
>>>> owned by wso2user and other users can't write to it.
>>>>
>>>> When changed the *user=root in *above conf files, it worked. But this
>>>> is not good for deployment.
>>>>
>>>> Any idea about the root cause of this?
>>>>
>>>> Apart from this, there were few issues which I fixed by changing the
>>>> docker file adding following lines under *USER root.*
>>>>
>>>> RUN chmod 755 /mnt/wso2-artifacts/bin
>>>> RUN chmod -R 755 /mnt/wso2-artifacts/repository
>>>>
>>>> Additionally, in the gateway manager, worker docker files had to add
>>>>
>>>> *RUN rm -r /mnt/wso2*
>>>>
>>>> If not this line [1]
>>>> <https://github.com/wso2/dockerfiles/blob/master/common/scripts/entrypoint.sh#L107>,
>>>> override the changes from wso2-artifacts.
>>>>
>>>> [1] https://github.com/wso2/dockerfiles/blob/master/common/s
>>>> cripts/entrypoint.sh#L107
>>>>
>>>> Regards,
>>>>
>>>> On Wed, Apr 5, 2017 at 12:24 PM, Chamara Philips <
>>>> chcphilips....@gmail.com> wrote:
>>>>
>>>>> Hi devs,
>>>>>
>>>>> When trying to deploy an APIM cluster with the pattern-3, the
>>>>> wso2server.sh in wso2-artifacts/bin of worker and manager nodes, are not
>>>>> copied to the container/wso2-apim/bin as expected. However other
>>>>> configurations in wso2-artifacts/repository are copied.
>>>>>
>>>>> Is there any known reason for that?
>>>>>
>>>>> Worker, Manager nodes are not started with the expected profiles due
>>>>> to this reason. In both nodes, *workerNode=false* and *profile is not
>>>>> assigned*.
>>>>>
>>>>>
>>>>> Additionally what is the preferred way of changing the admin username
>>>>> and password when following the pattern-3? At the moment I am using the
>>>>> following approach.
>>>>>
>>>>> In wso2server.sh =>
>>>>> added
>>>>>
>>>>> -Dwso2.admin.username="$WSO2_ADMIN_USERNAME" \
>>>>> -Dwso2.admin.password="$WSO2_ADMIN_PASSWORD" \
>>>>> to the JAVA_OPTS.
>>>>>
>>>>> Then in user-mgt.xml =>
>>>>>
>>>>> <AdminUser>
>>>>>     <UserName>${wso2.admin.username}</UserName>
>>>>>     <Password>${wso2.admin.password}</Password>
>>>>> </AdminUser>
>>>>>
>>>>> Then in the docker-compose, gave the environment variable for
>>>>> $WSO2_ADMIN_USERNAME, "$WSO2_ADMIN_PASSWORD. This works fine in the
>>>>> keymanager, publisher, store nodes. But not in worker, manager since the
>>>>> wso2server.sh doesn't get copied at all. I have added user-mgt.xml into
>>>>> wso2-artifacts/repository/conf. And they get copied as expected in
>>>>> worker and manager.
>>>>>
>>>>>
>>>>> Is this approach correct for changing the admin username, password in
>>>>> a cluster? Or is there any other way?
>>>>>
>>>>> Regards
>>>>> --
>>>>> --
>>>>> Hareendra Chamara Philips (BSc.Eng(Hons))
>>>>> Sysco acceleration,
>>>>> SyscoLabs(Pvt) Ltd
>>>>> Mobile : +94 (0) 767 184161 <94767184161>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Hareendra Chamara Philips (BSc.Eng(Hons))
>>>> Sysco acceleration,
>>>> SyscoLabs(Pvt) Ltd
>>>> Mobile : +94 (0) 767 184161 <94767184161> | +65 (9) 425 2874
>>>> <6594252874>
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Hareendra Chamara Philips (BSc.Eng(Hons))
>>> Sysco acceleration,
>>> SyscoLabs(Pvt) Ltd
>>> Mobile : +94 (0) 767 184161 <94767184161> | +65 (9) 425 2874
>>> <6594252874>
>>>
>>
>>
>>
>> --
>> *Pubudu Gunatilaka*
>> Committer and PMC Member - Apache Stratos
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> mobile : +94774078049 <%2B94772207163>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Imesh Gunaratne*
> 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
>
>


-- 
-- 
Hareendra Chamara Philips (BSc.Eng(Hons))
Sysco acceleration,
SyscoLabs(Pvt) Ltd
Mobile : +94 (0) 767 184161 <94767184161> | +65 (9) 425 2874 <6594252874>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to