This is definitely going to be available for standalone products :) At the moment our target is Cloud deployment. i.e. 4.2.0 products. But, this will definitely added to trunk.
On Sat, Aug 23, 2014 at 9:01 PM, Kasun Gajasinghe <kas...@wso2.com> wrote: > Hi, > > Curious to know couple of things.. > > Will this be available for stand-alone products as well? tenant-deletion > is a requirement for stand-alone products as well, so it would be good if > this is available in stand-alone products as well. > > Where will the development happen? For Carbon trunk, the tenant-mgt code > can be found here [1] and the tenant-mgt code is no longer available in > Stratos. Will you also be using the trunk? > > [1] > https://github.com/wso2/carbon-multitenancy/tree/master/components/tenant-mgt > > Thanks, > KasunG > > > On Sat, Aug 23, 2014 at 8:40 PM, Amila Maha Arachchi <ami...@wso2.com> > wrote: > >> >> >> >> On Sat, Aug 23, 2014 at 3:12 AM, Dimuthu Leelarathne <dimut...@wso2.com> >> wrote: >> >>> >>> >>> >>> On Fri, Aug 22, 2014 at 10:01 PM, Godwin Amila Shrimal <god...@wso2.com> >>> wrote: >>> >>>> >>>> Hi Amila, >>>> >>>> >>>> As per the discussion we had with Dimuthu and AF team. Listed below the >>>> decision made to implement this. >>>> >>>> >>>> 1. Add onDelete() and onPreDelete() methods to TenantMgtListener >>>> interface >>>> >>> >>> Add the onPreDelete() method to TenantMgtListener interface and call >>> that method from the deleteTenant of the TenantMgtService. I don't see the >>> point of adding onDelete method to TenantMgtListenter interface currently. >>> >> >> I see couple of problems with this approach. >> >> 1. Since this involved an interface change, we are going to get trouble >> when using this with existing products in our setup. We'll have to patch >> their tenant.mgt code and all implementations of the listener. >> 2. Even if we add the onPreDelete method, it will only execute the >> implementation classes in that jvm only. So, if I call the deleteTenant >> method in AF, it won't affect other products such as SS, Jenkins AS, >> Stratos Manager. This will end of tenants' bits and pieces remaining in >> other products even after we delete the tenant. >> >> Do we have a solution for this? >> >>> >>> >>> >>>> >>>> >>> 2. Implement those methods in AppFactoryTenantMgtListener as we >>>> discussed. >>>> >>>> 3. We don’t use any BPEL implementation and use the existing listeners >>>> to implement this >>>> >>>> 4. Future Cloud products can implement the onDelete() and >>>> onPreDelete() methods in TenantMgtListener interface >>>> >>>> >>>> >>> thanks, >>> dimuthu >>> >>> >>> >>>> Please share your feedback on this. >>>> >>>> Thanks >>>> Godwin >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Fri, Aug 22, 2014 at 6:09 PM, Amila Maha Arachchi <ami...@wso2.com> >>>> wrote: >>>> >>>>> +1 for preOnDelete method. Actually there is a place which has this >>>>> kind of an implementation. Thats the user.core. So, we can learn from it >>>>> and do this implementation. >>>>> >>>>> BTW, >>>>> >>>>> Mahesh, can you post what did you agreed online+offline? >>>>> >>>>> >>>>> On Fri, Aug 22, 2014 at 4:51 PM, Mahesh Chinthaka <mahe...@wso2.com> >>>>> wrote: >>>>> >>>>>> Thanks Dimuthu, Danushka & Ajanthan for your feedback. >>>>>> We will do this with the approach discussed online+offline. >>>>>> >>>>>> >>>>>> On Fri, Aug 22, 2014 at 10:59 AM, Danushka Fernando < >>>>>> danush...@wso2.com> wrote: >>>>>> >>>>>>> Hi >>>>>>> +1 for the OnPreDelete concept. But the thing is we don't have this >>>>>>> Pre and Post events anywhere in platform. I think that's something we >>>>>>> should consider about. WDYT? >>>>>>> >>>>>>> Thanks & Regards >>>>>>> Danushka Fernando >>>>>>> Software Engineer >>>>>>> WSO2 inc. http://wso2.com/ >>>>>>> Mobile : +94716332729 >>>>>>> >>>>>>> >>>>>>> On Fri, Aug 22, 2014 at 9:14 AM, Dimuthu Leelarathne < >>>>>>> dimut...@wso2.com> wrote: >>>>>>> >>>>>>>> Hi Mahesh all, >>>>>>>> >>>>>>>> Lets consider Carbon Platform aspect first. >>>>>>>> >>>>>>>> Before we remove tenant from user core and registry, we have to >>>>>>>> delete it from all other places. So +1 for the interface that would >>>>>>>> allow >>>>>>>> different product teams to clean up their cleanup process, but here is >>>>>>>> what >>>>>>>> I recommend, >>>>>>>> >>>>>>>> We need a method call "onPreDelete()" on TenantMgtListener. This is >>>>>>>> to allow all product teams to implement it. So the first rule of thumb >>>>>>>> is, >>>>>>>> if any product is moving to cloud they must implement this method and >>>>>>>> prove >>>>>>>> that they clean up the tenant before they move to WSO2Cloud. >>>>>>>> >>>>>>>> So basically, in tenant.core what you have to do is call all OSGi >>>>>>>> registered TenantMgtListener's onPreDelete(), and after that delete >>>>>>>> from >>>>>>>> registry and finally user.core. >>>>>>>> >>>>>>>> That would be the most elegant and extensible fix for platform. >>>>>>>> >>>>>>>> Now we come to AF as a product/solution. We have to implement >>>>>>>> onPreDelete() method. So we as a product team should decide whether we >>>>>>>> are >>>>>>>> going to implement it from BPEL or not. So as a product in order to be >>>>>>>> WSO2Cloud friendly we have to implement onPreDelete() method. From >>>>>>>> what I >>>>>>>> feel, I believe the way to do is code + BPEL. >>>>>>>> >>>>>>>> thanks, >>>>>>>> dimuthu >>>>>>>> >>>>>>>> >>>>>>>> On Fri, Aug 22, 2014 at 7:26 AM, Ajanthan Balachandran < >>>>>>>> ajant...@wso2.com> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Fri, Aug 22, 2014 at 5:48 AM, Danushka Fernando < >>>>>>>>> danush...@wso2.com> wrote: >>>>>>>>> >>>>>>>>>> Hi Ajanthan >>>>>>>>>> Problem with OnDelete is it is called after tenant deleted (After >>>>>>>>>> deleting userstore and registry). But we need to cleanup before that >>>>>>>>>> otherwise we cannot call admin services since tenant is not there. >>>>>>>>>> As per I >>>>>>>>>> mentioned in the previous thread we need to call this at a >>>>>>>>>> OnPreDelete. >>>>>>>>>> >>>>>>>>> IMO OnDelete method should be called as first step. >>>>>>>>> >>>>>>>>>> @Mahesh : I think you have missed delete applications step. And >>>>>>>>>> delete applications step would Issue tracker details as well I >>>>>>>>>> guess. @ >>>>>>>>>> Ajanthan : Correct me if I am wrong. >>>>>>>>>> >>>>>>>>> Looping through each applications and deleting will not be a >>>>>>>>> salable solution. >>>>>>>>> >>>>>>>>>> Thanks & Regards >>>>>>>>>> Danushka Fernando >>>>>>>>>> Software Engineer >>>>>>>>>> WSO2 inc. http://wso2.com/ >>>>>>>>>> Mobile : +94716332729 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Thu, Aug 21, 2014 at 8:46 PM, Ajanthan Balachandran < >>>>>>>>>> ajant...@wso2.com> wrote: >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Thu, Aug 21, 2014 at 8:24 PM, Mahesh Chinthaka < >>>>>>>>>>> mahe...@wso2.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Everyone, >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> We are working on the Training Project -[Cloud] Tenant >>>>>>>>>>>> deletion code/script for cloud - >>>>>>>>>>>> https://redmine.wso2.com/issues/3121. Listed below the >>>>>>>>>>>> workflow of the tenant deletion process in the App Cloud as we >>>>>>>>>>>> identified. >>>>>>>>>>>> >>>>>>>>>>>> 1. Undeploy Jenkins web app from application server >>>>>>>>>>>> >>>>>>>>>>>> 2. Delete Git repository (use gitblit api to delete repo in >>>>>>>>>>>> Git) >>>>>>>>>>>> >>>>>>>>>>>> 3. Unsubscribe Stratos using Stratos Rest Services >>>>>>>>>>>> >>>>>>>>>>>> 4. Check database created by RSSAdmin and delete them >>>>>>>>>>>> >>>>>>>>>>>> 5. Perform TenantMgtAdminService deleteTenant operation >>>>>>>>>>>> >>>>>>>>>>>> - >>>>>>>>>>>> >>>>>>>>>>>> i. Delete Billing data >>>>>>>>>>>> ii. Delete Tenant Registration Data (Ex. REG_CLUSTER_LOCK, >>>>>>>>>>>> REG_LOG) >>>>>>>>>>>> iii. Delete Tenant User management data (Ex. >>>>>>>>>>>> UM_USER_PERMISSION, UM_USER) >>>>>>>>>>>> iv. Remove Tenant information from cache >>>>>>>>>>>> v. Delete UM_TENANT table >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Don't you need to cleanup issue tracker? >>>>>>>>>>> >>>>>>>>>>>> As per the analysis there are two solutions we have identified >>>>>>>>>>>> to implement this , such as BPEL and Carbon Component. We thought >>>>>>>>>>>> of going >>>>>>>>>>>> for a *carbon component* implementation rather than using a* >>>>>>>>>>>> BPEL* due to following reasons. >>>>>>>>>>>> >>>>>>>>>>>> 1. Plugging a Carbon Component will give more extensibility to >>>>>>>>>>>> implement Tenant Deletion operation in future Cloud base products >>>>>>>>>>>> >>>>>>>>>>>> 2. If we used a BPEL we will have to reconstruct at each time >>>>>>>>>>>> when we meet a new requirement (ex: esb cloud integration). >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Proposed Solution >>>>>>>>>>>> >>>>>>>>>>> Why can't you use existing TenantMgtListener and add onDelete >>>>>>>>>>> method.It also has ListenerOrder and every implementation >>>>>>>>>>> should be registered as OSGI service. >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> 1. Create an abstraction for delete operation >>>>>>>>>>>> >>>>>>>>>>>> public interface TenantDeletion{ >>>>>>>>>>>> >>>>>>>>>>>> public void onDeletion(); >>>>>>>>>>>> >>>>>>>>>>>> } >>>>>>>>>>>> >>>>>>>>>>>> 2. Implement TenantDeletion for each operations >>>>>>>>>>>> >>>>>>>>>>>> public class JenkinsAppUndeployer implements TenantDeletion{ >>>>>>>>>>>> >>>>>>>>>>>> public void onDeletion(){ >>>>>>>>>>>> >>>>>>>>>>>> //Implementation of the JenkinsApp undeploy process >>>>>>>>>>>> >>>>>>>>>>>> } >>>>>>>>>>>> >>>>>>>>>>>> } >>>>>>>>>>>> >>>>>>>>>>>> 3. Use a configuration file to maintain the execution order >>>>>>>>>>>> which help to dynamically add new requirement >>>>>>>>>>>> >>>>>>>>>>>> <ExecutionOrder> >>>>>>>>>>>> >>>>>>>>>>>> <class >>>>>>>>>>>> name=”org.wso2.cloud.tenant.JenkinsAppUndeployer”></class> >>>>>>>>>>>> >>>>>>>>>>>> <class name=”org.wso2.cloud.tenant.GitRepoRemover”></class> >>>>>>>>>>>> >>>>>>>>>>>> <class name=”org.wso2.cloud.tenant.XXXXXX”></class> >>>>>>>>>>>> >>>>>>>>>>>> </ExecutionOrder> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> We are looking for a feedback on this to move forward with >>>>>>>>>>>> selected design. >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Mahesh Chinthaka >>>>>>>>>>>> Software Engineer , WSO2. >>>>>>>>>>>> >>>>>>>>>>>> Phone : (+94) 71 63 63 083 >>>>>>>>>>>> Email : mahe...@wso2.com >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Architecture mailing list >>>>>>>>>>>> Architecture@wso2.org >>>>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> ajanthan >>>>>>>>>>> -- >>>>>>>>>>> Ajanthan Balachandiran >>>>>>>>>>> Senior Software Engineer; >>>>>>>>>>> Solutions Technologies Team ;WSO2, Inc.; http://wso2.com/ >>>>>>>>>>> >>>>>>>>>>> email: ajanthan <http://goog_595075977>@wso2.com; cell: >>>>>>>>>>> +94775581497 >>>>>>>>>>> blog: http://bkayts.blogspot.com/ >>>>>>>>>>> >>>>>>>>>>> Lean . Enterprise . Middleware >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Architecture mailing list >>>>>>>>>>> Architecture@wso2.org >>>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Architecture mailing list >>>>>>>>>> Architecture@wso2.org >>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ajanthan >>>>>>>>> -- >>>>>>>>> Ajanthan Balachandiran >>>>>>>>> Senior Software Engineer; >>>>>>>>> Solutions Technologies Team ;WSO2, Inc.; http://wso2.com/ >>>>>>>>> >>>>>>>>> email: ajanthan <http://goog_595075977>@wso2.com; cell: >>>>>>>>> +94775581497 >>>>>>>>> blog: http://bkayts.blogspot.com/ >>>>>>>>> >>>>>>>>> Lean . Enterprise . Middleware >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Architecture mailing list >>>>>>>>> Architecture@wso2.org >>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Dimuthu Leelarathne >>>>>>>> Architect & Product Lead of App Factory >>>>>>>> >>>>>>>> WSO2, Inc. (http://wso2.com) >>>>>>>> email: dimut...@wso2.com >>>>>>>> Mobile : 0773661935 >>>>>>>> >>>>>>>> Lean . Enterprise . Middleware >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Architecture mailing list >>>>>>>> Architecture@wso2.org >>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Architecture mailing list >>>>>>> Architecture@wso2.org >>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Mahesh Chinthaka >>>>>> Software Engineer , WSO2. >>>>>> >>>>>> Phone : (+94) 71 63 63 083 >>>>>> Email : mahe...@wso2.com >>>>>> >>>>>> _______________________________________________ >>>>>> Architecture mailing list >>>>>> Architecture@wso2.org >>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Amila Maharachchi* >>>>> Senior Technical Lead >>>>> WSO2, Inc.; http://wso2.com >>>>> >>>>> Blog: http://maharachchi.blogspot.com >>>>> Mobile: +94719371446 >>>>> >>>>> >>>>> _______________________________________________ >>>>> Architecture mailing list >>>>> Architecture@wso2.org >>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Godwin Amila Shrimal* >>>> Senior Software Engineer >>>> WSO2 Inc.; http://wso2.com >>>> lean.enterprise.middleware >>>> >>>> mobile: *+94772264165* >>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>* >>>> twitter: https://twitter.com/godwinamila >>>> >>> >>> >>> >>> -- >>> Dimuthu Leelarathne >>> Architect & Product Lead of App Factory >>> >>> WSO2, Inc. (http://wso2.com) >>> email: dimut...@wso2.com >>> Mobile : 0773661935 >>> >>> Lean . Enterprise . Middleware >>> >> >> >> >> -- >> *Amila Maharachchi* >> Senior Technical Lead >> WSO2, Inc.; http://wso2.com >> >> Blog: http://maharachchi.blogspot.com >> Mobile: +94719371446 >> >> >> _______________________________________________ >> Architecture mailing list >> Architecture@wso2.org >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > > *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc. > email: kasung AT spamfree wso2.com > linked-in: http://lk.linkedin.com/in/gajasinghe > blog: http://kasunbg.org > > > -- *Amila Maharachchi* Senior Technical Lead WSO2, Inc.; http://wso2.com Blog: http://maharachchi.blogspot.com Mobile: +94719371446
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture