Set Up the Membership Service
TimesTen Scaleout includes Apache ZooKeeper as a third party membership service. You
can find the ZooKeeper installation files in the
installation_dir
/tt22.1.1.18.0/3rdparty/apache-zookeeper-3.8.1-bin.tar.gz
file of a
TimesTen Scaleout installation.
To configure and initialize the membership service as required for TimesTen Scaleout, complete the next steps:
Note:
See Overview of the Membership Service in TimesTen Scaleout for a more comprehensive description of the membership service in TimesTen Scaleout, including the configuration of Apache ZooKeeper.
Install Apache ZooKeeper
Unpack Apache ZooKeeper on each system that you defined for the role of a membership server.
% mkdir -p /grid/membership
% tar -zvxf apache-zookeeper-3.8.1-bin.tar.gz -C /grid/membership
Configure the ZooKeeper Servers
Once the installation files are available on all the systems defined as membership servers, create the zoo.cfg
and myid
configuration files on those systems.
% vi /grid/membership/apache-zookeeper-3.8.1-bin/conf/zoo.cfg
tickTime=250
initLimit=40
syncLimit=12
dataDir=grid/membership/apache-zookeeper-3.8.1-bin/data
clientPort=2181
server.1=ms-host1:2888:3888
server.2=ms-host2:2888:3888
server.3=ms-host3:2888:3888
autopurge.snapRetainCount=3
autopurge.purgeInterval=1
4lw.commands.whitelist=stat, ruok, conf, isro
Ensure that in the myid
file you assign the same n
value as in the server.
n
parameter of the zoo.cfg
file. For example, since the ms-host1
system is identified as server.1
in the zoo.cfg
file, then the myid
file of that system must contain a single line with a 1
.
% vi /grid/membership/apache-zookeeper-3.8.1-bin/conf/myid
1
Also, create the location specified for the dataDir
parameter.
% mkdir -p /grid/membership/apache-zookeeper-3.8.1-bin/data
Start the ZooKeeper Servers
Start the ZooKeeper server on all the systems that you defined for the role of a membership server.
% /grid/membership/apache-zookeeper-3.8.1-bin/bin/zkServer.sh start
If you want to verify that ZooKeeper is running properly, use:
% /grid/membership/apache-zookeeper-3.8.1-bin/bin/zkCli.sh -server ms-host1:2181
Create the Client Configuration File
The client configuration file identifies the host names and client TCP/IP ports of all membership servers.
Create a client configuration file in a directory on the system defined as the host of the active management instance, as shown next.
% vi /mydir/membership.conf
Servers ms-host1!2181,ms-host2!2181,ms-host3!2181