The Dockerfile is used to build a Docker image with all MaxScale dependencied included. A short readme for using the image is attached.
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
# Server definitions
 | 
						|
# Set the address of the server to the network address of a MySQL server.
 | 
						|
 | 
						|
[server1]
 | 
						|
type=server
 | 
						|
address=127.0.0.1
 | 
						|
port=3306
 | 
						|
protocol=MySQLBackend
 | 
						|
 | 
						|
# Monitor for the servers
 | 
						|
# This will keep MaxScale aware of the state of the servers.
 | 
						|
# MySQL Monitor documentation:
 | 
						|
# https://github.com/mariadb-corporation/MaxScale/blob/develop/Documentation/Monitors/MySQL-Monitor.md
 | 
						|
 | 
						|
[MySQL-Monitor]
 | 
						|
type=monitor
 | 
						|
module=mysqlmon
 | 
						|
servers=server1
 | 
						|
user=myuser
 | 
						|
passwd=mypwd
 | 
						|
monitor_interval=1000
 | 
						|
 | 
						|
# Service definitions
 | 
						|
# Service Definition for a read-only service and a read/write splitting service.
 | 
						|
 | 
						|
# ReadConnRoute documentation:
 | 
						|
# https://github.com/mariadb-corporation/MaxScale/blob/develop/Documentation/Routers/ReadConnRoute.md
 | 
						|
 | 
						|
[Read-Only-Service]
 | 
						|
type=service
 | 
						|
router=readconnroute
 | 
						|
servers=server1
 | 
						|
user=myuser
 | 
						|
passwd=mypwd
 | 
						|
router_options=slave
 | 
						|
 | 
						|
# ReadWriteSplit documentation:
 | 
						|
# https://github.com/mariadb-corporation/MaxScale/blob/develop/Documentation/Routers/ReadWriteSplit.md
 | 
						|
 | 
						|
[Read-Write-Service]
 | 
						|
type=service
 | 
						|
router=readwritesplit
 | 
						|
servers=server1
 | 
						|
user=myuser
 | 
						|
passwd=mypwd
 | 
						|
max_slave_connections=100%
 | 
						|
 | 
						|
# Listener definitions for the services
 | 
						|
# Listeners represent the ports the services will listen on.
 | 
						|
 | 
						|
[Read-Only-Listener]
 | 
						|
type=listener
 | 
						|
service=Read-Only-Service
 | 
						|
protocol=MySQLClient
 | 
						|
port=4008
 | 
						|
 | 
						|
[Read-Write-Listener]
 | 
						|
type=listener
 | 
						|
service=Read-Write-Service
 | 
						|
protocol=MySQLClient
 | 
						|
port=4006
 |