This documentation is for WSO2 ESB version 4.5.0. View documentation for the latest release.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Described below is how to configure Deployment Synchronizer (DepSync) for a WSO2 product cluster using two cluster nodes (manager, and one worker) with WSO2 Governance Registry. For information on configuring a cluster, refer to section  Clustered Deployment

SVN-based deployment synchronizer uses a Subversion repository as the central 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 is transparent for the user. In the SVN-based DepSync, when changes to the contents of axis2 repo directory were made, the Read-Write nodes commit those to the Subversion (central) repository. Then, this node sends a Axis2 cluster message to all other (worker) 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.

Follow the steps below to setup.
  1. 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 Subversion package installed in your local machine if svnkit is unavailable, but it not recommended for production. WSO2 does not ship svnkit by default because of licensing incompatibilities on re-distributions.
  2. 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.

 

svnadmin create /home/test/mylocalsvnrepo

 

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,

 

svn checkout file:///home/test/mylocalsvnrepo/
     4. To configure the Deployment Synchronizer, you have to simply edit the following code block in <PRODUCT_HOME>/repository/conf/carbon.xml file of the product's Master node.

 

<!-- Deployment Synchronizer Configuration. Uncomment the following section when running with "svn based" dep sync.
    In master nodes you need to set both AutoCommit and AutoCheckout to true 
    and in  worker nodes set only AutoCheckout to true.
    -->
<DeploymentSynchronizer>
        <Enabled>true</Enabled>
        <AutoCommit>true</AutoCommit>
        <AutoCheckout>true</AutoCheckout>
        <RepositoryType>svn</RepositoryType>
        <SvnUrl>file:///home/test/mylocalsvnrepo/</SvnUrl>
        <!-- <SvnUrl>http://svnrepo.example.com/repos/</SvnUrl> --> 
        <SvnUser>username</SvnUser>
        <SvnPassword>password</SvnPassword>
        <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
</DeploymentSynchronizer>-->

 

  • 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 worker node(s).

<DeploymentSynchronizer>
        <Enabled>true</Enabled>
        <AutoCommit>false</AutoCommit>
        <AutoCheckout>true</AutoCheckout>
        <RepositoryType>svn</RepositoryType>
        <SvnUrl>file:///home/test/mylocalsvnrepo/</SvnUrl>
        <!-- <SvnUrl>http://svnrepo.local.com/repos/</SvnUrl> -->                
        <SvnUser>test</SvnUser>
        <SvnPassword>password</SvnPassword>
        <SvnUrlAppendTenantId>false</SvnUrlAppendTenantId>
</DeploymentSynchronizer>
The only differences between the Master and Salve configs are that in slave nodes, we set AutoCommit to false, and AutoCheckout to true.
     8. The Deployment Synchronizer setup is complete. Start the Governance Registry and the two product nodes and examine how uploads to the master node gets synchronized to the worker nodes accordingly.

 

  • No labels