wiki:GROUPReplicate

Version 3 (modified by krit, 2 years ago) (diff)

--

Group Replicate

Ref here

We use docker swarm 3 nodes

  1. pull image to 3 docker nodes
    $ docker pull mysql/mysql-server:8.0
    
  1. Using docker-compose.yml file in atttached here
    $ 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
    
  1. 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          
    
  1. On master node

Attachments (1)

Download all attachments as: .zip