You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Chamila De Alwis <ch...@wso2.com> on 2014/10/09 08:54:09 UTC

Use of payload parameters inside a container

Hi,

When using Kubernetes + Docker setup to spawn instances how are the payload
parameters defined in the properties list of the subscription definition
JSON, passed in to the created container environment?

What is the container equivalent of the meta-data service in IaaS layer?


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Use of payload parameters inside a container

Posted by Chamila De Alwis <ch...@wso2.com>.
Thanks Sajith for the comprehensive reply! I was not able to find the logic
when I tried tracing from the StratosAdmin endpoint.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Thu, Oct 9, 2014 at 3:56 PM, Sajith Kariyawasam <sa...@wso2.com> wrote:

> Hi Chamila,
>
> On Thu, Oct 9, 2014 at 12:24 PM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> Hi,
>>
>> When using Kubernetes + Docker setup to spawn instances how are the
>> payload parameters defined in the properties list of the subscription
>> definition JSON, passed in to the created container environment?
>>
>>
> If you have a look at CloudControllerServiceImpl startContainers method,
> MemberContext's properties contain the payload parameters. Those parameters
> eventually passed as environment variables to the container, you can find
> that logic in
> org.apache.stratos.cloud.controller.functions.MemberContextToKubernetesContainer
> apply method.
>
>
>
>> What is the container equivalent of the meta-data service in IaaS layer?
>> There is no metadata service for containers, as in VM scenario. Therefore
>> those parameters are passed as environment variables, and inside the
>> container values can be obtain as ${ENV_PARAM_NAME}
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>
>
> --
> *Sajith Kariyawasam*
>
>
> *Committer and PMC member, Apache Stratos,WSO2 Inc., http://wso2.com
> <http://wso2.com>AMIE (SL)Mobile: +94772269575*
>

Re: Use of payload parameters inside a container

Posted by Sajith Kariyawasam <sa...@wso2.com>.
Hi Chamila,

On Thu, Oct 9, 2014 at 12:24 PM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi,
>
> When using Kubernetes + Docker setup to spawn instances how are the
> payload parameters defined in the properties list of the subscription
> definition JSON, passed in to the created container environment?
>
>
If you have a look at CloudControllerServiceImpl startContainers method,
MemberContext's properties contain the payload parameters. Those parameters
eventually passed as environment variables to the container, you can find
that logic in
org.apache.stratos.cloud.controller.functions.MemberContextToKubernetesContainer
apply method.



> What is the container equivalent of the meta-data service in IaaS layer?
> There is no metadata service for containers, as in VM scenario. Therefore
> those parameters are passed as environment variables, and inside the
> container values can be obtain as ${ENV_PARAM_NAME}
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 
*Sajith Kariyawasam*


*Committer and PMC member, Apache Stratos,WSO2 Inc., http://wso2.com
<http://wso2.com>AMIE (SL)Mobile: +94772269575*