Setting up a Cluster
To configure a cluster, you first need to get a single machine up and running with Enomalism2, according to the instructions elsewhere in this wiki.
Once that cluster is configured, you can create an NFS configuration to share your machine and application repository. As well, each new machine must be able to connect to the primary machine's MySQL database, so you'll need to modify the MySQL permissions like this:
GRANT ALL ON enomalism2.* TO <user>@'%' IDENTIFIED BY '<password>'; FLUSH PRIVILEGES;
This can be done from the mysql prompt, or using any mysql management tool. It allows all machines access to login with your enomalism user/password defined in the install doc.
Next, make sure that to edit the configuration file for the new server which is joining the cluster. All configuration files must be CORRECT before continuing, otherwise you need to edit the configuration information in the database. This is easy to do, but it is better to get it right to start with.
- Copy the default.cfg to config/$HOSTNAME.cfg by doing this
cp default.cfg config/$HOSTNAME.cfg
- Edit config/$HOSTNAME.cfg
- Change enomalism2.ip_addr="127.0.0.1" to the actual externally routable ip address of the new server.
- Change sqlobject.dburi="mysql://USER:PASSWD@HOSTNAME/DBNAME" to reflect your proper MySQL username and password, database and host names. These should be the SAME as the original server.
- Change enomalism2.self="INSERT NEW UUID HERE" to reflect a unique identifier for your machine (each instance needs to be unique). You can run uuidgen from the command line to get a new UUID. NO TWO MACHINES CAN HAVE THE SAME UUID!!!
- Change enomalism2.baseurl="http://127.0.0.1:8080/rest/" to the IP/hostname you use to access the Enomalism2 web interface on the new machine.
Once these items are accomplished, start enomalism as per the instructions in the single machine setup, and then visit http://newmachine:8080/install in order to add it to the cluster.
