Deploy Keepalived

Deploy KeepalivedΒΆ

Keepalived is a framework that provides high availability and load balancing to Linux systems. Keepalived provides a virtual IP address that network clients use as a main entry point to access the CI/CD services distributed between nodes. Therefore, in MCP, Keepalived is used in HA (multiple-node warm-standby) configuration to keep track of services availability and manage failovers.

Warning

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 0.0.0.0.

Therefore, verify that your deployment workflow is correct:

  1. Keepalived
  2. Galera
  3. HAProxy

To deploy Keepalived:

salt -C 'I@keepalived:cluster' state.sls keepalived -b 1

To verify the VIP address:

  1. Determine the VIP address for the current environment:

    salt -C 'I@keepalived:cluster' pillar.get keepalived:cluster:instance:VIP:address
    

    Example of system output:

    ctl03.mk22-lab-basic.local:
    172.16.10.254
    ctl02.mk22-lab-basic.local:
    172.16.10.254
    ctl01.mk22-lab-basic.local:
    172.16.10.254
    

    Note

    You can also find the Keepalived VIP address in the following files of the Reclass model:

    • /usr/share/salt-formulas/reclass/service/keepalived/cluster/single.yml, parameter keepalived.cluster.instance.VIP.address
    • /srv/salt/reclass/classes/cluster/<ENV_NAME>/openstack/control.yml, parameter cluster_vip_address
  2. Verify if the obtained VIP address is assigned to any network interface on one of the controller nodes:

    salt -C 'I@keepalived:cluster' cmd.run "ip a | grep <ENV_VIP_ADDRESS>"
    

Note

Remember that multiple clusters are defined. Therefore, verify that all of them are up and running.