Upgrade
Upgrade HAProxy Enterprise on Docker
You can upgrade HAProxy Enterprise to version 3.1r1 as a Docker container.
Prepare for the upgrade Jump to heading
-
Issues with the HAProxy Enterprise configuration can cause the load balancer to fail after an upgrade. Even if the service is performing as desired before the upgrade, the upgrade could introduce changes that cause a failure afterward.
Validate the HAProxy Enterprise configuration file before proceeding with the upgrade. Example: validate the configuration for version 2.9:
nixsudo /opt/hapee-2.9/sbin/hapee-lb -c -f /etc/hapee-2.9/hapee-lb.cfg -Vnixsudo /opt/hapee-2.9/sbin/hapee-lb -c -f /etc/hapee-2.9/hapee-lb.cfg -Vnixsudo docker exec hapee /opt/hapee-2.9/sbin/hapee-lb -c -f /etc/hapee-2.9/hapee-lb.cfg -Vnixsudo docker exec hapee /opt/hapee-2.9/sbin/hapee-lb -c -f /etc/hapee-2.9/hapee-lb.cfg -VAbout the configuration validation 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.
Alerts and warnings that appear in the console output explain the errors encountered. An alert is a fatal condition and prohibits the service from starting. A warning indicates a condition that is not fatal now but may become fatal in the target release. Address all the errors until you receive the successful output:
Configuration file is valid
. - In version 2.8 and earlier, the command indicates a valid configuration by printing
-
Preserve application files in the old container by copying them to the host computer. For example, copy the configuration directory for version 2.9:
nixsudo docker cp hapee:/etc/hapee-2.9 ./nixsudo docker cp hapee:/etc/hapee-2.9 ./Copy map files, ACL files, certificates, WAF rule files, and so on.
Upgrade to HAProxy Enterprise 3.1r1 Jump to heading
The following procedure installs a new major version of HAProxy Enterprise.
-
Log into the
hapee-registry.haproxy.com
Docker registry, using the key you were given when you registered as the username and password.nixsudo docker login https://hapee-registry.haproxy.comnixsudo docker login https://hapee-registry.haproxy.com -
Pull the HAProxy Enterprise image.
nixsudo docker pull hapee-registry.haproxy.com/haproxy-enterprise:3.1r1nixsudo docker pull hapee-registry.haproxy.com/haproxy-enterprise:3.1r1 -
Stop and remove any previously running HAProxy Enterprise containers:
nixsudo docker stop <OLD CONTAINER NAME>sudo docker rm <OLD CONTAINER NAME>nixsudo docker stop <OLD CONTAINER NAME>sudo docker rm <OLD CONTAINER NAME> -
Start the new Docker container, referencing the directory containing your applications files as a volume by using the
-v
flag.nixsudo docker run \--name hapee-3.1 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-v $(pwd):/etc/hapee-3.1r1 \--restart=unless-stopped \hapee-registry.haproxy.com/haproxy-enterprise:3.1r1nixsudo docker run \--name hapee-3.1 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-v $(pwd):/etc/hapee-3.1r1 \--restart=unless-stopped \hapee-registry.haproxy.com/haproxy-enterprise:3.1r1Review the configuration to ensure HAProxy Enterprise successfully locates application files such as the configuration file, map files, ACL files, TLS certificates, and so on.
-
Validate the HAProxy Enterprise configuration file against the new version:
nixsudo docker exec hapee /opt/hapee-3.1/sbin/hapee-lb -c -f /etc/hapee-3.1/hapee-lb.cfg -Vnixsudo docker exec hapee /opt/hapee-3.1/sbin/hapee-lb -c -f /etc/hapee-3.1/hapee-lb.cfg -VAlerts and warnings that appear in the console output explain the errors encountered. Address all the errors until you receive the successful output:
Configuration file is valid
.
Do you have any suggestions on how we can improve the content of this page?