Wednesday, June 25, 2014

Sharing WSO2 Governance Registry Lifecycle across Multiple Tenants

The goal of multitenancy is to maximize the resource sharing across multiple users while hiding the fact that these users are on the same server and ensuring optimal performance. It is possible to register tenants in Governance Registry as well, allowing tenants to maintain separate registry domains to their institutions.

However, there is no simple tool or wizard to share your Lifecyle created in super tenant across other tenants, so below steps will help you to do this part using Greg Admin console login.

Step 1: Create a life cycle in the super tenant


- Login to Greg Admin console
- Go to  : Home > Extensions > Configure > Lifecycles
- Click on "Add new Life Cycle" and create a life cycle , let says life cycle name is "SampleLifeCycleTest"

Step 2:  Download created life cycle


- Now, go to the registry path
Home > Resources > Browse

/_system/config/repository/components/org.wso2.carbon.governance/lifecycles

- Click on a life cycle required and download into a folder.
- ex: /home/work/SampleLifeCycleTest

Step 3: Login to new tenant and upload the life cycle


- If you have not created the new tenat still, you can refer below on how to add tenant
https://docs.wso2.org/display/Governance460/Multitenancy

- Now log-out from the super tenant and login to the new tenant you created already

- Go to the registry path
/_system/config/repository/components/org.wso2.carbon.governance/lifecycles

- Click on add resource
- Choose the earlier downloaded lifecycle file (/home/work/SampleLifeCycleTest)
- Enter Media Type is given as application/xml
- Click add

Step 4:  Verify the life cycle added


- Now go and see your new life cycle will be in your tenant
Home > Extensions > Configure > Lifecycles


Step 5: Use your life cycle in a service

Since this is added from registry , it will take few minutes to refresh cache and use within a service, also you can restart the server (or re-login to the tenant) and use this lifecyle inside your services from Greg.


References:
https://docs.wso2.org/display/Governance460/Lifecycles
https://docs.wso2.org/display/Governance460/Multitenancy



No comments:

Post a Comment