Re: [Dev] PPaaS Artifact Migration Tool- Naming Convention for Application ID

2016-01-13 Thread Pubudu Gunatilaka
Hi Malmee,

I would suggest to use application id as alias with application suffix.

For an example if the alias is myphp we can use application id as
myphp-application. This naming convention will be easy to identify
applications rather than using only the alias.

Thank you!

On Wed, Jan 13, 2016 at 12:17 PM, Malmee Weerasinghe 
wrote:

> Hi All,
>
> In the tool that is being developed to convert artifact JSON files of
> PPaaS 4.0.0 to PPaaS 4.1.x, the conversion has to be done as such one
> application has to be created for one subscription. In this conversion what
> should be the naming convention of the application ID? One approach is to
> use 'alias' in subscription data as an ID for a particular application.
>
> Thanks
> --
> Malmee Weerasinghe
> WSO2 Intern
> mobile : (+94)* 71 7601905* |   email :   
> mal...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Pubudu Gunatilaka*
Committer and PMC Member - Apache Stratos
Software Engineer
WSO2, Inc.: http://wso2.com
mobile : +94774079049 <%2B94772207163>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PPaaS Artifact Migration Tool- Naming Convention for Application ID

2016-01-13 Thread Vishanth Balasubramaniam
On Wed, Jan 13, 2016 at 6:24 PM, Pubudu Gunatilaka  wrote:

> Hi Malmee,
>
> I would suggest to use application id as alias with application suffix.
>
> For an example if the alias is myphp we can use application id as
> myphp-application. This naming convention will be easy to identify
> applications rather than using only the alias.
>
>
+1


> Thank you!
>
> On Wed, Jan 13, 2016 at 12:17 PM, Malmee Weerasinghe 
> wrote:
>
>> Hi All,
>>
>> In the tool that is being developed to convert artifact JSON files of
>> PPaaS 4.0.0 to PPaaS 4.1.x, the conversion has to be done as such one
>> application has to be created for one subscription. In this conversion what
>> should be the naming convention of the application ID? One approach is to
>> use 'alias' in subscription data as an ID for a particular application.
>>
>> Thanks
>> --
>> Malmee Weerasinghe
>> WSO2 Intern
>> mobile : (+94)* 71 7601905* |   email :   
>> mal...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Pubudu Gunatilaka*
> Committer and PMC Member - Apache Stratos
> Software Engineer
> WSO2, Inc.: http://wso2.com
> mobile : +94774079049 <%2B94772207163>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Vishanth Balasubramaniam*
Committer & PMC Member, Apache Stratos,
Software Engineer, WSO2 Inc.; http://wso2.com

mobile: *+94 77 17 377 18*
about me: *http://about.me/vishanth *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PPaaS Artifact Migration Tool- Naming Convention for Application ID

2016-01-13 Thread Imesh Gunaratne
On Wed, Jan 13, 2016 at 6:24 PM, Pubudu Gunatilaka  wrote:

> Hi Malmee,
>
> I would suggest to use application id as alias with application suffix.
>
> For an example if the alias is myphp we can use application id as
> myphp-application. This naming convention will be easy to identify
> applications rather than using only the alias.
>

+1

>
> Thank you!
>
> On Wed, Jan 13, 2016 at 12:17 PM, Malmee Weerasinghe 
> wrote:
>
>> Hi All,
>>
>> In the tool that is being developed to convert artifact JSON files of
>> PPaaS 4.0.0 to PPaaS 4.1.x, the conversion has to be done as such one
>> application has to be created for one subscription. In this conversion what
>> should be the naming convention of the application ID? One approach is to
>> use 'alias' in subscription data as an ID for a particular application.
>>
>> Thanks
>> --
>> Malmee Weerasinghe
>> WSO2 Intern
>> mobile : (+94)* 71 7601905* |   email :   
>> mal...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Pubudu Gunatilaka*
> Committer and PMC Member - Apache Stratos
> Software Engineer
> WSO2, Inc.: http://wso2.com
> mobile : +94774079049 <%2B94772207163>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.gunaratne.org
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PPaaS Artifact Migration Tool

2015-12-16 Thread Imesh Gunaratne
Udara should be able to provide more information on this, AFAIU we should
be able to map PersistenceBean.isRequired ->
Persistence.localPersistanceRequired.
May be other properties we can let the user fill in.

Thanks

On Wed, Dec 16, 2015 at 12:22 PM, Nishadi Kirielle  wrote:

> Hi Imesh,
>
> In the mapping between cartridges, there's a conflict between the
> Persistence.class of PPaaS 4.0.0 (package
> org.apache.stratos.cloud.controller.stub.pojo) and the
> PersistenceBean.class of PPaaS 4.1.0 (package
> org.apache.stratos.common.beans.cartridge).
>
> PersistenceBean
>   -isRequired
>
> Persistence
>   -localPersistanceRequired
>   -localPersistanceRequiredTracker
>   -localVolumesTracker
>
>
> Out of the above mentioned artifacts of PPaaS 4.1.0, what should be
> mapped with isRequired artifact of PPaaS 4.1.0?
>
> Thank you
>
>
> On Wed, Dec 16, 2015 at 10:04 AM, Nishadi Kirielle 
> wrote:
> > Hi Imesh,
> >
> > We will send a pull request as soon as possible. The remaining tasks and
> the
> > rough time plan as follows;
> >
> > 2015/12/16
> > 1. Update the bean classes and add dependencies
> > 2. Add test cases
> > 3. Make the file names configurable via a configuration file
> >
> > 2015/12/17
> > 4. Update errors in exception handling
> > 5. Update autoscaling policy mapping using average values
> > 6. Add default values to missing artifacts
> >
> > 2015/12/18
> > 7. Use of Apache http client library to write the rest client
> > 8. Update deploying scripts
> >
> > Thanks
> >
> > On Tue, Dec 15, 2015 at 4:33 PM, Imesh Gunaratne  wrote:
> >>
> >> Thanks Nishadi, may be you can update the same PR or send a new one with
> >> the improvements. Please try to list down the remaining tasks and a
> rough
> >> time plan.
> >>
> >> Thanks
> >>
> >> On Tue, Dec 15, 2015 at 1:42 PM, Nishadi Kirielle 
> >> wrote:
> >>>
> >>> Hi,
> >>> We have implemented the conversion of cartridge subscription artifacts
> to
> >>> application signups and domain mapping subscriptions. In addition, we
> were
> >>> able to integrate the https connection with the tool.[1] Currently, we
> are
> >>> trying to deploy the artifacts in PPaaS 4.1.0.
> >>>
> >>> [1]
> >>>
> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
> >>>
> >>> Thanks
> >>>
> >>> On Tue, Dec 15, 2015 at 12:55 PM, Imesh Gunaratne 
> wrote:
> 
>  Hi Nishadi,
> 
>  Would you mind sharing the latest status of your efforts on this?
> 
>  Thanks
> 
>  On Wed, Dec 9, 2015 at 3:48 PM, Akila Ravihansa Perera
>   wrote:
> >
> > Hi,
> >
> > Here are some important improvements that you can do to boost your
> > development productivity and stability of the tool.
> >
> > 1. Develop a set of Unit tests with an embedded web container to mock
> > the PPaaS API.
> >
> >  - I've already done this as a demo for you to take as a reference
> > guide at [1]. I've used Jetty web container as an embedded server in
> my
> > JUnit test case to mock the API. I've hosted partition list API in
> my test
> > server and assert whether artifact loader reads the partition list
> > correctly.
> >
> > Advantage of this approach is that when you build your tool, it will
> > compile the code, test and validate the functionality and package.
> You don't
> > need to test the tool manually which is very time consuming. You may
> have to
> > refactor/re-organize stuff I've developed to make things clean.
> >
> > 2. Create a class ArtifactConverterRestClient as a wrapper around
> > HttpClient library and use it to fetch resources from Stratos API.
> You can
> > create methods like getPartitionList, getAutoscalePolicyList etc. in
> this.
> > Decouple your conversion logic from data transfer layer much as
> possible.
> > This will make it easy for you to write tests.
> >
> >
> > 3. Always use HTTPS if you are sending/receiving sensitive
> information.
> > In current implementation the tool is passing authentication
> credentials to
> > the server, therefore transport should be secure.
> >
> > 4. Make user input parameters configurable via configuration files.
> > Currently the tool expects username, password, url etc. as user
> inputs.
> > Make it read these values from a properties file and prompt only if
> those
> > values are missing.
> >
> > [1] https://github.com/nishadi/product-private-paas/pull/1
> >
> > Thanks.
> >
> > On Mon, Dec 7, 2015 at 12:19 PM, Nishadi Kirielle 
> > wrote:
> >>
> >> Hi,
> >>
> >> Thank you for the feedback.
> >>
> >> @Imesh:
> >> I have updated the README file[1] in mark down text format and will
> >> start writing the Wiki page.
> >>
> >> @Gayan:
> >> In the 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-16 Thread Nishadi Kirielle
Thank you

On Wed, Dec 16, 2015 at 1:56 PM, Imesh Gunaratne  wrote:
> Udara should be able to provide more information on this, AFAIU we should be
> able to map PersistenceBean.isRequired ->
> Persistence.localPersistanceRequired. May be other properties we can let the
> user fill in.
>
> Thanks
>
> On Wed, Dec 16, 2015 at 12:22 PM, Nishadi Kirielle  wrote:
>>
>> Hi Imesh,
>>
>> In the mapping between cartridges, there's a conflict between the
>> Persistence.class of PPaaS 4.0.0 (package
>> org.apache.stratos.cloud.controller.stub.pojo) and the
>> PersistenceBean.class of PPaaS 4.1.0 (package
>> org.apache.stratos.common.beans.cartridge).
>>
>> PersistenceBean
>>   -isRequired
>>
>> Persistence
>>   -localPersistanceRequired
>>   -localPersistanceRequiredTracker
>>   -localVolumesTracker
>>
>>
>> Out of the above mentioned artifacts of PPaaS 4.1.0, what should be
>> mapped with isRequired artifact of PPaaS 4.1.0?
>>
>> Thank you
>>
>>
>> On Wed, Dec 16, 2015 at 10:04 AM, Nishadi Kirielle 
>> wrote:
>> > Hi Imesh,
>> >
>> > We will send a pull request as soon as possible. The remaining tasks and
>> > the
>> > rough time plan as follows;
>> >
>> > 2015/12/16
>> > 1. Update the bean classes and add dependencies
>> > 2. Add test cases
>> > 3. Make the file names configurable via a configuration file
>> >
>> > 2015/12/17
>> > 4. Update errors in exception handling
>> > 5. Update autoscaling policy mapping using average values
>> > 6. Add default values to missing artifacts
>> >
>> > 2015/12/18
>> > 7. Use of Apache http client library to write the rest client
>> > 8. Update deploying scripts
>> >
>> > Thanks
>> >
>> > On Tue, Dec 15, 2015 at 4:33 PM, Imesh Gunaratne  wrote:
>> >>
>> >> Thanks Nishadi, may be you can update the same PR or send a new one
>> >> with
>> >> the improvements. Please try to list down the remaining tasks and a
>> >> rough
>> >> time plan.
>> >>
>> >> Thanks
>> >>
>> >> On Tue, Dec 15, 2015 at 1:42 PM, Nishadi Kirielle 
>> >> wrote:
>> >>>
>> >>> Hi,
>> >>> We have implemented the conversion of cartridge subscription artifacts
>> >>> to
>> >>> application signups and domain mapping subscriptions. In addition, we
>> >>> were
>> >>> able to integrate the https connection with the tool.[1] Currently, we
>> >>> are
>> >>> trying to deploy the artifacts in PPaaS 4.1.0.
>> >>>
>> >>> [1]
>> >>>
>> >>> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>> >>>
>> >>> Thanks
>> >>>
>> >>> On Tue, Dec 15, 2015 at 12:55 PM, Imesh Gunaratne 
>> >>> wrote:
>> 
>>  Hi Nishadi,
>> 
>>  Would you mind sharing the latest status of your efforts on this?
>> 
>>  Thanks
>> 
>>  On Wed, Dec 9, 2015 at 3:48 PM, Akila Ravihansa Perera
>>   wrote:
>> >
>> > Hi,
>> >
>> > Here are some important improvements that you can do to boost your
>> > development productivity and stability of the tool.
>> >
>> > 1. Develop a set of Unit tests with an embedded web container to
>> > mock
>> > the PPaaS API.
>> >
>> >  - I've already done this as a demo for you to take as a reference
>> > guide at [1]. I've used Jetty web container as an embedded server in
>> > my
>> > JUnit test case to mock the API. I've hosted partition list API in
>> > my test
>> > server and assert whether artifact loader reads the partition list
>> > correctly.
>> >
>> > Advantage of this approach is that when you build your tool, it will
>> > compile the code, test and validate the functionality and package.
>> > You don't
>> > need to test the tool manually which is very time consuming. You may
>> > have to
>> > refactor/re-organize stuff I've developed to make things clean.
>> >
>> > 2. Create a class ArtifactConverterRestClient as a wrapper around
>> > HttpClient library and use it to fetch resources from Stratos API.
>> > You can
>> > create methods like getPartitionList, getAutoscalePolicyList etc. in
>> > this.
>> > Decouple your conversion logic from data transfer layer much as
>> > possible.
>> > This will make it easy for you to write tests.
>> >
>> >
>> > 3. Always use HTTPS if you are sending/receiving sensitive
>> > information.
>> > In current implementation the tool is passing authentication
>> > credentials to
>> > the server, therefore transport should be secure.
>> >
>> > 4. Make user input parameters configurable via configuration files.
>> > Currently the tool expects username, password, url etc. as user
>> > inputs.
>> > Make it read these values from a properties file and prompt only if
>> > those
>> > values are missing.
>> >
>> > [1] https://github.com/nishadi/product-private-paas/pull/1
>> >
>> > Thanks.
>> >
>> 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-15 Thread Nishadi Kirielle
Hi,
We have implemented the conversion of cartridge subscription artifacts to
application signups and domain mapping subscriptions. In addition, we were
able to integrate the https connection with the tool.[1] Currently, we are
trying to deploy the artifacts in PPaaS 4.1.0.

[1]
https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter

Thanks

On Tue, Dec 15, 2015 at 12:55 PM, Imesh Gunaratne  wrote:

> Hi Nishadi,
>
> Would you mind sharing the latest status of your efforts on this?
>
> Thanks
>
> On Wed, Dec 9, 2015 at 3:48 PM, Akila Ravihansa Perera  > wrote:
>
>> Hi,
>>
>> Here are some important improvements that you can do to boost your
>> development productivity and stability of the tool.
>>
>> 1. Develop a set of Unit tests with an embedded web container to mock the
>> PPaaS API.
>>
>>  - I've already done this as a demo for you to take as a reference guide
>> at [1]. I've used Jetty web container as an embedded server in my JUnit
>> test case to mock the API. I've hosted partition list API in my test server
>> and assert whether artifact loader reads the partition list correctly.
>>
>> Advantage of this approach is that when you build your tool, it will
>> compile the code, test and validate the functionality and package. You
>> don't need to test the tool manually which is very time consuming. You may
>> have to refactor/re-organize stuff I've developed to make things clean.
>>
>> 2. Create a class ArtifactConverterRestClient as a wrapper around
>> HttpClient library and use it to fetch resources from Stratos API. You can
>> create methods like getPartitionList, getAutoscalePolicyList etc. in this.
>> Decouple your conversion logic from data transfer layer much as possible.
>> This will make it easy for you to write tests.
>>
>>
>> 3. Always use HTTPS if you are sending/receiving sensitive information.
>> In current implementation the tool is passing authentication credentials to
>> the server, therefore transport should be secure.
>>
>> 4. Make user input parameters configurable via configuration files.
>> Currently the tool expects username, password, url etc. as user inputs.
>> Make it read these values from a properties file and prompt only if those
>> values are missing.
>>
>> [1] https://github.com/nishadi/product-private-paas/pull/1
>>
>> Thanks.
>>
>> On Mon, Dec 7, 2015 at 12:19 PM, Nishadi Kirielle 
>> wrote:
>>
>>> Hi,
>>>
>>> Thank you for the feedback.
>>>
>>> @Imesh:
>>> I have updated the README file[1] in mark down text format and will
>>> start writing the Wiki page.
>>>
>>> @Gayan:
>>> In the initial version, we have used sample json files as templates and
>>> used them to be default values. But as it has some conflicts, we have
>>> removed the use of template files. The current approach is to fetch the
>>> artifacts from the PPaaS 4.0.0 and convert it to PPaaS 4.1.0 without using
>>> any default values. I have updated the READ ME file [1]
>>>
>>> @Isuru:
>>> I will take the approach proposed to handle exceptions in
>>> OldArtifactLoader by wrapping them in a custom exception and update it. I
>>> will update the log4j properties file to be in the conf directory.
>>>
>>> [1]
>>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README
>>>
>>> Thank you,
>>> Nishadi
>>>
>>> On Sun, Dec 6, 2015 at 9:28 AM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Malmee and Nishadi,

 Good progress in a short time!

 Had a glance at the code, couple of things I noticed:

1. log4j.properties file is available under conf directory as well
as the resources directory. Ideally should be in conf directory.
2. In the class OldArtifactLoader [1], the methods are throwing
IOException in an error scenario. A better approach would be to wrap 
 that
with a custom exception (ex.: ArtifactLoadingException, etc.) and throw 
 it.
WDYT? In the class Transformation [2], this approach is followed.

 [1].
 https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/loader/OldArtifactLoader.java

 [2].
 https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/Transformation.java

 On Sat, Dec 5, 2015 at 10:25 PM, Gayan Gunarathne 
 wrote:

> Great stuff. This is a really important tool in the case of Private
> PaaS migration.
>
> As per the README[1] it mention as "Add the default values to the
> templates folder, if needed".I am not clear on that? Are we packing the
> 4.1.0 artifacts templates with the artifact migration tool? So user need 
> to
> put the default values for those artifacts?
>
> 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-15 Thread Imesh Gunaratne
Thanks Nishadi, may be you can update the same PR or send a new one with
the improvements. Please try to list down the remaining tasks and a rough
time plan.

Thanks

On Tue, Dec 15, 2015 at 1:42 PM, Nishadi Kirielle  wrote:

> Hi,
> We have implemented the conversion of cartridge subscription artifacts to
> application signups and domain mapping subscriptions. In addition, we were
> able to integrate the https connection with the tool.[1] Currently, we are
> trying to deploy the artifacts in PPaaS 4.1.0.
>
> [1]
> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>
> Thanks
>
> On Tue, Dec 15, 2015 at 12:55 PM, Imesh Gunaratne  wrote:
>
>> Hi Nishadi,
>>
>> Would you mind sharing the latest status of your efforts on this?
>>
>> Thanks
>>
>> On Wed, Dec 9, 2015 at 3:48 PM, Akila Ravihansa Perera <
>> raviha...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Here are some important improvements that you can do to boost your
>>> development productivity and stability of the tool.
>>>
>>> 1. Develop a set of Unit tests with an embedded web container to mock
>>> the PPaaS API.
>>>
>>>  - I've already done this as a demo for you to take as a reference guide
>>> at [1]. I've used Jetty web container as an embedded server in my JUnit
>>> test case to mock the API. I've hosted partition list API in my test server
>>> and assert whether artifact loader reads the partition list correctly.
>>>
>>> Advantage of this approach is that when you build your tool, it will
>>> compile the code, test and validate the functionality and package. You
>>> don't need to test the tool manually which is very time consuming. You may
>>> have to refactor/re-organize stuff I've developed to make things clean.
>>>
>>> 2. Create a class ArtifactConverterRestClient as a wrapper around
>>> HttpClient library and use it to fetch resources from Stratos API. You can
>>> create methods like getPartitionList, getAutoscalePolicyList etc. in this.
>>> Decouple your conversion logic from data transfer layer much as possible.
>>> This will make it easy for you to write tests.
>>>
>>>
>>> 3. Always use HTTPS if you are sending/receiving sensitive information.
>>> In current implementation the tool is passing authentication credentials to
>>> the server, therefore transport should be secure.
>>>
>>> 4. Make user input parameters configurable via configuration files.
>>> Currently the tool expects username, password, url etc. as user inputs.
>>> Make it read these values from a properties file and prompt only if those
>>> values are missing.
>>>
>>> [1] https://github.com/nishadi/product-private-paas/pull/1
>>>
>>> Thanks.
>>>
>>> On Mon, Dec 7, 2015 at 12:19 PM, Nishadi Kirielle 
>>> wrote:
>>>
 Hi,

 Thank you for the feedback.

 @Imesh:
 I have updated the README file[1] in mark down text format and will
 start writing the Wiki page.

 @Gayan:
 In the initial version, we have used sample json files as templates and
 used them to be default values. But as it has some conflicts, we have
 removed the use of template files. The current approach is to fetch the
 artifacts from the PPaaS 4.0.0 and convert it to PPaaS 4.1.0 without using
 any default values. I have updated the READ ME file [1]

 @Isuru:
 I will take the approach proposed to handle exceptions in
 OldArtifactLoader by wrapping them in a custom exception and update it. I
 will update the log4j properties file to be in the conf directory.

 [1]
 https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README

 Thank you,
 Nishadi

 On Sun, Dec 6, 2015 at 9:28 AM, Isuru Haththotuwa 
 wrote:

> Hi Malmee and Nishadi,
>
> Good progress in a short time!
>
> Had a glance at the code, couple of things I noticed:
>
>1. log4j.properties file is available under conf directory as well
>as the resources directory. Ideally should be in conf directory.
>2. In the class OldArtifactLoader [1], the methods are throwing
>IOException in an error scenario. A better approach would be to wrap 
> that
>with a custom exception (ex.: ArtifactLoadingException, etc.) and 
> throw it.
>WDYT? In the class Transformation [2], this approach is followed.
>
> [1].
> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/loader/OldArtifactLoader.java
>
> [2].
> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/Transformation.java
>
> On Sat, Dec 5, 2015 at 10:25 PM, Gayan Gunarathne 
> wrote:
>
>> Great stuff. This is a 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-15 Thread Nishadi Kirielle
Hi Imesh,

We will send a pull request as soon as possible. The remaining tasks and
the rough time plan as follows;

2015/12/16
1. Update the bean classes and add dependencies
2. Add test cases
3. Make the file names configurable via a configuration file

2015/12/17
4. Update errors in exception handling
5. Update autoscaling policy mapping using average values
6. Add default values to missing artifacts

2015/12/18
7. Use of Apache http client library to write the rest client
8. Update deploying scripts

Thanks

On Tue, Dec 15, 2015 at 4:33 PM, Imesh Gunaratne  wrote:

> Thanks Nishadi, may be you can update the same PR or send a new one with
> the improvements. Please try to list down the remaining tasks and a rough
> time plan.
>
> Thanks
>
> On Tue, Dec 15, 2015 at 1:42 PM, Nishadi Kirielle 
> wrote:
>
>> Hi,
>> We have implemented the conversion of cartridge subscription artifacts
>> to application signups and domain mapping subscriptions. In addition, we
>> were able to integrate the https connection with the tool.[1] Currently, we
>> are trying to deploy the artifacts in PPaaS 4.1.0.
>>
>> [1]
>> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>>
>> Thanks
>>
>> On Tue, Dec 15, 2015 at 12:55 PM, Imesh Gunaratne  wrote:
>>
>>> Hi Nishadi,
>>>
>>> Would you mind sharing the latest status of your efforts on this?
>>>
>>> Thanks
>>>
>>> On Wed, Dec 9, 2015 at 3:48 PM, Akila Ravihansa Perera <
>>> raviha...@wso2.com> wrote:
>>>
 Hi,

 Here are some important improvements that you can do to boost your
 development productivity and stability of the tool.

 1. Develop a set of Unit tests with an embedded web container to mock
 the PPaaS API.

  - I've already done this as a demo for you to take as a reference
 guide at [1]. I've used Jetty web container as an embedded server in my
 JUnit test case to mock the API. I've hosted partition list API in my test
 server and assert whether artifact loader reads the partition list
 correctly.

 Advantage of this approach is that when you build your tool, it will
 compile the code, test and validate the functionality and package. You
 don't need to test the tool manually which is very time consuming. You may
 have to refactor/re-organize stuff I've developed to make things clean.

 2. Create a class ArtifactConverterRestClient as a wrapper around
 HttpClient library and use it to fetch resources from Stratos API. You can
 create methods like getPartitionList, getAutoscalePolicyList etc. in this.
 Decouple your conversion logic from data transfer layer much as possible.
 This will make it easy for you to write tests.


 3. Always use HTTPS if you are sending/receiving sensitive information.
 In current implementation the tool is passing authentication credentials to
 the server, therefore transport should be secure.

 4. Make user input parameters configurable via configuration files.
 Currently the tool expects username, password, url etc. as user inputs.
 Make it read these values from a properties file and prompt only if those
 values are missing.

 [1] https://github.com/nishadi/product-private-paas/pull/1

 Thanks.

 On Mon, Dec 7, 2015 at 12:19 PM, Nishadi Kirielle 
 wrote:

> Hi,
>
> Thank you for the feedback.
>
> @Imesh:
> I have updated the README file[1] in mark down text format and will
> start writing the Wiki page.
>
> @Gayan:
> In the initial version, we have used sample json files as templates
> and used them to be default values. But as it has some conflicts, we have
> removed the use of template files. The current approach is to fetch the
> artifacts from the PPaaS 4.0.0 and convert it to PPaaS 4.1.0 without using
> any default values. I have updated the READ ME file [1]
>
> @Isuru:
> I will take the approach proposed to handle exceptions in
> OldArtifactLoader by wrapping them in a custom exception and update it. I
> will update the log4j properties file to be in the conf directory.
>
> [1]
> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README
>
> Thank you,
> Nishadi
>
> On Sun, Dec 6, 2015 at 9:28 AM, Isuru Haththotuwa 
> wrote:
>
>> Hi Malmee and Nishadi,
>>
>> Good progress in a short time!
>>
>> Had a glance at the code, couple of things I noticed:
>>
>>1. log4j.properties file is available under conf directory as
>>well as the resources directory. Ideally should be in conf directory.
>>2. In the class OldArtifactLoader [1], the methods are throwing
>>IOException in an error scenario. A better approach would be to wrap 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-15 Thread Nishadi Kirielle
Hi Imesh,

In the mapping between cartridges, there's a conflict between the
Persistence.class of PPaaS 4.0.0 (package
org.apache.stratos.cloud.controller.stub.pojo) and the
PersistenceBean.class of PPaaS 4.1.0 (package
org.apache.stratos.common.beans.cartridge).

PersistenceBean
  -isRequired

Persistence
  -localPersistanceRequired
  -localPersistanceRequiredTracker
  -localVolumesTracker


Out of the above mentioned artifacts of PPaaS 4.1.0, what should be
mapped with isRequired artifact of PPaaS 4.1.0?

Thank you


On Wed, Dec 16, 2015 at 10:04 AM, Nishadi Kirielle  wrote:
> Hi Imesh,
>
> We will send a pull request as soon as possible. The remaining tasks and the
> rough time plan as follows;
>
> 2015/12/16
> 1. Update the bean classes and add dependencies
> 2. Add test cases
> 3. Make the file names configurable via a configuration file
>
> 2015/12/17
> 4. Update errors in exception handling
> 5. Update autoscaling policy mapping using average values
> 6. Add default values to missing artifacts
>
> 2015/12/18
> 7. Use of Apache http client library to write the rest client
> 8. Update deploying scripts
>
> Thanks
>
> On Tue, Dec 15, 2015 at 4:33 PM, Imesh Gunaratne  wrote:
>>
>> Thanks Nishadi, may be you can update the same PR or send a new one with
>> the improvements. Please try to list down the remaining tasks and a rough
>> time plan.
>>
>> Thanks
>>
>> On Tue, Dec 15, 2015 at 1:42 PM, Nishadi Kirielle 
>> wrote:
>>>
>>> Hi,
>>> We have implemented the conversion of cartridge subscription artifacts to
>>> application signups and domain mapping subscriptions. In addition, we were
>>> able to integrate the https connection with the tool.[1] Currently, we are
>>> trying to deploy the artifacts in PPaaS 4.1.0.
>>>
>>> [1]
>>> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>>>
>>> Thanks
>>>
>>> On Tue, Dec 15, 2015 at 12:55 PM, Imesh Gunaratne  wrote:

 Hi Nishadi,

 Would you mind sharing the latest status of your efforts on this?

 Thanks

 On Wed, Dec 9, 2015 at 3:48 PM, Akila Ravihansa Perera
  wrote:
>
> Hi,
>
> Here are some important improvements that you can do to boost your
> development productivity and stability of the tool.
>
> 1. Develop a set of Unit tests with an embedded web container to mock
> the PPaaS API.
>
>  - I've already done this as a demo for you to take as a reference
> guide at [1]. I've used Jetty web container as an embedded server in my
> JUnit test case to mock the API. I've hosted partition list API in my test
> server and assert whether artifact loader reads the partition list
> correctly.
>
> Advantage of this approach is that when you build your tool, it will
> compile the code, test and validate the functionality and package. You 
> don't
> need to test the tool manually which is very time consuming. You may have 
> to
> refactor/re-organize stuff I've developed to make things clean.
>
> 2. Create a class ArtifactConverterRestClient as a wrapper around
> HttpClient library and use it to fetch resources from Stratos API. You can
> create methods like getPartitionList, getAutoscalePolicyList etc. in this.
> Decouple your conversion logic from data transfer layer much as possible.
> This will make it easy for you to write tests.
>
>
> 3. Always use HTTPS if you are sending/receiving sensitive information.
> In current implementation the tool is passing authentication credentials 
> to
> the server, therefore transport should be secure.
>
> 4. Make user input parameters configurable via configuration files.
> Currently the tool expects username, password, url etc. as user inputs.
> Make it read these values from a properties file and prompt only if those
> values are missing.
>
> [1] https://github.com/nishadi/product-private-paas/pull/1
>
> Thanks.
>
> On Mon, Dec 7, 2015 at 12:19 PM, Nishadi Kirielle 
> wrote:
>>
>> Hi,
>>
>> Thank you for the feedback.
>>
>> @Imesh:
>> I have updated the README file[1] in mark down text format and will
>> start writing the Wiki page.
>>
>> @Gayan:
>> In the initial version, we have used sample json files as templates
>> and used them to be default values. But as it has some conflicts, we have
>> removed the use of template files. The current approach is to fetch the
>> artifacts from the PPaaS 4.0.0 and convert it to PPaaS 4.1.0 without 
>> using
>> any default values. I have updated the READ ME file [1]
>>
>> @Isuru:
>> I will take the approach proposed to handle exceptions in
>> OldArtifactLoader by wrapping them in a custom exception and update it. I
>> will update the log4j 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-14 Thread Imesh Gunaratne
Hi Nishadi,

Would you mind sharing the latest status of your efforts on this?

Thanks

On Wed, Dec 9, 2015 at 3:48 PM, Akila Ravihansa Perera 
wrote:

> Hi,
>
> Here are some important improvements that you can do to boost your
> development productivity and stability of the tool.
>
> 1. Develop a set of Unit tests with an embedded web container to mock the
> PPaaS API.
>
>  - I've already done this as a demo for you to take as a reference guide
> at [1]. I've used Jetty web container as an embedded server in my JUnit
> test case to mock the API. I've hosted partition list API in my test server
> and assert whether artifact loader reads the partition list correctly.
>
> Advantage of this approach is that when you build your tool, it will
> compile the code, test and validate the functionality and package. You
> don't need to test the tool manually which is very time consuming. You may
> have to refactor/re-organize stuff I've developed to make things clean.
>
> 2. Create a class ArtifactConverterRestClient as a wrapper around
> HttpClient library and use it to fetch resources from Stratos API. You can
> create methods like getPartitionList, getAutoscalePolicyList etc. in this.
> Decouple your conversion logic from data transfer layer much as possible.
> This will make it easy for you to write tests.
>
>
> 3. Always use HTTPS if you are sending/receiving sensitive information. In
> current implementation the tool is passing authentication credentials to
> the server, therefore transport should be secure.
>
> 4. Make user input parameters configurable via configuration files.
> Currently the tool expects username, password, url etc. as user inputs.
> Make it read these values from a properties file and prompt only if those
> values are missing.
>
> [1] https://github.com/nishadi/product-private-paas/pull/1
>
> Thanks.
>
> On Mon, Dec 7, 2015 at 12:19 PM, Nishadi Kirielle 
> wrote:
>
>> Hi,
>>
>> Thank you for the feedback.
>>
>> @Imesh:
>> I have updated the README file[1] in mark down text format and will
>> start writing the Wiki page.
>>
>> @Gayan:
>> In the initial version, we have used sample json files as templates and
>> used them to be default values. But as it has some conflicts, we have
>> removed the use of template files. The current approach is to fetch the
>> artifacts from the PPaaS 4.0.0 and convert it to PPaaS 4.1.0 without using
>> any default values. I have updated the READ ME file [1]
>>
>> @Isuru:
>> I will take the approach proposed to handle exceptions in
>> OldArtifactLoader by wrapping them in a custom exception and update it. I
>> will update the log4j properties file to be in the conf directory.
>>
>> [1]
>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README
>>
>> Thank you,
>> Nishadi
>>
>> On Sun, Dec 6, 2015 at 9:28 AM, Isuru Haththotuwa 
>> wrote:
>>
>>> Hi Malmee and Nishadi,
>>>
>>> Good progress in a short time!
>>>
>>> Had a glance at the code, couple of things I noticed:
>>>
>>>1. log4j.properties file is available under conf directory as well
>>>as the resources directory. Ideally should be in conf directory.
>>>2. In the class OldArtifactLoader [1], the methods are throwing
>>>IOException in an error scenario. A better approach would be to wrap that
>>>with a custom exception (ex.: ArtifactLoadingException, etc.) and throw 
>>> it.
>>>WDYT? In the class Transformation [2], this approach is followed.
>>>
>>> [1].
>>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/loader/OldArtifactLoader.java
>>>
>>> [2].
>>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/Transformation.java
>>>
>>> On Sat, Dec 5, 2015 at 10:25 PM, Gayan Gunarathne 
>>> wrote:
>>>
 Great stuff. This is a really important tool in the case of Private
 PaaS migration.

 As per the README[1] it mention as "Add the default values to the
 templates folder, if needed".I am not clear on that? Are we packing the
 4.1.0 artifacts templates with the artifact migration tool? So user need to
 put the default values for those artifacts?

 [1]
 https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README

 Thanks,
 Gayan

 On Fri, Dec 4, 2015 at 2:51 PM, Nishadi Kirielle 
 wrote:

> Hi All,
>
> Currently,we are engaged in developing an artifact migration tool to
> be used to fetch the artifact json files from PPaaS 4.0.0 REST API
> endpoints and convert them to be compatible with PPaaS 4.1.0. [1]
>
> We have implemented the conversions for the following artifacts ;
>- auto scale policy 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-09 Thread Akila Ravihansa Perera
Hi,

Here are some important improvements that you can do to boost your
development productivity and stability of the tool.

1. Develop a set of Unit tests with an embedded web container to mock the
PPaaS API.

 - I've already done this as a demo for you to take as a reference guide at
[1]. I've used Jetty web container as an embedded server in my JUnit test
case to mock the API. I've hosted partition list API in my test server and
assert whether artifact loader reads the partition list correctly.

Advantage of this approach is that when you build your tool, it will
compile the code, test and validate the functionality and package. You
don't need to test the tool manually which is very time consuming. You may
have to refactor/re-organize stuff I've developed to make things clean.

2. Create a class ArtifactConverterRestClient as a wrapper around
HttpClient library and use it to fetch resources from Stratos API. You can
create methods like getPartitionList, getAutoscalePolicyList etc. in this.
Decouple your conversion logic from data transfer layer much as possible.
This will make it easy for you to write tests.


3. Always use HTTPS if you are sending/receiving sensitive information. In
current implementation the tool is passing authentication credentials to
the server, therefore transport should be secure.

4. Make user input parameters configurable via configuration files.
Currently the tool expects username, password, url etc. as user inputs.
Make it read these values from a properties file and prompt only if those
values are missing.

[1] https://github.com/nishadi/product-private-paas/pull/1

Thanks.

On Mon, Dec 7, 2015 at 12:19 PM, Nishadi Kirielle  wrote:

> Hi,
>
> Thank you for the feedback.
>
> @Imesh:
> I have updated the README file[1] in mark down text format and will start
> writing the Wiki page.
>
> @Gayan:
> In the initial version, we have used sample json files as templates and
> used them to be default values. But as it has some conflicts, we have
> removed the use of template files. The current approach is to fetch the
> artifacts from the PPaaS 4.0.0 and convert it to PPaaS 4.1.0 without using
> any default values. I have updated the READ ME file [1]
>
> @Isuru:
> I will take the approach proposed to handle exceptions in
> OldArtifactLoader by wrapping them in a custom exception and update it. I
> will update the log4j properties file to be in the conf directory.
>
> [1]
> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README
>
> Thank you,
> Nishadi
>
> On Sun, Dec 6, 2015 at 9:28 AM, Isuru Haththotuwa  wrote:
>
>> Hi Malmee and Nishadi,
>>
>> Good progress in a short time!
>>
>> Had a glance at the code, couple of things I noticed:
>>
>>1. log4j.properties file is available under conf directory as well as
>>the resources directory. Ideally should be in conf directory.
>>2. In the class OldArtifactLoader [1], the methods are throwing
>>IOException in an error scenario. A better approach would be to wrap that
>>with a custom exception (ex.: ArtifactLoadingException, etc.) and throw 
>> it.
>>WDYT? In the class Transformation [2], this approach is followed.
>>
>> [1].
>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/loader/OldArtifactLoader.java
>>
>> [2].
>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/Transformation.java
>>
>> On Sat, Dec 5, 2015 at 10:25 PM, Gayan Gunarathne 
>> wrote:
>>
>>> Great stuff. This is a really important tool in the case of Private PaaS
>>> migration.
>>>
>>> As per the README[1] it mention as "Add the default values to the
>>> templates folder, if needed".I am not clear on that? Are we packing the
>>> 4.1.0 artifacts templates with the artifact migration tool? So user need to
>>> put the default values for those artifacts?
>>>
>>> [1]
>>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README
>>>
>>> Thanks,
>>> Gayan
>>>
>>> On Fri, Dec 4, 2015 at 2:51 PM, Nishadi Kirielle 
>>> wrote:
>>>
 Hi All,

 Currently,we are engaged in developing an artifact migration tool to be
 used to fetch the artifact json files from PPaaS 4.0.0 REST API endpoints
 and convert them to be compatible with PPaaS 4.1.0. [1]

 We have implemented the conversions for the following artifacts ;
- auto scale policy artifacts
- network partition list artifacts
- deployment policy artifacts
- cartridge artifacts

 Now we are implementing the conversion of cartridge subscription
 artifacts to application signups and domain mapping subscriptions.

 Please raise if there are any concerns regarding 

Re: [Dev] PPaaS Artifact Migration Tool

2015-12-06 Thread Nishadi Kirielle
Hi,

Thank you for the feedback.

@Imesh:
I have updated the README file[1] in mark down text format and will start
writing the Wiki page.

@Gayan:
In the initial version, we have used sample json files as templates and
used them to be default values. But as it has some conflicts, we have
removed the use of template files. The current approach is to fetch the
artifacts from the PPaaS 4.0.0 and convert it to PPaaS 4.1.0 without using
any default values. I have updated the READ ME file [1]

@Isuru:
I will take the approach proposed to handle exceptions in OldArtifactLoader
by wrapping them in a custom exception and update it. I will update the
log4j properties file to be in the conf directory.

[1]
https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README

Thank you,
Nishadi

On Sun, Dec 6, 2015 at 9:28 AM, Isuru Haththotuwa  wrote:

> Hi Malmee and Nishadi,
>
> Good progress in a short time!
>
> Had a glance at the code, couple of things I noticed:
>
>1. log4j.properties file is available under conf directory as well as
>the resources directory. Ideally should be in conf directory.
>2. In the class OldArtifactLoader [1], the methods are throwing
>IOException in an error scenario. A better approach would be to wrap that
>with a custom exception (ex.: ArtifactLoadingException, etc.) and throw it.
>WDYT? In the class Transformation [2], this approach is followed.
>
> [1].
> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/loader/OldArtifactLoader.java
>
> [2].
> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/Transformation.java
>
> On Sat, Dec 5, 2015 at 10:25 PM, Gayan Gunarathne  wrote:
>
>> Great stuff. This is a really important tool in the case of Private PaaS
>> migration.
>>
>> As per the README[1] it mention as "Add the default values to the
>> templates folder, if needed".I am not clear on that? Are we packing the
>> 4.1.0 artifacts templates with the artifact migration tool? So user need to
>> put the default values for those artifacts?
>>
>> [1]
>> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README
>>
>> Thanks,
>> Gayan
>>
>> On Fri, Dec 4, 2015 at 2:51 PM, Nishadi Kirielle 
>> wrote:
>>
>>> Hi All,
>>>
>>> Currently,we are engaged in developing an artifact migration tool to be
>>> used to fetch the artifact json files from PPaaS 4.0.0 REST API endpoints
>>> and convert them to be compatible with PPaaS 4.1.0. [1]
>>>
>>> We have implemented the conversions for the following artifacts ;
>>>- auto scale policy artifacts
>>>- network partition list artifacts
>>>- deployment policy artifacts
>>>- cartridge artifacts
>>>
>>> Now we are implementing the conversion of cartridge subscription
>>> artifacts to application signups and domain mapping subscriptions.
>>>
>>> Please raise if there are any concerns regarding this work.
>>>
>>> [1]
>>> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>>>
>>> Thanks
>>> Nishadi
>>>
>>> --
>>> Nishadi Kirielle
>>> *Software Engineering Intern*
>>> Mobile : +94 (0) 714722148
>>> nish...@wso2.com
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* *
>
>
>


-- 
Nishadi Kirielle
*Software Engineering Intern*
Mobile : +94 (0) 714722148
nish...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PPaaS Artifact Migration Tool

2015-12-05 Thread Gayan Gunarathne
Great stuff. This is a really important tool in the case of Private PaaS
migration.

As per the README[1] it mention as "Add the default values to the templates
folder, if needed".I am not clear on that? Are we packing the 4.1.0
artifacts templates with the artifact migration tool? So user need to put
the default values for those artifacts?

[1]
https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README

Thanks,
Gayan

On Fri, Dec 4, 2015 at 2:51 PM, Nishadi Kirielle  wrote:

> Hi All,
>
> Currently,we are engaged in developing an artifact migration tool to be
> used to fetch the artifact json files from PPaaS 4.0.0 REST API endpoints
> and convert them to be compatible with PPaaS 4.1.0. [1]
>
> We have implemented the conversions for the following artifacts ;
>- auto scale policy artifacts
>- network partition list artifacts
>- deployment policy artifacts
>- cartridge artifacts
>
> Now we are implementing the conversion of cartridge subscription
> artifacts to application signups and domain mapping subscriptions.
>
> Please raise if there are any concerns regarding this work.
>
> [1]
> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>
> Thanks
> Nishadi
>
> --
> Nishadi Kirielle
> *Software Engineering Intern*
> Mobile : +94 (0) 714722148
> nish...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PPaaS Artifact Migration Tool

2015-12-05 Thread Isuru Haththotuwa
Hi Malmee and Nishadi,

Good progress in a short time!

Had a glance at the code, couple of things I noticed:

   1. log4j.properties file is available under conf directory as well as
   the resources directory. Ideally should be in conf directory.
   2. In the class OldArtifactLoader [1], the methods are throwing
   IOException in an error scenario. A better approach would be to wrap that
   with a custom exception (ex.: ArtifactLoadingException, etc.) and throw it.
   WDYT? In the class Transformation [2], this approach is followed.

[1].
https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/loader/OldArtifactLoader.java

[2].
https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/src/main/java/org/wso2/ppaas/tools/artifactmigration/Transformation.java

On Sat, Dec 5, 2015 at 10:25 PM, Gayan Gunarathne  wrote:

> Great stuff. This is a really important tool in the case of Private PaaS
> migration.
>
> As per the README[1] it mention as "Add the default values to the
> templates folder, if needed".I am not clear on that? Are we packing the
> 4.1.0 artifacts templates with the artifact migration tool? So user need to
> put the default values for those artifacts?
>
> [1]
> https://github.com/nishadi/product-private-paas/blob/master/tools/migration/ppaas-artifact-converter/README
>
> Thanks,
> Gayan
>
> On Fri, Dec 4, 2015 at 2:51 PM, Nishadi Kirielle  wrote:
>
>> Hi All,
>>
>> Currently,we are engaged in developing an artifact migration tool to be
>> used to fetch the artifact json files from PPaaS 4.0.0 REST API endpoints
>> and convert them to be compatible with PPaaS 4.1.0. [1]
>>
>> We have implemented the conversions for the following artifacts ;
>>- auto scale policy artifacts
>>- network partition list artifacts
>>- deployment policy artifacts
>>- cartridge artifacts
>>
>> Now we are implementing the conversion of cartridge subscription
>> artifacts to application signups and domain mapping subscriptions.
>>
>> Please raise if there are any concerns regarding this work.
>>
>> [1]
>> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>>
>> Thanks
>> Nishadi
>>
>> --
>> Nishadi Kirielle
>> *Software Engineering Intern*
>> Mobile : +94 (0) 714722148
>> nish...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] PPaaS Artifact Migration Tool

2015-12-04 Thread Imesh Gunaratne
Great work Nishadi and Malmee!

Will arrange another code review once you are done with the current
implementation. Please try to use mark down text format for the README file
and write a Wiki page in the documentation describing how to use this tool
for migration. Might be better to include few screenshots.

Thanks

On Fri, Dec 4, 2015 at 2:51 PM, Nishadi Kirielle  wrote:

> Hi All,
>
> Currently,we are engaged in developing an artifact migration tool to be
> used to fetch the artifact json files from PPaaS 4.0.0 REST API endpoints
> and convert them to be compatible with PPaaS 4.1.0. [1]
>
> We have implemented the conversions for the following artifacts ;
>- auto scale policy artifacts
>- network partition list artifacts
>- deployment policy artifacts
>- cartridge artifacts
>
> Now we are implementing the conversion of cartridge subscription
> artifacts to application signups and domain mapping subscriptions.
>
> Please raise if there are any concerns regarding this work.
>
> [1]
> https://github.com/nishadi/product-private-paas/tree/master/tools/migration/ppaas-artifact-converter
>
> Thanks
> Nishadi
>
> --
> Nishadi Kirielle
> *Software Engineering Intern*
> Mobile : +94 (0) 714722148
> nish...@wso2.com
>



-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.gunaratne.org
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev