Re: [Dev] [appcloud] Unable to obtain the list of pods in kubernetes via jaggery app

2016-04-21 Thread Kasun De Silva
Yes, debug the getPods() method in KubernetesProvisioningUtils.java and
check on the the returning object. Also check the label map is correct or
not. Related pods are selected according to the label map.

On Thu, Apr 21, 2016 at 1:43 AM, Sabra Ossen  wrote:

> Hi Kasun,
>
> I also found an article at [1] on the internal structure of the appmgt
> jaggery app. Based on my understanding I haven't called the getPods method
> in the correct jag file which should be the
> modules/application/application.jag file. Apart from modifying the jaggery
> files to add my requirement I will debug the getPods method and post the
> updates in this mail thread.
>
> [1]
> http://wso2.com/library/tutorials/2012/09/customizing-api-store-publisher-part1/
>
> Thanks and Regards.
> Sabra.
>
>
> On Wed, Apr 20, 2016 at 8:46 PM, Kasun De Silva  wrote:
>
>> Hi Sabra,
>>
>> First check the related pod list coming to the Kubernetes Provisioning
>> Component.
>>
>> At this point I would debug getPods() method
>> in KubernetesProvisioningUtils.java and check whether that the correct
>> selector label map and the pod list are available there.
>>
>> Thanks,
>> Kasun
>>
>>
>> On Wed, Apr 20, 2016 at 4:21 AM, Sabra Ossen  wrote:
>>
>>> Hi All,
>>>
>>> I deployed an app in my app cloud local set up and I have modified the
>>> code in "/site/themes/default/templates/home/template.jag" such that once
>>> the application home page is loaded (after the application has been clicked
>>> from the list of created apps) the list of pods for that particular
>>> application should be displayed.
>>>
>>> The code is as follows.
>>>
>>> var KubernetesProvisioningUtils =  
>>> Packages.org.wso2.appcloud.provisioning.runtime.Utils.KubernetesProvisioningUtils;
>>> var Util = Packages.org.wso2.appcloud.core.Util;
>>>
>>> var modManager = jagg.module("manager");
>>> var tenantId = modManager.getTenantId();
>>> var versionHashId = Util.getVersionHashId(applicationName, 
>>> selectedRevision, tenantId);
>>>
>>> var applicationCtx = KubernetesProvisioningUtils.getApplicationContext(
>>> applicationName, selectedRevision, null , modManager.getTenantId(), 
>>> modManager.getTenantDomain(), versionHashId);
>>>
>>> var podList = KubernetesProvisioningUtils.getPods(applicationCtx);
>>>
>>> %>
>>> 
>>> var podList = "<%=podList%>";
>>> alert(podList);
>>> 
>>> <%
>>>
>>>
>>> Using js I printed the podList but it returns "{}".
>>>
>>> I checked the kubernetes cluster and details of the pod which contains
>>> the app can be seen as well. But I cannot obtain it from the jaggery app.
>>> Any help on this issue is appreciated.
>>>
>>> Thanks and Regards.
>>>
>>> --
>>> *Sabra Ossen*
>>> *Software Engineer*
>>> Email: sa...@wso2.com
>>> Mobile: +94 767 837356
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Kasun de Silva*
>> Software Engineer | *WSO2 Inc.*; http://wso2.com
>> lean.enterprise.middleware
>>
>> email   : kas...@wso2.com
>> mobile : +94 77 794 4260
>>
>>
>
>
> --
> *Sabra Ossen*
> *Software Engineer*
> Email: sa...@wso2.com
> Mobile: +94 767 837356
>



-- 
*Kasun de Silva*
Software Engineer | *WSO2 Inc.*; http://wso2.com
lean.enterprise.middleware

email   : kas...@wso2.com
mobile : +94 77 794 4260
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [appcloud] Unable to obtain the list of pods in kubernetes via jaggery app

2016-04-21 Thread Sabra Ossen
Hi Kasun,

I also found an article at [1] on the internal structure of the appmgt
jaggery app. Based on my understanding I haven't called the getPods method
in the correct jag file which should be the
modules/application/application.jag file. Apart from modifying the jaggery
files to add my requirement I will debug the getPods method and post the
updates in this mail thread.

[1]
http://wso2.com/library/tutorials/2012/09/customizing-api-store-publisher-part1/

Thanks and Regards.
Sabra.


On Wed, Apr 20, 2016 at 8:46 PM, Kasun De Silva  wrote:

> Hi Sabra,
>
> First check the related pod list coming to the Kubernetes Provisioning
> Component.
>
> At this point I would debug getPods() method
> in KubernetesProvisioningUtils.java and check whether that the correct
> selector label map and the pod list are available there.
>
> Thanks,
> Kasun
>
>
> On Wed, Apr 20, 2016 at 4:21 AM, Sabra Ossen  wrote:
>
>> Hi All,
>>
>> I deployed an app in my app cloud local set up and I have modified the
>> code in "/site/themes/default/templates/home/template.jag" such that once
>> the application home page is loaded (after the application has been clicked
>> from the list of created apps) the list of pods for that particular
>> application should be displayed.
>>
>> The code is as follows.
>>
>> var KubernetesProvisioningUtils =  
>> Packages.org.wso2.appcloud.provisioning.runtime.Utils.KubernetesProvisioningUtils;
>> var Util = Packages.org.wso2.appcloud.core.Util;
>>
>> var modManager = jagg.module("manager");
>> var tenantId = modManager.getTenantId();
>> var versionHashId = Util.getVersionHashId(applicationName, selectedRevision, 
>> tenantId);
>>
>> var applicationCtx = KubernetesProvisioningUtils.getApplicationContext(
>> applicationName, selectedRevision, null , modManager.getTenantId(), 
>> modManager.getTenantDomain(), versionHashId);
>>
>> var podList = KubernetesProvisioningUtils.getPods(applicationCtx);
>>
>> %>
>> 
>> var podList = "<%=podList%>";
>> alert(podList);
>> 
>> <%
>>
>>
>> Using js I printed the podList but it returns "{}".
>>
>> I checked the kubernetes cluster and details of the pod which contains
>> the app can be seen as well. But I cannot obtain it from the jaggery app.
>> Any help on this issue is appreciated.
>>
>> Thanks and Regards.
>>
>> --
>> *Sabra Ossen*
>> *Software Engineer*
>> Email: sa...@wso2.com
>> Mobile: +94 767 837356
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Kasun de Silva*
> Software Engineer | *WSO2 Inc.*; http://wso2.com
> lean.enterprise.middleware
>
> email   : kas...@wso2.com
> mobile : +94 77 794 4260
>
>


-- 
*Sabra Ossen*
*Software Engineer*
Email: sa...@wso2.com
Mobile: +94 767 837356
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [appcloud] Unable to obtain the list of pods in kubernetes via jaggery app

2016-04-20 Thread Kasun De Silva
Hi Sabra,

First check the related pod list coming to the Kubernetes Provisioning
Component.

At this point I would debug getPods() method
in KubernetesProvisioningUtils.java and check whether that the correct
selector label map and the pod list are available there.

Thanks,
Kasun


On Wed, Apr 20, 2016 at 4:21 AM, Sabra Ossen  wrote:

> Hi All,
>
> I deployed an app in my app cloud local set up and I have modified the
> code in "/site/themes/default/templates/home/template.jag" such that once
> the application home page is loaded (after the application has been clicked
> from the list of created apps) the list of pods for that particular
> application should be displayed.
>
> The code is as follows.
>
> var KubernetesProvisioningUtils =  
> Packages.org.wso2.appcloud.provisioning.runtime.Utils.KubernetesProvisioningUtils;
> var Util = Packages.org.wso2.appcloud.core.Util;
>
> var modManager = jagg.module("manager");
> var tenantId = modManager.getTenantId();
> var versionHashId = Util.getVersionHashId(applicationName, selectedRevision, 
> tenantId);
>
> var applicationCtx = KubernetesProvisioningUtils.getApplicationContext(
> applicationName, selectedRevision, null , modManager.getTenantId(), 
> modManager.getTenantDomain(), versionHashId);
>
> var podList = KubernetesProvisioningUtils.getPods(applicationCtx);
>
> %>
> 
> var podList = "<%=podList%>";
> alert(podList);
> 
> <%
>
>
> Using js I printed the podList but it returns "{}".
>
> I checked the kubernetes cluster and details of the pod which contains the
> app can be seen as well. But I cannot obtain it from the jaggery app. Any
> help on this issue is appreciated.
>
> Thanks and Regards.
>
> --
> *Sabra Ossen*
> *Software Engineer*
> Email: sa...@wso2.com
> Mobile: +94 767 837356
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Kasun de Silva*
Software Engineer | *WSO2 Inc.*; http://wso2.com
lean.enterprise.middleware

email   : kas...@wso2.com
mobile : +94 77 794 4260
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [appcloud] Unable to obtain the list of pods in kubernetes via jaggery app

2016-04-20 Thread Sabra Ossen
Hi All,

I deployed an app in my app cloud local set up and I have modified the code
in "/site/themes/default/templates/home/template.jag" such that once the
application home page is loaded (after the application has been clicked
from the list of created apps) the list of pods for that particular
application should be displayed.

The code is as follows.

var KubernetesProvisioningUtils =
Packages.org.wso2.appcloud.provisioning.runtime.Utils.KubernetesProvisioningUtils;
var Util = Packages.org.wso2.appcloud.core.Util;

var modManager = jagg.module("manager");
var tenantId = modManager.getTenantId();
var versionHashId = Util.getVersionHashId(applicationName,
selectedRevision, tenantId);

var applicationCtx = KubernetesProvisioningUtils.getApplicationContext(
applicationName, selectedRevision, null ,
modManager.getTenantId(), modManager.getTenantDomain(),
versionHashId);

var podList = KubernetesProvisioningUtils.getPods(applicationCtx);

%>

var podList = "<%=podList%>";
alert(podList);

<%


Using js I printed the podList but it returns "{}".

I checked the kubernetes cluster and details of the pod which contains the
app can be seen as well. But I cannot obtain it from the jaggery app. Any
help on this issue is appreciated.

Thanks and Regards.

-- 
*Sabra Ossen*
*Software Engineer*
Email: sa...@wso2.com
Mobile: +94 767 837356
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev