On Fri, Aug 22, 2014 at 5:48 AM, Danushka Fernando <[email protected]>
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 <[email protected]>
> wrote:
>
>>
>>
>>
>> On Thu, Aug 21, 2014 at 8:24 PM, Mahesh Chinthaka <[email protected]>
>> 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 : [email protected]
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> 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
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> 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
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to