Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For your cluster to perform correctly, all nodes must have the same configurations. For example, in an ESB cluster, if node 1 does not have a proxy service that the other nodes have, any time the ELB routes a request for that proxy service to node 1, an error will be returned. This inconsistency of status across the nodes breaks the clustering model where all nodes are viewed virtually as a single system.

To prevent this problem, all Carbon-based products use Deployment Synchronizer (DepSync) to ensure the same status is maintained across all nodes in the cluster. It maintains a central repository of the <PRODUCT_HOME>/repository/deployment/server folder, which is where deployment configurations are stored for all Carbon-based products, and uses that repository to synchronize the nodes. This page describes how to configure DepSync in the following sections:

Table of Contents

Setting up the repository

The DepSync is of two types as follows:

Table of Contents
maxLevel4
minLevel4

Registry-based DepSync

<to be added>

SVN-based DepSync

This section describes how to set up the DepSync repository in Subversion (SVN). Although DepSync can use the Subversion package installed on the local server, it is not recommended for production, so use the SVNKit instead as described in the following steps. If you want to learn more about installing Subversion specifically on Fedora 18/17 and CentOS/Red Hat (RHEL), see http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/.

...

Open <PathToRepository>/<RepoName> /conf/svnserve.conf and set following lines to configure authentication for the new repository.
anon-access = none         (Specifies what kind of access anonymous users have; in this case, none)
auth-access = write       (Specifies what authenticated users can do; in this case, they can write, which also includes reading)
password-db = passwd     (Specifies the source of authentication; in this case, the file named passwd, which resides in the same directory as svnserve.conf)

...

Open <PathToRepository>/<RepoName>/conf/passwd and add the following line in the format of <username>:<password> to add a new user:
repouser:repopassword

The SVN repository is now available with the user credentials you specified. If you want test and further configure the repository, see the following references:

After you have created the repository, the next step is to enable DepSync on the manager and worker nodes.

Enabling DepSync on the manager node

You configure DepSync in the <PRODUCT_HOME>/repository/conf/carbon.xml file on the manager node by making the following changes in the <DeploymentSynchronizer> tag:

  • Enable the DepSync feature: <Enabled>true</Enabled>
  • Automatically commit local repository changes to the central repository (only enable this on the manager node, which is the node that receives server admin requests as per our deployment pattern): <AutoCommit>true</AutoCommit>
  • Automatically update the local repository with changes from the central repository: <AutoCheckout>true</AutoCheckout>
  • Specify the repository type (in this case, Subversion): <RepositoryType>svn</RepositoryType>
  • Specify the location of the repository with the access protocol: <SvnUrl>file://<PathToRepository>/<RepoName>/</SvnUrl>
  • Specify the user name you defined in the last section: <SvnUser>repouser</SvnUser>
  • Specify the password you defined in the last section: <SvnPassword>repopassword</SvnPassword>
  • Enable tenant-specific configurations if needed: <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>

The final configuration for the management node should be similar to the following:

Code Block
languagehtml/xml
 <DeploymentSynchronizer>
    <Enabled>true</Enabled>
    <AutoCommit>true</AutoCommit>
    <AutoCheckout>true</AutoCheckout>
    <RepositoryType>svn</RepositoryType>
    <SvnUrl>https://svn.example.com/depsync.repo/</SvnUrl>
    <SvnUser>repouser</SvnUser>
    <SvnPassword>repopassword</SvnPassword>
    <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
</DeploymentSynchronizer> 

Now that we have completed configuring DepSync on the manager node, we will configure it on the worker nodes.

Enabling DepSync on the worker nodes

You enable DepSync on the worker nodes the same way as on the manager node, with one change: set <AutoCommit>false</AutoCommit>, since worker nodes do not handle server admin requests.

Therefore, the final configuration for worker nodes will be as follows:

Code Block
languagehtml/xml
<DeploymentSynchronizer>
    <Enabled>true</Enabled>
    <AutoCommit>false</AutoCommit>
    <AutoCheckout>true</AutoCheckout>
    <RepositoryType>svn</RepositoryType>
    <SvnUrl>https://svn.example.com/depsync.repo/</SvnUrl>
    <SvnUser>repouser</SvnUser>
    <SvnPassword>repopassword</SvnPassword>
    <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
</DeploymentSynchronizer> 

You have now configured DepSync for the cluster, which will ensure that all nodes in the cluster will have the same configurationsThis section covers the following:

Child pages (Children Display)

Note

Note that only SVN-based Deployment Synchronizer is supported for WSO2 products based on WSO2 Carbon 4.2.0 onwards. Registry-based Deployment Synchronizer does not work for WSO2 products based on Carbon 4.2.0 onwards. This was depreciated for newer products since the Registry-based Deployment Synchronizer maintains artifacts in the database, which leads to performance issues. When the number of artifacts increases, the number of database calls to check the difference for Dep Sync to work becomes an overhead and therefore there is a severe performance hit.