cluster.ini#
The cluster.ini
config file, located at /etc/squirro/cluster.ini
configures the workings of the Cluster Service that allows Squirro to run on multiple servers.
Securing the Cluster Service#
The Cluster Service manages MySql and Redis Servers thereby keeping the state between multiple Squirro “Cluster Nodes” in sync. To synchronize the MySql Server instances, Squirro leverages MySql replication along with with the following MySql users:
“repl” used to configure and run MySql replication
“cluster” for everything else such as restoring data dumps.
Note that it is much easier and recommended to set these passwords before configuring a multi-node cluster as changing the password of the repl user on a running cluster is more disruptive. (Instructions for how to change the password of the MySql repl user on a live cluster are in the works, and will likely involve selectively taking nodes out of the cluster one by one.)
These two users are configured with a default password which you can configure as follows.
Generate two passwords. Lets refer to the generated passwords as $PASSWORD_REPL and $PASSWORD_CLUSTER
First configure the passwords in
/etc/squirro/cluster.ini
of all the Squirro “Cluster Nodes” like so:[mysql] db = mysql://cluster:[email protected]:3306 repl_password = $PASSWORD_REPL
On all Squirro “cluster nodes” change the passwords like so:
sudo su mysql -e "SET PASSWORD FOR cluster = PASSWORD(\"$PASSWORD_CLUSTER\")" mysql -e "SET PASSWORD FOR repl = PASSWORD(\"$PASSWORD_REPL\")"
Restart the cluster service to pick up the change:
systemctl restart sqclusterd