Skip to content
README.md 2.55 KiB
Newer Older
iSergio's avatar
iSergio committed
# Kit of scripts for configure PostgreSQL + PgPool-II + JBoss 7.2.0.Final + Apache 2.4 ModCluster
iSergio's avatar
iSergio committed
* httpd - Contains nessary configs files, and script for automatic configure httpd and mod_cluster
* jboss Contains script for configure two servers as one cluster, applications for test cluster and some console utils
* pgpool - Contains examples configs, init script and script for autoconfigure pgpool-II
iSergio's avatar
iSergio committed
* postgres - Contains auto configure stream replication and console utils

iSergio's avatar
iSergio committed
## Getting started
iSergio's avatar
iSergio committed
First you need edit config file [contrib/config](https://sergeserver.noip.me/gitlab/iSergio/jboss-cluster/blob/master/contrib/config) and fill in the values based on your cluster settings
iSergio's avatar
iSergio committed
1. PRIMARY_HOST - Host which will be primary in you system
2. STANDBY_HOST - Host which will be standby in you system
iSergio's avatar
iSergio committed
3. CLUSTER_SUBNET - Network subnet for access mod cluster manager
4. PGPOOL_TRUSTED_SERVERS - Trusted server list which are used to confirm network connection (hostA,hostB,hostC,...)
5. PGPOOL_DELEGATE_IP - Delegate IP address. If this is empty, virtual IP never bring up.
6. PGPOOL_INTERFACE - Interface on which will be up/down virtual ip address
iSergio's avatar
iSergio committed

iSergio's avatar
iSergio committed
All runs commands assuming what all components placed on one server. Example:
iSergio's avatar
iSergio committed

iSergio's avatar
iSergio committed
Primary server:
* PostgreSQL
* PgPool-II
* Httpd(ServerGOD)
* JBoss 7.2.0.Final
iSergio's avatar
iSergio committed

iSergio's avatar
iSergio committed
Standby server:
* PostgreSQL
* PgPool-II
* Httpd(ServerGOD)
* JBoss 7.2.0.Final

iSergio's avatar
iSergio committed
### Configure Primary server
iSergio's avatar
iSergio committed
1. Configure PostgreSQL stream replication
    1. cd postgresql
    2. ./configure.sh
    3. pg_replication -c
2. Configure pgpool:
    1. cd pgpool
    2. ./configure.sh
3. Configure https (ServerGOD)
    1. cd httpd
    2. ./configure.sh
iSergio's avatar
iSergio committed
4. Configure JBoss 7.2.0.Final
    1. cd jboss
iSergio's avatar
iSergio committed
    2. ./configure.sh -p -d

### Configure Standby server
1. Configure pgpool:
    1. cd pgpool
    2. ./configure.sh -s
2. Configure https (ServerGOD)
    1. cd httpd
    2. ./configure.sh -s
3. Configure JBoss 7.2.0.Final
    1. cd jboss
    2. ./configure.sh -s
iSergio's avatar
iSergio committed

## Provided utils
### PostgreSQL and PgPool-II utils
pg_attach_node - Simple attach node to pgpool. Only one parameter need - number of node
iSergio's avatar
iSergio committed

pg_auto_attach_node - Try auto attach down node. This script executes once a minute by cron. Or may be executed by hand

iSergio's avatar
iSergio committed
pg_failover - This script fires when any node in failed.
iSergio's avatar
iSergio committed

iSergio's avatar
iSergio committed
pg_recovery - Auto recovery node(See -h).
iSergio's avatar
iSergio committed

iSergio's avatar
iSergio committed
pg_replication - Configure stream replication between two servers(-c). Show status of replication, pgpool nodes and watchdog(-s). Also see help (-h)

### JBoss 7.2.0.Final utils
dodeploy [dir for recurse search] - deploy war/ear/jar to JBoss from directory recursive