Cluster Configuration

From Roaring Penguin
Jump to: navigation, search

Adding a machine to what we refer to as a CanIt Cluster is a two-step process:

1) Configure the Database to accept TCP connections from the soon-to-be-added machine.

2) Configure that new machine to use the existing database. and that's it.


Step 1, done on the existing DataBase machine, is the most complicated:

a) Edit /etc/postgresql/X.X/main/postgresql.conf (where "X.X" is the version number) to ensure that the lines are changed to read:

  listen_addresses = '*'
  port = 5432

if those aren't there already.

b) Edit /etc/postgresql/X.X/main/pg_hba.conf to add a line for the new machine to be allowed to connect, e.g. for IP 192.168.1.3

  host all all 192.168.1.3/32 trust

(using the correct IP address, of course...)

Changes to postgresql.conf require a PostgreSQL restart via

  /etc/init.d/postgresql restart

Step 2, done on the new machine is a single command:

  canit-prepare-system

which asks if you want to keep the current PostgreSQL settings.

The answer is, "No". It then prompts you for the information for the (existing) DataBase machine.

If you're unsure of those values, the existing machine's /etc/mail/canit/canit.conf file has the answers thet you need.

At this point, when you log into the WebUI and go to Setup->Cluster Management, you'll see an entry for the new machine. (Well, it takes a few seconds...)