WSO2 products use SVN (SubVersioN) deployment synchronizer in order to have the syncing process of deployed artifacts like endpoints, proxy services, sequences and etc. The Subversion repository is used to sync the contents in the local sync directory (the axis2 repo directory,
Now let's see how to setup the SVN DepSync repository with WSO2 products. Before going further into setup, first of it's necessary to select the suitable SVN version. It's advised to only select SVN version 1.7 or 1.8 for the products based on Carbon 4.4.x ( if you're using products based on Carbon 4.2.x and below, please use only SVN version 1.6 ).
Following files needed to be downloaded and save in the product environment to continue with SVN Dep Sync configuration.
- In order to function the SVNKit properly, download trilead-ssh2-1.0.0-build215.jar file from here and save it in <PRODUCT_HOME>
/repository/components/lib folder.
After completing the pre-requesties, let's move to configure DepSync on manager and worker nodes.
Steps to Enable DepSync on the manager node
- To enable the Deployment synchronizer, the value should be set to 'true' for <Enabled>
tag Since manager node responsible for receiving server requests and committing changes in local repository to central repository, the value for <AutoCommit> should be 'true' Once changes are committed in central repository, it should automatically checked out them to local repository of the node.<AutoCheckout> value should changed to 'true'. </RepositoryType>We're using Subversion as repository type here :
<RepositoryType>svn </SvnUrl>Location of the SVN repository should be specify:
<SvnUrl>https://svn.example.org/depSync<SvnUsername> and <SvnPassword> must specified with the Username and password of SVN repository respectively. If the tenant specific configuration has to be made, set the value for to 'true'.
That's it with the manager node configuration. So the manager node deployment synchronization configuration should looks like this,
<DeploymentSynchronizer> <Enabled>true</Enabled> <AutoCommit>true</AutoCommit> <AutoCheckout>true</AutoCheckout> <RepositoryType>svn</RepositoryType> <SvnUrl>https://svn.example.com/depsync.repo/</SvnUrl> <SvnUser>rep1</SvnUser> <SvnPassword>reppass</SvnPassword> <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId> </DeploymentSynchronizer>
Now move to worker node configuration.
Steps to Enable DepSync on the worker nodes
Worker node has the same configuration for DepSync like the manager node except the usage of <AutoCommit>. Since worker node doesn't receive any server requests to be handled and the committing part isn't associated with worker nodes, <AutoCommit> value set to be 'false'. This is the DepSync configuration for Worker nodes.
<DeploymentSynchronizer> <Enabled>true</Enabled> <AutoCommit>false</AutoCommit> <AutoCheckout>true</AutoCheckout> <RepositoryType>svn</RepositoryType> <SvnUrl>https://svn.example.com/depsync.repo/</SvnUrl> <SvnUser>rep1</SvnUser> <SvnPassword>reppass</SvnPassword> <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId> </DeploymentSynchronizer>
So that's it about how to configure deployment synchronizer in a clustered environment. I will discuss about some of the use cases of DepSync in my upcoming posts.
hi Manees,
ReplyDeleteI am using WSO2 EI 6.1.0 and SVN version 1.8. and I am using local SVN repository for sync. Rest of the configurations are done as per your article. but still facing the below error,
TID: [-1234] [] [2018-04-25 11:02:34,709] ERROR {org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent} - Error while initializing a deployment synchronizer for the super tenant Carbon repository {org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent}
org.wso2.carbon.deployment.synchronizer.DeploymentSynchronizerException: No Repository found for type svn
Can you help me on this?
Thanks in Advance.
Regards,
Ponmanimaran