Described below is how to set up Deployment Synchronizer for a WSO2 product cluster using two cluster nodes (master, and one slave) with a shared registry (WSO2 Governance Registry). For information on clustering, refer to section Clustered Deployment.
Assume you have Master and Slave nodes, and a shared registry. The Master node will act as a Registry Read-Write (RW) Node, and the slave as a Registry Read-only node.
SVN-based deployment synchronizer uses a Subversion repository to sync the contents in the sync directory (the axis2 repo directory, <PRODUCT_HOME>/repository/deployment/server, by default). This method is efficient and high-performant. In the SVN-based method, when changes to the contents of axis2 repo directory are present, the Read-Write nodes commit those to the Subversion repository. Then, this node sends a cluster message to all other (slave) nodes specifying the repo is updated. When the slave nodes receive the message, they update their axis2 repo directory with what's in the svn repository.
- Download and install SVNKit implementation (svnClientBundle-1.0.0.jar) from here: http://dist.wso2.org/tools/svnClientBundle-1.0.0.jar. It is recommended that you read the svnkit license. DepSync has the ability to use svn installed in your machine if svnkit is unavailable, but it not suitable for production. WSO2 does not ship svnkit by default because of licensing incompatibilities on re-distributions.
- You need to have an svn repository. You can use an existing svn repository, or create and setup a new one locally. To create a new svn in Linux, use following the command.
The file:// protocol can be used instead of setting up http:// url for the repo (by using a webserver like Apache) if the repo is in local system. For example, you can do a manual checkout of the repository by using the command,
- Auto Commit - Allows to perform commit operations automatically.
- Auto Checkout - When this option is selected, an additional option named "Use Eventing" will be enabled.
- Use Eventing - Allows to trigger checkout actions on registry events. This is not needed most of the time.
- Synchronization Period - Synchronizer will get initialized and start running periodically as specified in this parameter. Default is 10 seconds.
7. Add content as the following example to the product's slave node(s).