Question

I'm currently reviewing the SVN deployment synchronizer functionality and was wondering if there is a way to have an ESB instance, configured in a slave fashion, check the SVN repository periodically without that instance being a part of a cluster?

My testing has revealed that the slave ESB will pickup any changes to the SVN repository and make the necessary deployments/undeployments on server start even when this ESB is not in a cluster.
However, it appears the only mechanism to invoke the SVN synch of a slave at runtime is a cluster message from the management node.

I'm hoping there is an alternate way of hooking into this synch process, remotely if possible. Does anyone know of one?

Was it helpful?

Solution

A SVN repository is used internally in SVN-based DepSync, and the synchronization happens with svn checkout/commit/update operations mostly. Doing SVN update periodically on worker/slave nodes can put a big performance hit on the SVN server. Imagine you have 20 worker nodes taking updates every 15 seconds for each tenants. Hence worker nodes only updates its repository when there is a change in artifacts in the manager node. We use cluster messages to communicate between managers and workers, so we need to setup a cluster for that.

But you can achieve your requirement in a platform-dependent way if you are using SVN-based Deployment Synchronizer. In Linux, you can schedule a cron job to schedule a task. So, you can create a cron job that updates the worker nodes periodically. Following cron job updates the repository every one minute.

*/1 * * * * /home/kasun/update-wso2-worker-repos.sh

-

$ cat /home/kasun/update-wso2-worker-repos.sh
#!/bin/sh
svn update $CARBON_HOME/repository/deployment/server
svn update $CARBON_HOME/repository/tenants/*

OTHER TIPS

Dep-Sync updates on demand, does not do polling.

A slave node would do a check-out when it gets a specific cluster message, which sent by manager nodes. In order to receive those messages all nodes should be on the same cluster.

If a specific node on the cluster been inactive(haven't started) when a cluster message sent, it would missed that update. In order to overcome that, every server update its repo at the server startup.

AFAIK, its not recommended to use Dep-Sync without a clustered environment. So if your nodes ain't in the same cluster, you would need to restart other servers to be updated.

Naturally requirement of the Dep-Sync needed when you have a clustered set up.

HTH,

DarRay

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top