Version 4 (modified by 2 years ago) (diff) | ,
---|
Group Replicate
Ref here
We use docker swarm 3 nodes
- pull image to 3 docker nodes
$ docker pull mysql/mysql-server:8.0
- Using docker-compose.yml file in atttached here and command docker-compose stack deploy -c docker-compose.yml db
$ docker-compose stack deploy -c docker-compose.yml db Ignoring unsupported options: restart Ignoring deprecated options: container_name: Setting the container name is not supported. Creating network db_mysqlgr Creating service db_node2 Creating service db_node3 Creating service db_node1
- Check with docker stack ps db
root@n1:/home/ubuntu/GR# docker stack ps db ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS z8tarrgj0isq db_node1.1 mysql/mysql-server:8.0 n3 Running Running 50 seconds ago xt8vagtlz79c db_node2.1 mysql/mysql-server:8.0 n2 Running Running about a minute ago ve5o54jtwc4v db_node3.1 mysql/mysql-server:8.0 n1 Running Running about a minute ago
- On master node
Attachments (1)
- docker-compose.yml (3.7 KB) - added by 2 years ago.
Download all attachments as: .zip