diff --git a/CMakeLists.txt b/CMakeLists.txt index 62abd54a7..ef21fa1d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,6 +171,9 @@ install(FILES ${CMAKE_BINARY_DIR}/Changelog.txt DESTINATION ${MAXSCALE_SHAREDIR} install(FILES ${CMAKE_BINARY_DIR}/ReleaseNotes.txt DESTINATION ${MAXSCALE_SHAREDIR}) install(FILES ${CMAKE_BINARY_DIR}/UpgradingToMaxScale110.txt DESTINATION ${MAXSCALE_SHAREDIR}) install(FILES server/maxscale_template.cnf DESTINATION ${MAXSCALE_SHAREDIR}) +if(WITH_MAXSCALE_CNF) + install(FILES server/maxscale_template.cnf DESTINATION ${MAXSCALE_CONFDIR} RENAME maxscale.cnf) +endif() install(FILES server/maxscale_binlogserver_template.cnf DESTINATION ${MAXSCALE_SHAREDIR}) install(FILES ${ERRMSG} DESTINATION ${MAXSCALE_VARDIR}/lib/maxscale PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/Documentation/filters/Database-Firewall-Filter.md b/Documentation/Filters/Database-Firewall-Filter.md similarity index 100% rename from Documentation/filters/Database-Firewall-Filter.md rename to Documentation/Filters/Database-Firewall-Filter.md diff --git a/Documentation/filters/Query-Log-All-Filter.md b/Documentation/Filters/Query-Log-All-Filter.md similarity index 100% rename from Documentation/filters/Query-Log-All-Filter.md rename to Documentation/Filters/Query-Log-All-Filter.md diff --git a/Documentation/filters/RabbitMQ-Consumer-Client.md b/Documentation/Filters/RabbitMQ-Consumer-Client.md similarity index 100% rename from Documentation/filters/RabbitMQ-Consumer-Client.md rename to Documentation/Filters/RabbitMQ-Consumer-Client.md diff --git a/Documentation/filters/RabbitMQ-Filter.md b/Documentation/Filters/RabbitMQ-Filter.md similarity index 100% rename from Documentation/filters/RabbitMQ-Filter.md rename to Documentation/Filters/RabbitMQ-Filter.md diff --git a/Documentation/filters/Regex-Filter.md b/Documentation/Filters/Regex-Filter.md similarity index 100% rename from Documentation/filters/Regex-Filter.md rename to Documentation/Filters/Regex-Filter.md diff --git a/Documentation/filters/Tee-Filter.md b/Documentation/Filters/Tee-Filter.md similarity index 100% rename from Documentation/filters/Tee-Filter.md rename to Documentation/Filters/Tee-Filter.md diff --git a/Documentation/filters/Top-N-Filter.md b/Documentation/Filters/Top-N-Filter.md similarity index 100% rename from Documentation/filters/Top-N-Filter.md rename to Documentation/Filters/Top-N-Filter.md diff --git a/Documentation/monitors/Galera-Monitor.md b/Documentation/Monitors/Galera-Monitor.md similarity index 100% rename from Documentation/monitors/Galera-Monitor.md rename to Documentation/Monitors/Galera-Monitor.md diff --git a/Documentation/monitors/MM-Monitor.md b/Documentation/Monitors/MM-Monitor.md similarity index 100% rename from Documentation/monitors/MM-Monitor.md rename to Documentation/Monitors/MM-Monitor.md diff --git a/Documentation/monitors/MySQL-Monitor.md b/Documentation/Monitors/MySQL-Monitor.md similarity index 100% rename from Documentation/monitors/MySQL-Monitor.md rename to Documentation/Monitors/MySQL-Monitor.md diff --git a/Documentation/monitors/NDB-Cluster-Monitor.md b/Documentation/Monitors/NDB-Cluster-Monitor.md similarity index 100% rename from Documentation/monitors/NDB-Cluster-Monitor.md rename to Documentation/Monitors/NDB-Cluster-Monitor.md diff --git a/Documentation/routers/ReadConnRoute.md b/Documentation/Routers/ReadConnRoute.md similarity index 100% rename from Documentation/routers/ReadConnRoute.md rename to Documentation/Routers/ReadConnRoute.md diff --git a/Documentation/routers/ReadWriteSplit.md b/Documentation/Routers/ReadWriteSplit.md similarity index 100% rename from Documentation/routers/ReadWriteSplit.md rename to Documentation/Routers/ReadWriteSplit.md diff --git a/Documentation/routers/SchemaRouter.md b/Documentation/Routers/SchemaRouter.md similarity index 100% rename from Documentation/routers/SchemaRouter.md rename to Documentation/Routers/SchemaRouter.md diff --git a/cmake/macros.cmake b/cmake/macros.cmake index d7921f1c4..49f4096dc 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -23,6 +23,9 @@ macro(set_variables) # Use C99 set(USE_C99 FALSE CACHE BOOL "Use C99 standard") + # Install the template maxscale.cnf file + set(WITH_MAXSCALE_CNF TRUE CACHE BOOL "Install the template maxscale.cnf file") + # hostname or IP address of MaxScale's host set(TEST_HOST "127.0.0.1" CACHE STRING "hostname or IP address of MaxScale's host") diff --git a/server/maxscale_template.cnf b/server/maxscale_template.cnf index feec5695d..0928a750d 100644 --- a/server/maxscale_template.cnf +++ b/server/maxscale_template.cnf @@ -128,6 +128,10 @@ module=regexfilter match=fetch replace=select +[hint] +type=filter +module=hintfilter + ## A series of service definition # @@ -218,11 +222,21 @@ router=readwritesplit servers=server1,server2,server3 user=myuser passwd=mypwd -#use_sql_variables_in= -#max_slave_connections=100% +max_slave_connections=100% +#use_sql_variables_in=master #max_slave_replication_lag=21 -#router_options=slave_selection_criteria= -#filters=fetch|qla +#filters=hint|fetch|qla +#router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS + +# Uncomment this to disable the saving of session modifying comments. Some scripting +# languages use connection pooling and will use the same session. MaxScale sees them +# as the same session and stores them for the slave recovery process. +#router_options=disable_sescmd_history=true,disable_slave_recovery=true + +# This will allow the master server to be used for read queries. By default +# MaxScale will only use the master for write queries. +#router_options=master_accept_reads=true + [Debug Interface] type=service @@ -265,27 +279,26 @@ service=Read Connection Router protocol=MySQLClient address=192.168.100.102 port=4008 -#socket=/tmp/readconn.sock +socket=/var/lib/maxscale/readconn.sock [RW Split Listener] type=listener service=RW Split Router protocol=MySQLClient port=4006 -#socket=/tmp/rwsplit.sock +#socket=/var/lib/maxscale/rwsplit.sock [Debug Listener] type=listener service=Debug Interface protocol=telnetd -#address=127.0.0.1 +address=127.0.0.1 port=4442 [CLI Listener] type=listener service=CLI protocol=maxscaled -#address=localhost port=6603 ## Definition of the servers @@ -314,18 +327,18 @@ port=6603 [server1] type=server -address=192.168.100.101 -port=3000 +address=127.0.0.1 +port=3306 protocol=MySQLBackend [server2] type=server -address=192.168.100.102 -port=3000 +address=127.0.0.1 +port=3306 protocol=MySQLBackend [server3] type=server -address=192.168.100.103 -port=3000 +address=127.0.0.1 +port=3306 protocol=MySQLBackend