Upgrade
Upgrade HAProxy Enterprise on Linux
To upgrade to a new, major version of HAProxy Enterprise (e.g. 3.0r1) from an older version, please use the Upgrade procedure. However, if you want to install the latest patches for your current version without upgrading to a new, major version, please use the Update procedure.
You can upgrade HAProxy Enterprise to version 3.0r1 on the following operating systems:
HAProxy Enterprise version | Release date | End of life | Supported OS |
---|---|---|---|
3.0r1 | Oct 2024 | Feb 2029 |
|
Upgrade to a new version Jump to heading
The following upgrade procedure installs a new major version of HAProxy Enterprise.
-
If the HAProxy Enterprise server is part of a high-availability cluster, take it out of the cluster:
- If using Active/Active clustering, update your network to stop sending traffic to the load balancer. For example, if using DNS roundrobin, remove the load balancer from DNS.
- If using Active/Standby clustering, then on the active load balancer edit
/etc/hapee-extras/hapee-vrrp.cfg
. Lower thepriority
value to less than the standby load balancer’spriority
. This will put the active load balancer into the standby state and simultaneously activate the standby load balancer. Then restart thehapee-extras-vrrp
service.
-
Install HAProxy Enterprise by running the following command, specifying the desired version with
--version
, and replacing<HAProxy Enterprise Key>
with your HAProxy Enterprise license key. Below, we install HAProxy Enterprise 3.0r1:nixwget https://www.haproxy.com/static/install_haproxy_enterprise.shsudo bash ./install_haproxy_enterprise.sh \--version 3.0r1 \--key <HAProxy Enterprise key>nixwget https://www.haproxy.com/static/install_haproxy_enterprise.shsudo bash ./install_haproxy_enterprise.sh \--version 3.0r1 \--key <HAProxy Enterprise key> -
Update additional modules: you may be running additional modules with HAProxy Enterprise, which you must also reinstall when you upgrade to a new release. Install a package using its name, for example:
nixsudo apt-get install hapee-<VERSION>-lb-updatenixsudo apt-get install hapee-<VERSION>-lb-updateExample for HAProxy Enterprise 3.0r1:
nixsudo apt-get install hapee-3.0r1-lb-updatenixsudo apt-get install hapee-3.0r1-lb-updatenixsudo yum install hapee-<VERSION>-lb-updatenixsudo yum install hapee-<VERSION>-lb-updateExample for HAProxy Enterprise 3.0r1:
nixsudo yum install hapee-3.0r1-lb-updatenixsudo yum install hapee-3.0r1-lb-updatenixsudo zypper install hapee-<VERSION>-lb-updatenixsudo zypper install hapee-<VERSION>-lb-updateExample for HAProxy Enterprise 3.0r1:
nixsudo zypper install hapee-3.0r1-lb-updatenixsudo zypper install hapee-3.0r1-lb-updatenixsudo pkg install hapee-<VERSION>-lb-updatenixsudo pkg install hapee-<VERSION>-lb-updateExample for HAProxy Enterprise 3.0r1:
nixsudo pkg install hapee-3.0r1-lb-updatenixsudo pkg install hapee-3.0r1-lb-update -
Copy
/etc/hapee-<PREVIOUS VERSION>/hapee-lb.cfg
over to/etc/hapee-3.0/hapee-lb.cfg
and any associated files (maps, certificates, etc). -
Optionally, you might want to validate your configuration against the new load balancer before disabling the old load balancer. Use the
-c
option to check the configuration.nix/opt/hapee-3.0/sbin/hapee-lb -c -f /etc/hapee-3.0/hapee-lb.cfgnix/opt/hapee-3.0/sbin/hapee-lb -c -f /etc/hapee-3.0/hapee-lb.cfgAbout the configuration checking command
- In version 2.8 and earlier, the command indicates a valid configuration by printing
Configuration file is valid
in addition to setting the zero return status. - In version 2.9 and later, the command sets the zero return status for a valid configuration but does not display a message. To display the message, include the
-V
option on the command line.
Multiple configuration files
If you have multiple configuration files in your application, be sure to check them all in the correct order.
- In version 2.8 and earlier, the command indicates a valid configuration by printing
-
Disable the old HAProxy Enterprise version from starting with the system, as follows:
nixsudo systemctl disable hapee-<PREVIOUS VERSION>-lbnixsudo systemctl disable hapee-<PREVIOUS VERSION>-lb -
Ensure that the new HAProxy Enterprise version starts with the system, as follows:
nixsudo systemctl enable hapee-3.0-lbnixsudo systemctl enable hapee-3.0-lb -
Stop the old HAProxy Enterprise daemon and start the new daemon:
nixsudo systemctl stop hapee-<PREVIOUS VERSION>-lbsudo systemctl start hapee-3.0-lbnixsudo systemctl stop hapee-<PREVIOUS VERSION>-lbsudo systemctl start hapee-3.0-lb -
Run
tail -f /var/log/syslog
(or distribution equivalent) to check for warnings or errors. -
Run
curl localhost
to ensure that HAProxy Enterprise is responding. Adjust address/port as needed, and use a local address that is currently active on the box and not a VRRP IP. -
Put the upgraded server back into the cluster.
-
Repeat this procedure on secondary load balancers after restoring the current load balancer to active service.
Post-upgrade Jump to heading
After you upgrade, see the section on enterprise modules on how to enable and configure each one.
After the new HAProxy Enterprise version has been running for a while, you can uninstall the old HAProxy Enterprise version. To uninstall a package:
nix
sudo apt purge hapee-<PREVIOUS VERSION>-lbsudo rm /etc/rsyslog.d/<PREVIOUS VERSION>.confsudo systemctl restart rsyslog
nix
sudo apt purge hapee-<PREVIOUS VERSION>-lbsudo rm /etc/rsyslog.d/<PREVIOUS VERSION>.confsudo systemctl restart rsyslog
nix
sudo apt purge hapee-<PREVIOUS VERSION>-lbsudo rm /etc/rsyslog.d/<PREVIOUS VERSION>.confsudo systemctl restart rsyslog
nix
sudo apt purge hapee-<PREVIOUS VERSION>-lbsudo rm /etc/rsyslog.d/<PREVIOUS VERSION>.confsudo systemctl restart rsyslog
nix
sudo yum remove hapee-<PREVIOUS VERSION>-lbsudo rm /etc/rsyslog.d/<PREVIOUS VERSION>.confsudo systemctl restart rsyslog
nix
sudo yum remove hapee-<PREVIOUS VERSION>-lbsudo rm /etc/rsyslog.d/<PREVIOUS VERSION>.confsudo systemctl restart rsyslog
nix
sudo zypper remove hapee-<PREVIOUS VERSION>-lb
nix
sudo zypper remove hapee-<PREVIOUS VERSION>-lb
Update HAProxy Enterprise Jump to heading
The update procedure installs the latest build for your current HAProxy Enterprise version in order to benefit from the latest bug fixes.
-
Optional: Save the current load balancer configuration as a backup. For example, on HAProxy Enterprise 3.0r1:
nixsudo cp /etc/hapee-3.0/hapee-lb.cfg /etc/hapee-3.0/hapee-lb.cfg.currentnixsudo cp /etc/hapee-3.0/hapee-lb.cfg /etc/hapee-3.0/hapee-lb.cfg.current -
Optional: Simulate the package upgrade to check for potential errors:
nixsudo apt updatesudo apt upgrade --simulatenixsudo apt updatesudo apt upgrade --simulatenixsudo apt updatesudo apt upgrade --simulatenixsudo apt updatesudo apt upgrade --simulatenixsudo yum check-updatenixsudo yum check-updatenixsudo zypper update --dry-runnixsudo zypper update --dry-runSearch the output for
hapee
, which will show the new package version. If there are no errors, perform the upgrade. -
Upgrade the packages on your system. Note that a prompt may display asking whether the system can restart service automatically during the upgrade. To avoid any disruption to service, you can uncheck HAProxy Enterprise from this list and then manually call
systemctl reload hapee-3.0-lb
, which will not drop traffic.nixsudo apt updatesudo apt upgradenixsudo apt updatesudo apt upgradenixsudo apt updatesudo apt upgradenixsudo apt updatesudo apt upgradenixsudo yum updatenixsudo yum updatenixsudo zypper updatenixsudo zypper update -
Reload the HAProxy Enterprise service to start the new version. For example, on HAProxy Enterprise 3.0r1:
nixsudo systemctl reload hapee-3.0-lbnixsudo systemctl reload hapee-3.0-lb
Do you have any suggestions on how we can improve the content of this page?