Upgrade
Upgrade HAProxy Enterprise on AWS
The following procedures outline upgrading an instance of HAProxy Enterprise deployed in AWS via HAProxy Enterprise AMI.
Create a new instance with the latest AMI Jump to heading
The following procedure will produce a new instance of HAProxy Enterprise using the latest AMI. The new instance running the latest version of HAProxy Enterprise will replace your existing instance.
Launch a new instance with the latest AMI Jump to heading
-
Follow the steps at Launch the HAProxy Enterprise AMI to launch a new instance of HAProxy Enterprise via AMI. You can select the existing VPC, subnets, and security groups associated with your existing instance of HAProxy Enterprise.
-
Connect to your existing HAProxy Enterprise instance through its public IP address.
-
Copy the configuration file
/etc/hapee-3.0/hapee-lb.cfg
from your existing instance to your new instance. -
When the HAProxy Enterprise instance launches, the HAProxy Enterprise service is started automatically.
-
Use
systemctl reload
to reload the load balancer configuration with the copied configuration file:haproxysudo systemctl reload hapee-3.0-lbhaproxysudo systemctl reload hapee-3.0-lb
Enable the new instance Jump to heading
There are two options for changing your configuration to point to your new instance.
Option 1: Your instance uses an elastic IP address Jump to heading
If, when you created your instance running the previous version of HAProxy Enterprise, you assigned it an elastic IP, follow these steps to reassign that elastic IP to the new instance.
If for some reason your existing instance did not have an elastic IP, or you have no elastic IPs available, create an elastic IP address.
-
Open the Amazon EC2 console.
-
From the EC2 Dashboard, go to Network & Security > Elastic IPs, and in the list, find the elastic IP associated with your existing HAProxy Enterprise instance.
-
Click on the elastic IP address to open its settings.
-
Click Associate Elastic IP address.
-
Choose your new instance from the list.
-
Check the box to Allow this Elastic IP to be reassociated. This will remove the association with your previous instance and associate the elastic IP with your new instance.
Option 2: Update your DNS server Jump to heading
If you are not using elastic IP addresses, update your DNS server to use the public IPv4 address of the new instance running the latest version of HAProxy Enterprise.
-
To get the public IPv4 address of the instance, open the Amazon EC2 console.
-
From the EC2 Dashboard, go to Instances, and select the HAProxy Enterprise instance from the list. Copy its public IPv4 address.
Your new instance running the latest version of HAProxy Enterprise is now active. You can now terminate your other instance running the previous version of HAProxy Enterprise.
Terminate the previous instance Jump to heading
Terminate an instance that is no longer needed.
-
Open the Amazon EC2 console.
-
From the EC2 Dashboard, go to Instances, and in the list, find the HAProxy Enterprise instance you no longer need.
-
Right-click on the instance and select Terminate instance.
-
Click Terminate. AWS will terminate the instance and remove it from the list.
Optional: Re-configure your Amazon Network Load Balancer (NLB) Jump to heading
If you have multiple HAProxy Enterprise instances configured for use with AWS NLB, you need to update your NLB targets to add your new HAProxy Enterprise instance and to remove the instance you no longer need.
Add an instance to a target group Jump to heading
To add a target to a target group:
-
Open the Amazon EC2 console.
-
From the EC2 Dashboard, go to Load Balancing > Target Groups, and select your target group.
-
Select the Targets tab, and then Register targets.
-
On the Register targets screen, select the new HAProxy Enterprise instance to include in the target group. Then click Include as pending below.
-
Click Register pending targets.
The instance will appear in the list for Registered targets.
Remove an instance from a target group Jump to heading
To remove a target from a load balancing target group:
-
Open the Amazon EC2 console.
-
From the EC2 Dashboard, go to Load Balancing > Target Groups, and select your target group.
-
Select the Targets tab.
-
Check the box for the instance you no longer need to select it, and then click Deregister.
The instance will no longer be associated with the target group for the AWS NLB.
Do you have any suggestions on how we can improve the content of this page?