Deploy Galera (MySQL)

Deploy Galera (MySQL)ΒΆ

Galera cluster is a synchronous multi-master database cluster based on the MySQL storage engine. Galera is an HA service that provides scalability and high system uptime.


The HAProxy state should not be deployed prior to Galera. Otherwise, the Galera deployment will fail because of the ports/IP are not available due to HAProxy is already listening on them attempting to bind to

Therefore, verify that your deployment workflow is correct:

  1. Keepalived
  2. Galera
  3. HAProxy


For details on the Galera service configurations, see Configure Galera parameters.

To deploy Galera:

  1. Log in to the Salt Master node.

  2. Apply the galera state:

    salt -C 'I@galera:master' state.sls galera
    salt -C 'I@galera:slave' state.sls galera -b 1
  3. Verify that Galera is up and running:

    salt -C 'I@galera:master' mysql.status | grep -A1 wsrep_cluster_size
    salt -C 'I@galera:slave' mysql.status | grep -A1 wsrep_cluster_size