First lets configure the governance registry instance to point to the MsSQL data source.
- Download WSO2 Governance Registry product and extract the product.
- Go to /repository/conf/datasources and open master-datasources.xml
- Then change the following entries in the WSO2CARBON data source.
- Fill the url, username, password according to your MsSQL Instance.
- Log into the MSSQL 2012 Management studio and create a database called REMOTEDB
- Then move to the /repository/components/lib folder in the extracted greg product folder and copy the downloaded MsSQL JDBC Connector. You can download the sqljdbc driver from this link. Download
- Then Start the WSO2 governance product with the -Dsetup option. (-Dsetup option will populate the new schemas in the newly pointed MsSQL REMOTEDB)
Now lets mount a WSO2 product to this remote registry.
- Let's use WSO2 API Manager for this example post. First Download the product and extract it to your hard drive.
- Go to /repository/conf/datasources folder and open the master-datasources.xml file
- Then add a new data source as follows. For the demonstration purpose lets name the new datasource as WSO2_CARBON_DB2.
- Note that this datasource is a completely new entry and let the default config reamins as it is.
- Now as we did in WSO2 governance product copy the saljdbc driver to the /repository/components/lib folder
- No open up the /repository/conf registry.xml file in the WSO2 API Manager product and do the following changes.
- Add a new dbConfig as follows
- Note that the dataSource is set to the jndiConfig name which we used in the new datasource defined in the API Manager's master-datasources.xml
- Now find the following configuration, uncomment it and change it to the following config values.
- Note that the dbConfig name is set to the newly added dbConfig name, which is "remoteRegistry" in this example. Give a unique id value.
- Then we set the remote mounted path using the following configuration.
- This configuration is comment by default and you have to uncomment and provide the relevant values. Note that the instanceID value is same as the id value in remoteInstance configuration.
- The target path is set to /_system/amnode if you are using several API Manager nodes you can set all to the same path. If it is a different product it is recommend to use a different path for example ESB node path would be /_system/esbnode
- /_system/config is the path which the product is going to be mounted.
- Now finally if you have followed the above steps correctly start the API Manager with some port Offset if the product is running in the same machine.
- Now log into the API Manager Web UI using the following URL https://192.168.1.2:9543/carbon/
- If you browse the resource can see the remotely mounted /_system/config registry.
|API Manager Resource view|