In this blog post, we’ll point to a new Docker image for Percona Server for MySQL Group Replication.
Our most recent release of Percona Server for MySQL (Percona Server for MySQL 5.7.17) comes with Group Replication plugins. Unfortunately, since this technology is very new, it requires some fairly complicated steps to setup and get running. To help with that process, I’ve prepare Docker images that simplify its setup procedures.
You can find the image here: https://hub.docker.com/r/perconalab/pgr-57/.
To start the first node (bootstrap the group):
1 |
docker run -d -p 3306 --net=clusternet -e MYSQL_ROOT_PASSWORD=passw0rd -e CLUSTER_NAME=cluster1 perconalab/pgr-57 |
To add nodes into the group after:
1 |
docker run -d -p 3306 --net=clusternet -e MYSQL_ROOT_PASSWORD=passw0rd -e CLUSTER_NAME=cluster1 -e CLUSTER_JOIN=CONTAINER_ID_FROM_THE_FIRST_STEP perconalab/pgr-57 |
You can also get a full script that starts “N” number of nodes, here: https://github.com/Percona-Lab/percona-docker/blob/master/pgr-57/start_node.sh
Thanks a lot indeed.
Does TokuDB work with group replication?
How to start using “docker service” / swarm with replicas ?
We also created a script which allows starting group replication from a binary tarball base directory (this does not use Docker). The startup.sh script is available in the Percona-QA/percona-qa github repository
Change your_group_replication_basedir to the Group Replication basedir in the below. startup.sh will generate a GR startup script called start_group_replication;
$ cd ~
$ git clone https://github.com/Percona-QA/percona-qa
$ cd your_group_replication_basedir
$ ~/percona-qa/startup.sh
Adding scripts: start | start_group_replication | start_valgrind | start_gypsy | stop | kill | setup | cl | test | init | wipe | all | prepare | run | measure | tokutek_init
Setting up server with default directories
[..]
consider switching off the –initialize-insecure option.
Done! To get a fresh instance at any time, execute: ./all (executes: stop;wipe;start;sleep 5;cl)
$