#########################
## Documentation
#########################
README.txt                             Quick start guide
REFERENCE.txt                          This file
MANIFEST                               List of files in the cookbook
check_cookbook                         Verifies that the cookbook directory contains all files
help  [command]                        Shows this file (if a file name is given, displays the help for that command) 
readme                                 Shows the quick start guide

#########################
## Cluster configuration
#########################
COMMON_NODES.sh                        List of nodes in the cluster
USER_VALUES.sh                         Cluster configuration (user defined values)
USER_VALUES.local.sh                   Cluster configuration (iadditional user defined values)
BOOTSTRAP.sh                           System definition builder (For internal use)
utilities.sh                           Cluster shared routines
NODES_MASTER_SLAVE.sh                  Nodes definition for a master-slave topology
NODES_ALL_MASTERS.sh                   Nodes definition for an all-masters topology
NODES_STAR.sh                          Nodes definition for a star topology
NODES_FAN_IN.sh                        Nodes definition for a fan-in topology

#########################
## pre-installation tools
#########################
create-security-keys                   Creates keys needed for security installation
pre_req_checker/tungsten_prereq        Checks and installs pre-requisites
deploy_sandboxes                       Create database sandboxes in all servers for further installation
validate_cluster                       Validates the cluster with all the installation pre-checks

#########################
## Installation tools
#########################
install_master_slave                   Installs a master-slave topology
install_all_masters                    Installs an all-masters topology
install_fan_in                         Installs a fan-in topology
install_star                           Installs a star topology
install_master_slave_direct            Installs a master-slave topology with 'direct mode' (DEPRECATED: pending installation with tpm)
install_standard_replication           Installs standard MySQL replication
upgrade                                Provides the commands needed to upgrade from the previous version (DEPRECATED: pending installation with tpm)

#########################
## Administrative tools
#########################
take-over                              Takes over a master-slave cluster from MySQL replication
add_node_master_slave                  Add a node to a master-slave topology (DEPRECATED: pending installation with tpm)
add_node_star                          Add a node to a star topology (DEPRECATED: pending installation with tpm)
switch                                 Switches role between the master and one given slave
collect_logs                           Gets all the logs from all servers
load_data                              Starts concurrent transaction load in all masters
copy_backup                            Copies backup from a given node to another

#########################
## Cleanup tools
#########################
clear_all                              Clears the cluster inconditionally
clear_cluster                          Clears the cluster regardless of the topology

#########################
## Monitoring tools
#########################
simple_services                        Filter the output of 'trepctl services'
show_cluster                           Shows the services across all hosts 


#########################
## Shortcuts
#########################
replicator                             Shortcut to the 'replicator' command
trepctl                                Shortcut to the 'trepctl' command
thl                                    Shortcut to the 'thl' command
tool.sh                                Internal shortcut engine (not to use directly)

tungsten_provision_slave               Shortcut to the 'tungsten_provision_slave' script
tungsten_set_position                  Shortcut to the 'tungsten_set_position' script 
tungsten_read_master_events            Shortcut to the 'tungsten_read_master_events' script 
multi_trepctl                          Shortcut to the 'multi_trepctl' script 

query_node  node query                 runs a query in a given node
query_all_nodes query                  runs a query in all nodes
configure_service                      Shortcut to $TUNGSTEN_BASE/configure_service (DEPRECATED)
conf                                   Shows the configuration files using 'less'
show_conf                              Same as 'conf.sh'
edit_conf                              Edits the configuration files using 'vim'
vimconf                                Same as 'vimconf.sh'
emacsconf                              Edits the configuration files using 'emacs'
log                                    Shows the replicator log using 'less'
show_log                               Same as 'log.sh'
vilog                                  Edits the replicator log using 'vi'
vimlog                                 Edits the replicator log using 'vim'
emacslog                               Edits the replicator log using 'emacs'

heartbeat                              Performs a heartbeat in each master
paths                                  Shows the path to all important tools and services
services                               Performs 'trepctl services'
backups                                Shows which backups were taken in all nodes


#########################
## Testing tools
#########################
test_all_topologies                    Installs and tests all topologies
test_cluster                           Tests a cluster 
insert_retrieve  node1 node2           Creates a table in node1 and retrieves it from node2
tungsten_service {node|all} [service]  Shows the contents of trep_commit_seqno for a given node for all nodes. If 'service' is not given, it shows all

#########################
## ENVIRONMENT VARIABLES
#########################
## USED DURING INSTALLATION
VERBOSE=1                              Gives more information during installation (default)
VERBOSE=2                              Enables debug mode during validation
QUIET or NOVERBOSE                     Turns off VERBOSE
DRYRUN=1                               Used by all installation scripts. Shows installation commands (deprecated)
MORE_OPTIONS="..."                     Used by all installation scripts. Adds more options to the installer command
USE_TPM=1                              Enables installation with tpm (default)
OLD_INSTALLER=1                        Disables installation with tpm (deprecated)
MORE_TPM_OPTIONS="..."                 Used by all installation scripts. Adds more options to the installer command when using tpm
WITH_SECURITY=1                        Enables installation with security. Only with tpm installation.
## USED DURING TEST
BINLOG_FORMAT={STATEMENT|MIXED|ROW}    Changes the default binlog format in each master before running the test
TEST_UNDER_LOAD=1                      Runs test_cluster after launching load_data
INSTALLERS                             Use given installers for testing (default: "tungsten_installer tpm")
TOPOLOGIES                             Tests given topologies (default: "master_slave fan_in all_masters star")
## USED DURING CLEAN-UP
STOP_REPLICATORS                       Stops the replicators
REMOVE_TUNGSTEN_BASE                   Removes the directory where the software was installed
REMOVE_SERVICE_SCHEMA                  Removes the schemas tungsten_*
REMOVE_TEST_SCHEMAS                    Removes the schemas created for tests
REMOVE_DATABASE_CONTENTS=0             Removes all the database contents (default: no)
CLEAN_NODE_DATABASE_SERVER             Resets the database server to default state.

