README.rdoc in reptile-0.0.1 vs README.rdoc in reptile-0.0.4
- old
+ new
@@ -4,10 +4,56 @@
== REQUIREMENTS:
A mysql replication setup.
+== SYNOPSIS
+
+Put a config file at /etc/reptile.yml, /etc/reptile/reptile.yml, ./reptile.yml, or specify one on the command line.
+
+
+ [nick@s34 ~]$ replication_status -h
+ Usage: replication_status [path_to_config_file]
+ -h, --help Displays this help info
+ -s, --status Displays the slave status
+ -d, --diff Checks the row count difference between master and slave
+ -r, --report Sends a report email
+ -b, --heartbeat Checks the heartbeat timestamp difference between master and slave
+ [nick@s34 ~]$ replication_status -s
+ * a_database slave is up and running
+ * b_database slave is up and running
+ * c_database slave is up and running
+
+=== Super simple crontab setup
+
+ [nick@s34 ~]$ sudo crontab -l
+ Password:
+ MAILTO="user@example.com"
+ # Use the '-e' arg to only spit out errors, which will be sent out by crontab
+ */15 * * * * replication_status -e
+
+=== Setup SQL
+
+Run this SQL to setup the DBs/perms for Reptile. Using different users, since each user requires significantly different permissions.
+
+ GRANT REPLICATION SLAVE, REPLICATION CLIENT, SUPER ON *.* TO 'repl'@"localhost" IDENTIFIED BY 'repl_user_pass';
+ GRANT REPLICATION SLAVE, REPLICATION CLIENT, SUPER ON *.* TO 'repl'@"MONITOR_HOST_IP" IDENTIFIED BY 'repl_user_pass';
+
+ GRANT SELECT, REPLICATION CLIENT ON *.* TO 'ro_user'@"localhost" IDENTIFIED BY 'ro_user_pass';
+ GRANT SELECT, REPLICATION CLIENT ON *.* TO 'ro_user'@"MONITOR_HOST_IP" IDENTIFIED BY 'ro_user_pass';
+
+ CREATE DATABASE replication_monitor;
+
+ GRANT SELECT, INSERT, UPDATE, ALTER ON replication_monitor.* TO 'heartbeat_user'@"localhost" IDENTIFIED BY 'heartbeat_user_pass';
+ GRANT SELECT, INSERT, UPDATE, ALTER ON replication_monitor.* TO 'heartbeat_user'@"MONITOR_HOST_IP" IDENTIFIED BY 'heartbeat_user_pass';
+
+ CREATE TABLE replication_monitor.heartbeats (
+ unix_time INTEGER NOT NULL,
+ db_time TIMESTAMP NOT NULL,
+ INDEX time_idx(unix_time)
+ )
+
== INSTALL:
sudo gem install reptile
== LICENSE:
@@ -31,6 +77,6 @@
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.