kazutanaka / ttcluster

Tokyo Tyrant cluster administration tool

This URL has Read+Write access

name age message
file .gitignore Sun Oct 12 22:50:45 -0700 2008 ignore *.gem [kazutanaka]
file ChangeLog Sun Oct 12 22:45:28 -0700 2008 add install and tutorial to README [kazutanaka]
file MANIFEST Wed Sep 10 09:09:49 -0700 2008 update file list in MANIFEST and ttcluster.gemspec [kazutanaka]
file MIT-LICENSE Wed Sep 10 09:03:59 -0700 2008 add MIT-LICENSE [kazutanaka]
file README Sun Oct 12 22:45:28 -0700 2008 add install and tutorial to README [kazutanaka]
file Rakefile Sun Sep 07 09:37:58 -0700 2008 first commit [kazutanaka]
file TODO Sun Oct 12 22:45:28 -0700 2008 add install and tutorial to README [kazutanaka]
directory bin/ Sun Sep 07 09:37:58 -0700 2008 first commit [kazutanaka]
directory lib/ Wed Sep 10 08:14:00 -0700 2008 switch group as well as user [kazutanaka]
directory sample/ Wed Sep 10 08:01:11 -0700 2008 update version to 0.1.3 and add monitrc.sample [kazutanaka]
directory test/ Sun Sep 07 09:37:58 -0700 2008 first commit [kazutanaka]
file ttcluster.gemspec Sun Oct 12 22:45:28 -0700 2008 add install and tutorial to README [kazutanaka]
README
= Tokyo Tyrant Cluster

Tokyo Tyrant is a network interface to the Tokyo Cabinet DBM.
It provides replication by means of cmdline parameters.
You have to remember and type long command to start HA DBM servers.

This is a simple administration tool for Tokyo Tyrant clusters.
Just setup a pair of host:port and start.
You have a replicated DBM cluster running.


== How to install

Install the required packages of Tokyo Tyrant and Tokyo Cabinet.

Build a ttcluster gem package and install.

  $ gem build ttcluster.gemspec
  $ sudo gem install ttcluster-*.gem -l


== Tutorial

First, create a base directory.

  $ mkdir ~/ttcluster # -d default value

Then, setup a pair of replicated Tokyo Tyrant servers.

  $ ttcluster setup localhost:2008 localhost:2009 # server 2008, master 2009
  $ ttcluster setup localhost:2009 localhost:2008 # server 2009, master 2008

Check if the configuration of pair servers is valid.

  $ ttcluster config # the master of the master of a server is the original server

Start all servers and you have replicated DBM servers.

  $ ttcluster start  # default to 'all'

Control servers and play around.

  $ ttcluster stop 2008                     # down 2008
  $ ttcluster status                        # only 2009 is alive
  $ tcrmgr put -port 2009 localhost foo bar # add 'foo' key on 2009
  $ ttcluster start 2008                    # up 2008 and automatically replicated
  $ tcrmgr get -port 2008 -pv localhost foo # see if 2008 has 'foo' key

Use help option for other commands.

  $ ttcluster --help