简体   繁体   English

基于WSO2 ESB 4.7 SVN的部署同步器

[英]WSO2 ESB 4.7 SVN-Based Deployment Synchronizer

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? 我目前正在审查SVN部署同步器功能,并且想知道是否有一种方法可以使ESB实例以从属方式配置,并定期检查SVN存储库而该实例不属于集群?

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. 我的测试表明,从属ESB将会对SVN信息库进行任何更改,即使该ESB不在群集中,也要在服务器启动时进行必要的部署/取消部署。
However, it appears the only mechanism to invoke the SVN synch of a slave at runtime is a cluster message from the management node. 但是,似乎在运行时调用从站的SVN同步的唯一机制是来自管理节点的群集消息。

I'm hoping there is an alternate way of hooking into this synch process, remotely if possible. 我希望有一种替代方法可以挂接到这个同步过程中,如果可能的话,可以远程进行。 Does anyone know of one? 有人知道吗?

Dep-Sync updates on demand, does not do polling. Dep-Sync按需更新,不进行轮询。

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. AFAIK,不建议在没有群集环境的情况下使用Dep-Sync。 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. 当您进行集群设置时,自然需要Dep-Sync。

HTH, HTH,

DarRay DarRay

A SVN repository is used internally in SVN-based DepSync, and the synchronization happens with svn checkout/commit/update operations mostly. SVN存储库在基于SVN的DepSync中内部使用,并且同步主要通过svn checkout / commit / update操作进行。 Doing SVN update periodically on worker/slave nodes can put a big performance hit on the SVN server. 定期在工作节点/从节点上进行SVN更新可能会严重影响SVN服务器的性能。 Imagine you have 20 worker nodes taking updates every 15 seconds for each tenants. 假设您有20个工作节点,每个租户每15秒更新一次。 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. 但是,如果您使用的是基于SVN的Deployment Synchronizer,则可以通过依赖于平台的方式来满足您的要求。 In Linux, you can schedule a cron job to schedule a task. 在Linux中,您可以计划cron作业以计划任务。 So, you can create a cron job that updates the worker nodes periodically. 因此,您可以创建一个cron作业,以定期更新工作节点。 Following cron job updates the repository every one minute. 执行cron作业后,每隔一分钟更新一次存储库。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM