Sign inSign up

appuio/maxscale-docker

By appuio

•Updated over 5 years ago

Deprecated

Image
0

10K+

appuio/maxscale-docker repository overview

⁠MaxScale in Docker

Docker Build Status

Dockerized MariaDB MaxScale with default config for a three node galera cluster. Various settings can be configured with environemnt variables.

⁠Run

You need to specify the addresses for DB1 through DB3 as well as passwords for service and monitoring users:

docker run -e DB1_ADDRESS=127.0.0.1 -e DB2_ADDRESS=127.0.0.2 -e DB3_ADDRESS=127.0.0.3 -e SERVICE_PWD="SuperSecret1234" -e MONITOR_PWD="EvenMoreSecret" maxscale:2.1.1

⁠Configuration

Config is done through env vars:

NameDefault valueDescription
THREADS2Thread count to run MaxScale
SERVICE_USERmaxscaleService user
SERVICE_PWDPassword for the service user
READ_WRITE_LISTEN_ADDRESS127.0.0.1Listen address for read/write service
READ_WRITE_PORT3307Listen port for read/write service
READ_WRITE_PROTOCOLMariaDBClientProtocol for read/write service
MASTER_ONLY_LISTEN_ADDRESS127.0.0.1Listen address for master only service
MASTER_ONLY_PORT3306Listen port for master only service
MASTER_ONLY_PROTOCOLMariaDBClientProtocol for master onyl service
MONITOR_USERmaxscaleMonitoring user
MONITOR_PWDPassword for the monitoring user
AUTH_CONNECT_TIMEOUT10Value for [auth_connect_timeout][]
AUTH_READ_TIMEOUT10Value for [auth_read_timeout][]
DB1_ADDRESSAddress for backend DB1
DB1_PORT3306Port for backend DB1
DB1_PRIO1Priority for backend DB1
DB2_ADDRESSAddress for backend DB2
DB2_PORT3306Port for backend DB2
DB2_PRIO2Priority for backend DB2
DB3_ADDRESSAddress for backend DB3
DB3_PORT3306Port for backend DB3
DB3_PRIO3Priority for bakcend DB3
⁠Custom configuration

To use a complete custom config, mount your own config file to /etc/maxscale.cnf:

docker run -v /home/customfile.cnf:/etc/maxscale.cnf maxscale:2.1.1

⁠Build

docker build --rm -t registry.vshn.net/vshn-docker/maxscale:2.2.1 .
docker push registry.vshn.net/vshn-docker/maxscale:2.2.1

⁠OpenShift

To run this image as a sidecar container in OpenShift, see the sidecar_template.yaml⁠ in the folder openshift. The standalone_template.yaml⁠ can be used to run a standalone instance of MaxScale. The templates need the parameters MAXSCALE_SERVICE_PW, MAXSCALE_MONITOR_PW, DB1_ADDRESS, DB2_ADDRESS, DB3_ADDRESS and DATABASE_NAME to connect to the galera cluster.

APPUiO⁠ - GitHub @appuio⁠ - Twitter @appuio⁠

Tag summary

Content type

Image

Digest

Size

120.1 MB

Last updated

over 5 years ago

docker pull appuio/maxscale-docker