Configuration of git repository with high availability using Helix and Zookeeper

1

I need to configure a cluster to maintain the high availability and synchronization of a GIT repository configured by the KIE Workbench. The scenario I have is the following:

  • VM Machine 1 - 192.168.33.50 - Ubuntu trusty / 64: Zookeeper server, Helix master, Helix node, Jboss + Kieworkbench.
  • VM Machine 2 - 192.168.33.40 - Ubuntu trusty / 64: Helix node, Jboss + Kieworkbench.

Each machine runs Kieworkbench which allows the creation of a GIT repository. What I need is that if the repository is created on a machine in the cluster, the information is replicated on the other machine, guaranteeing the transparency of access to the user that will be able to access any of the machines and view the same GIT repository. In my searches, I have seen that you can do this using the Apache Zookeeper + Apache Helix [ 1 [ 2 ]. The problem is that even after following the tutorials, I still have not been able to achieve the desired behavior.

What I've done so far, in a nutshell:

  • Machine 1

  • Install Zookeeper, Helix, Jboss + kieworkbench, Java 6.
  • Configuring the standalone-full-ha Jboss profile for this cluster node.

    <system-properties>
    <property name="org.uberfire.nio.git.dir" value="/usr/src/jboss/bin"/>
    <property name="org.uberfire.nio.git.daemon.enabled" value="true"/>
    <property name="org.kie.demo" value="false"/>
    <property name="org.uberfire.nio.git.daemon.host" value="192.168.33.50"/>
    <property name="org.uberfire.nio.git.daemon.port" value="9418"/>
    <property name="org.uberfire.nio.git.ssh.enabled" value="true"/>
    <property name="org.uberfire.nio.git.ssh.host" value="192.168.33.50"/>
    <property name="org.uberfire.nio.git.ssh.port" value="8001"/>
    <property name="org.uberfire.cluster.zk" value="192.168.33.50:2181"/>
    <property name="org.uberfire.cluster.local.id" value="192.168.33.50_11"/>
    <property name="org.uberfire.cluster.vfs.lock" value="vfs-repo"/>
    <property name="org.uberfire.metadata.index.dir" value="/usr/src/jboss/bin"/>
    <property name="org.uberfire.cluster.autostart" value="false"/>
    </system-properties>
    
  • Running the zookeeper server and configuring the cluster nodes:

    sh zkServer.sh start
    ./helix-admin.sh -zkSvr 192.168.33.50:2181 -addCluster bpmCluster
    ./helix-admin.sh -zkSvr 192.168.33.50:2181 -addNode bpmCluster 192.168.33.50:11
    ./helix-admin.sh -zkSvr 192.168.33.50:2181 -addNode bpmCluster 192.168.33.40:22
    ./helix-admin.sh -zkSvr 192.168.33.50:2181 -addResource bpmCluster vfs-repo 1 LeaderStandby AUTO_REBALANCE
    ./helix-admin.sh -zkSvr 192.168.33.50:2181 -rebalance bpmCluster vfs-repo 2
    ./run-helix-controller.sh -zkSvr 192.168.33.50:2181 -cluster bpmCluster 2>&1 > ./controller.log &
    
  • Jboss startup

    ./standalone.sh -c standalone-full-ha.xml -b 192.168.33.50 &
    
  • Machine 2

  • Helix and Jboss installation.
  • Configuring the standalone-full-ha Jboss profile for this cluster node.

    <system-properties>
    <property name="org.uberfire.nio.git.dir" value="/usr/src/jboss/bin"/>
    <property name="org.uberfire.nio.git.daemon.enabled" value="true"/>
    <property name="org.kie.demo" value="false"/>
    <property name="org.uberfire.nio.git.daemon.host" value="192.168.33.40"/>
    <property name="org.uberfire.nio.git.daemon.port" value="9418"/>
    <property name="org.uberfire.nio.git.ssh.enabled" value="true"/>
    <property name="org.uberfire.nio.git.ssh.host" value="192.168.33.40"/>
    <property name="org.uberfire.nio.git.ssh.port" value="8001"/>
    <property name="org.uberfire.cluster.zk" value="192.168.33.50:2181"/>
    <property name="org.uberfire.cluster.local.id" value="192.168.33.40_22"/>
    <property name="org.uberfire.cluster.vfs.lock" value="vfs-repo"/>
    <property name="org.uberfire.metadata.index.dir" value="/usr/src/jboss/bin"/>
    <property name="org.uberfire.cluster.autostart" value="false"/>
    

  • Running the Helix node controller

    ./run-helix-controller.sh -zkSvr 192.168.33.50:2181 -cluster bpmCluster 2>&1 > ./controller.log &
    
  • Jboss startup

    ./standalone.sh -c standalone-full-ha.xml -b 192.168.33.40 &
    

Still, data synchronization does not occur. can anybody help me? I misunderstood the use of these high availability tools? Did I forget some settings?

    
asked by anonymous 21.02.2017 / 16:05

0 answers