High availability git repository configuration using Helix and Zookeeper

Asked

Viewed 101 times

1

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

  • 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 cluster machine, the information is replicated on the other machine, ensuring transparency of user access that will be able to access any of the machines and view the same GIT repository. In my research, I saw that it is possible to do this using Apache Zookeeper + Apache Helix [1][2]. The problem is that even after following the tutorials, I still could not achieve the desired behavior.

What I’ve done so far, in summary form:

  • Machine 1

    1. Zookeeper, Helix, Jboss + kieworkbench, Java 6 installation.
    2. Jboss standalone-full-ha profile configuration 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>
      
    3. Zookeeper server execution and cluster node configuration:

      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 &
      
    4. Initialization of Jboss

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

    1. Installation of Helix and Jboss.
    2. Jboss standalone-full-ha profile configuration 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"/>
      

    3. Execution of the Helix node controller

      ./run-helix-controller.sh -zkSvr 192.168.33.50:2181 -cluster bpmCluster 2>&1 > ./controller.log &
      
    4. Initialization of Jboss

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

Data synchronization still doesn’t happen. Could someone help me? Did I misunderstand the use of these high availability tools? I forgot some configuration?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.