HAProxy Enterprise Documentation 2.1r1

Community to Enterprise

This section show you how to upgrade an active/passive or active/active cluster that is running HAProxy Community edition into one that runs HAProxy Enterprise.

The process consists of several phases:

  1. Install HAProxy Enterprise on both nodes and check their configuration

  2. Remove one node from the cluster, stop HAProxy, and then start HAProxy Enterprise

  3. Repeat on the other node

The sections below describe this process in more detail.

Install HAProxy Enterprise

  1. Install HAProxy Enterprise on both nodes according to instructions in the Installation guide, but do not start it.

  2. Copy the existing HAProxy configuration file to the HAProxy Enterprise directory:

    $ cp /etc/haproxy/haproxy.conf /etc/hapee-2.1/hapee-lb.cfg
  3. Verify that the configuration is valid by running the command below. The -c argument tells HAProxy Enterprise to check the configuration only, but not start it.

    $ /opt/hapee-2.1/sbin/hapee-lb -c -f /etc/hapee-2.1/hapee-lb.cfg
    Configuration file is valid
    • The message "Configuration file is valid" means that everything is fine.

    • Errors/warnings that appear in the console explain the problems encountered.

    • Once the configuration is valid, you can proceed.

Make the switch to HAProxy Enterprise

  1. Identify which node you want to upgrade first. If you are running an active/standby cluster, look in the file /etc/keepalived/keepalived.conf to find the node with the lower priority value to work on first. This will be the standby node. Verify that it doesn't have any traffic first.

    If you are running an active/active cluster, retract the announcements for the node you are working on, and announce it again when you finish the configuration. This depends on the tool you use. Commonly, running service quagga stop retracts the announcements, and service quagga start announces them again.

  2. Stop HAProxy Community:

    $ sudo systemctl stop haproxy
  3. Start HAProxy Enterprise:

    $ sudo systemctl start hapee-2.1-lb
  4. Verify that everything works.

    • Tail the logs to see any warnings/errors from the startup:

      tail /var/log/syslog
    • Run wget -O /dev/null localhost and ensure that you get a successful response. You may need to customize this depending on the IP addresses and ports that HAProxy Enterprise listens on. This is an optional, practical test.

  5. Edit /etc/keepalived/keepalived.conf to make the standby node the primary.

  6. We recommend that you pause here for half an hour or so. If unforeseen problems arise, it is easier to swap it back and contact HAProxy Technologies support for assistance.

  7. Repeat on the other node to complete the transition.

Post-transition tasks

The following are tasks that you might want to carry out once you are running HAProxy Enterprise:

  • Switch from using Keepalived to using the HAProxy Enterprise VRRP package or switch Quagga to using the hapee-extras-route package and the HAProxy Enterprise Route Health Injection package.

    • This is optional; but our versions contain patches, and we can help you better with clustering support if you switch.

    • Also, hapee-extras-route allows you to use Route Health Injection (hapee-extras-rhi). Most versions of keepalived and hapee-extras-vrrp work together if you copied the configurations.

    • BGP/RHI can be more complicated, depending on the announcement daemons that you use; but they are compatible after you configure them.

  • Add HAProxy Enterprise modules to your configuration (such as Update, JS challenges, reCAPTCHA, and the WAF modules).

  • Send your configuration to Support team for a general review; we will be happy to look it over and give you any general feedback or potential improvements if you wish.