Installing a ZooKeeper node

ZooKeeper installation is supported on Linux® platform only.

Before you install a ZooKeeper node, complete the following steps:
  • Complete your topology and installation planning and keep it ready for reference. For more information on topology planning, see Planning the topology and Planning for installation.
  • Complete the worksheet for ZooKeeper and Cassandra installation. For more information, see Installation checklist: Cassandra and ZooKeeper.
  • Install IBM® JDK and set the appropriate path. For more information, see Setting Java variables on Linux.
  • Download Sterling B2B Integrator V6.0 media package from IBM Fix Central or IBM Passport Advantage.
  • Extract the package to a folder, go to the media directory and locate the following files:
    • in the InstallationManager folder
  • Extract the files to a common directory. After you extract the files, the directory must have the following subdirectories:
    • IM_Linux
    • b2birepo
    • gmrepo
  • Default port numbers are assigned to various ports that the ZooKeeper utilities use. If you do not intend to use the default port numbers, keep the custom port numbers handy. Enter the port numbers when you define the ZooKeeper topology.
  • Install an appropriate windowing system to view the IBM Installation Manager user interface on the Linux system.
  • Set the shell LANG variable as appropriate and export the variable. For example in sh, ksh or bash:
    LANG=en_US; export LANG
    For example in csh:
    setenv LANG en_US
    The LANG environment variable must be the same across all Cassandra and ZooKeeper nodes.
You must define all the ZooKeeper nodes that are required in all your data centers when installing each ZooKeeper node. However, you must install each node separately on the required system.
Attention: You can install Cassandra and ZooKeeper on a single node at the same time, for which you must choose both Global Mailbox Cassandra Node and Global Mailbox Zookeeper Node options. However, you must not install multiple instances of Cassandra and ZooKeeper on the same server.

To install a single ZooKeeper node on a Linux system, complete the following steps:

  1. Open a command prompt and complete one of the following tasks to start the Installation Manager:
    1. Go to the IM_Linux directory and type ./userinst for the following scenarios:
      • If you do not have the Installation Manager installed and are using the Installation Manager agent provided with V6.0.
      • If you have a 64-bit Installation Manager installed.
      • If you have the Installation Manager installed on a platform that has only one download available for Installation Manager. For example, AIX, HP, zLinux.
    2. Go to <installation directory>/Installation Manager/eclipse and type ./IBMIM, if you have a 32-bit Installation Manager installed on a Linux system.
    Tip: Record a response file when installing the first ZooKeeper node, so that the response file can be used to install other nodes through silent installation mode. For more information, see Recording a response file and Installing or updating with a response file.
  2. On the Installation Manager home page, click Install.
    Important: If IM_Linux, gmrepo, and b2birepo directories are not in the same directory or if you have already installed Installation Manager, a message is displayed that there are no packages to be installed or that Installation Manager could not connect to the repositories. You must add the Global Mailbox and Sterling B2B Integrator repository files to the Installation Manager repository. For more information about adding repository files, see Repository preferences.
  3. On the Install Packages screen, select the Global Mailbox check box. This action selects the Version 6.0 check box also. Click Next.
  4. Click Browse and specify the installation directory for Global Mailbox. This directory is specific to the Global Mailbox components. You can choose to retain the default or change it. Click Next.
    Important: If you are running IBM Installation Manager for the first time, you must specify the shared resource directory for the Installation Manager. Click Browse and specify the shared resources directory and click Next.
  5. Select the translation (language) to install and click Next. Only English translation is supported in the first release of Global Mailbox.
  6. Select the Global Mailbox Prerequisite Installation check box and select Global Mailbox Zookeeper Node. Click Next.
    Important: To install the Cassandra node along with the Zookeeper node, select Global Mailbox Cassandra Node also.
  7. Specify the Java™ home path for the Zookeeper node. Click Browse, navigate to the location of the Java folder, select it, and click Next.
  8. Complete the following steps to specify the topology for the Zookeeper nodes:
    Important: It is suggested to use the default ports. If you are not using the default ports, the ZooKeeper utilities that use the ports must be started with a command line argument to provide the correct port number.
    1. Type the ZooKeeper host name or IP address in the ZooKeeper Host Name field.
      The follow port (2888) and the election port (3888) are populated by default in the Follow Port and Election Port fields. In a ZooKeeper ensemble, the follower opens the TCP connection to the leader port by using the follow port. The election port is the leader port, which accepts the client connection.
    2. Click Add to add the node.
      Repeat the steps to define other ZooKeeper nodes. To remove a node, select the node and click Remove. The remove option removes the selected node from the topology.
  9. Click Continue to Step 2.
  10. Complete the following steps to define the local Zookeeper node:
    1. Click Select Node and select the local ZooKeeper node that must be installed.
      The client port is populated by default in the Client Port field. Client port is the port where a client connects to the ZooKeeper node. The default port is 2181.
    2. Select a data directory for the Zookeeper node.
      Ensure the directory for the Zookeeper node and Cassandra node are not on the same physical I/O device. Co-locating the directories might lead to performance issues.
    3. Click Next.
  11. Click Install.
  12. Review the installation summary. Notice the installation progress in the Repository Information section.
  13. Click Finish to complete the installation.
    Important: Ignore the warning messages in the Installation Manager log files.
  14. To start the ZooKeeper node, go to <installDir>/MailboxUtilities/bin/ and run the ./ script.
    Important: You must run the ./ script for every ZooKeeper node. If you installed Cassandra and ZooKeeper nodes together, then you can use the ./ script to start both the nodes together. When you run the ./ script, the Cassandra node is started first, followed by the ZooKeeper node.

    Repeat the procedure to install additional ZooKeeper nodes in the current and other data centers.

    Important: When a ZooKeeper node is installed, the ZooKeeper watchdog process is also deployed. ZooKeeper watchdog monitors the health of the Apache ZooKeeper ensemble, and when quorum is lost, it restarts the ZooKeeper process with a reduced ensemble of the surviving nodes, thereby restoring the quorum. The watchdog is started when you run the script in the <install_Dir>/MailboxUtilities/bin directory. In case you need to exclusively start or stop the watchdog process, you must run the and scripts in the <install_Dir>/MailboxUtilities/bin directory.