Setting up customized WSO2 Governance Registry pack

[Source: https://i.pinimg.com/originals/95/bb/a9/95bba99c829ef25552d6e11b702b2bde.gif]

WSO2 Governance Registry (GReg) is a highly customizable product via different extension points. This is a well-known feature in Greg. But assume if you are to replicate a customized pack locally for some testing purpose or to implement some features on top of the existing pack how can you set it up in your machine? What are the elements you need to consider during this setup process? Well, that’s the story of today’s blog…! This blog will provide a set of general guidelines to set up a customized GReg pack locally in your machine.

Let’s Start!

[Source: https://bestanimations.com/Computers/funny-homer-computer-animated-gif-38.gif]

Before you start, there are few factors that you need to concentrate on in order to avoid any conflicts during the setup process. They are knowing the,

  1. GReg version of the customized pack
  2. WUM(WSO2 Update Manager) level: WUM is applicable only for WSO2 customers
  3. Customizations they have made: E.g- Creating new asset/lifecycles, associations, UI level customizations in publisher/store

Setting up the GReg pack

Below mentioned are the generic set of steps to be followed to set up a customized GReg pack in your local machine. The wso2greg-5.4.0 pack has been used for this demonstration. If the pack is an older version then the file/folder paths might be a bit different.

  1. Get a new Greg-5.4.0 pack from the official page.
  2. Copy the following folders from the customized pack and replace them in the new Greg pack. This is to copy all the customizations to the new Greg pack.
a. <Greg-Home>/libb. <Greg-Home>/modulesc. <Greg-Home>/repository/componentsd. <Greg-Home>/repository/deploymente. <Greg-Home>/repository/libf. <Greg-Home>/repository/resources excluding the security folder as this will have the client trust store and Keystore configurations of the customized pack and might cause some server start up issues.

3. Keep the following default files in the new pack of Greg, while copying the customized pack’s <Greg-Home>/repository/deployment folder to the new pack. This is to replace the customized pack’s landing page URLs with local URLs.

a. <Greg-Home>/repository/deployment/server/jaggeryapps/publisher/config/publisher.jsonb. <Greg-Home>/repository/deployment/server/jaggeryapps/store/config/store.json

4. Copy the following governance.xml from the customized pack to the new Greg pack. This will provide all the association details among assets.

<Greg-Home>/repository/conf/governance.xml

Apart from these general sets of steps, there could be some more steps you might have to follow depending on the requirements. For example, setting up the databases, configuring the trust stores. These can be done independently on your local setup. If you want to replicate the exact DB data as the customized pack then you can get the relevant DB dump and get the DBs done. Also by any chance, if there are any URLs hardcoded in any files especially in the files that reside in the <Greg-Home>/repository/deployment folder please replace them with “localhost” and the relevant port value.

Wind Up!

This is a very brief blog post on setting up a customized GReg pack locally in your machine. This will be very useful to troubleshoot any issues and to perform customized implementations. I hope this was a useful read…!

Happy Learning…!

Be safe and stay hygienic…!!!

[Source: https://media3.giphy.com/media/3o7WIqvndqtLc2znbO/giphy.gif]

Inquisitive

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store