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

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

  2. Connect to your existing HAProxy Enterprise instance through its public IP address.

  3. Copy the configuration file /etc/hapee-2.8/hapee-lb.cfg from your existing instance to your new instance.

  4. When the HAProxy Enterprise instance launches, the HAProxy Enterprise service is started automatically.

  5. Use systemctl reload to reload the load balancer configuration with the copied configuration file:

    haproxy
    sudo systemctl reload hapee-2.8-lb
    haproxy
    sudo systemctl reload hapee-2.8-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.

  1. Open the Amazon EC2 console.

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

  3. Click on the elastic IP address to open its settings.

  4. Click Associate Elastic IP address.

  5. Choose your new instance from the list.

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

  1. To get the public IPv4 address of the instance, open the Amazon EC2 console.

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

  1. Open the Amazon EC2 console.

  2. From the EC2 Dashboard, go to Instances, and in the list, find the HAProxy Enterprise instance you no longer need.

  3. Right-click on the instance and select Terminate instance.

  4. 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:

  1. Open the Amazon EC2 console.

  2. From the EC2 Dashboard, go to Load Balancing > Target Groups, and select your target group.

  3. Select the Targets tab, and then Register targets.

  4. On the Register targets screen, select the new HAProxy Enterprise instance to include in the target group. Then click Include as pending below.

  5. 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:

  1. Open the Amazon EC2 console.

  2. From the EC2 Dashboard, go to Load Balancing > Target Groups, and select your target group.

  3. Select the Targets tab.

  4. 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?