This documentation is for older WSO2 products. View documentation for the latest release.
SVN-Based Deployment Synchronizer for Carbon 4.2.0-Based Products - Clustering Guide 4.2.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

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/.

Important: Please make a note of the following before you begin.

  • For all products based on Carbon 4.2.x and below, please use only SVN version 1.6 for working copies (SVN repositories added to the deployment synchronizer). However, when you install the SVNKit for 1.6 by copying it into the dropins folder of the WSO2 product, the associated SVN server in your deployment can be either version 1.6 or 1.7. 
  • WSO2 products that are based on Carbon 4.4.x offer support for SVN versions 1.7 and 1.8. See SVN-Based Deployment Synchronizer for Carbon 4.4.0-Based Products for more information.
  • See the release matrix to identify the version of WSO2 Carbon that your WSO2 product is based on.
  • Using SVN Deployment Synchronizer with SSH protocol is not supported.

Do the following steps to configure SVN-based DepSync.

  1. Download SVNKit (svnkit-1.3.9.wso2v2.jar) from http://dist.wso2.org/tools/svnkit-1.3.9.wso2v2.jar and install it by copying it into the <PRODUCT_HOME>/repository/components/dropins folder.
  2. Download http://maven.wso2.org/nexus/content/groups/wso2-public/com/trilead/trilead-ssh2/1.0.0-build215/trilead-ssh2-1.0.0-build215.jar and copy it to the <PRODUCT_HOME>/repository/components/lib folder. This .jar file is necessary for the SVNKit to work as expected.
  3. The following steps are optional and should only be used when testing the setup and not in production.
    1. In a console window, enter the following command to create a new repository:
      svnadmin create <PathToRepository>/<RepoName>


      For example:
      svnadmin create ~/depsyncrepo
    2. 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)

    3. 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:

About members rejoining the cluster in AS 5.2.0

Suppose a member left the cluster due to reasons such as temporary network outages, and rejoins later, that member receives the DepSync cluster messages that was sent during that period. This only applies to AS 5.2.0.

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:

  1. Enable the DepSync feature: <Enabled>true</Enabled>
  2. 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>
  3. Automatically update the local repository with changes from the central repository: <AutoCheckout>true</AutoCheckout>
  4. Specify the repository type (in this case, Subversion): <RepositoryType>svn</RepositoryType>
  5. Specify the location of the repository with the access protocol: <SvnUrl><AccessProtocol>://<PathToRepository>/<RepoName>/</SvnUrl>
  6. Specify the user name you defined in the last section: <SvnUser>repouser</SvnUser>
  7. Specify the password you defined in the last section: <SvnPassword>repopassword</SvnPassword>
  8. Enable tenant-specific configurations if needed: <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>

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

 <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> 

When working with two manager nodes

In a scenario where there are two manager nodes, if both servers start with the same default files in <PRODUCT_HOME>/repository/deployment/server an error occurs. The second management node should not have these default files within its <PRODUCT_HOME>/repository/deployment/server location. To avoid conflicts with regards to commits from the second node, the second node should not have the set of files that the first node has committed when the second node connects to the cluster.

Important: The recommended way to use multiple manger nodes is to use active-passive nodes.

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:

<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 configurations.

  • No labels