HAProxy Enterprise Documentation 2.0r1

Azure

Launch HAProxy Enterprise directly from the Azure Marketplace.

Launch HAProxy Enterprise

  1. From the Azure Marketplace, search for HAProxy Enterprise and choose one of the virtual machine images from the list that have the HAProxy Technologies logo. Options include an Ubuntu Server edition and a Red Hat Enterprise Linux edition.

    [Choose a machine image]
  2. On the details page, click Get It Now and then select the software plan, which is the version of HAProxy Enterprise that you want to install.

    [Choose a software plan]
  3. On the next screen, click Create to launch the virtual machine. You can also click Start with a pre-set configuration to set up the VM with CPU and memory optimized for a common workload.

  4. On the Create a virtual machine screen, fill in the fields for the resource group, virtual machine name, region, availability zone, image size, and Administrator account. We recommend setting up an SSH keypair here so that you can access your machine using SSH.

    [Create the VM]
  5. Continue through to the Networking screen. Choose whether you want to assign a public IP address to the load balancer.

    • You can give the virtual machine a public IP, which makes it accessible from the Internet.

    • Or, you can set the Public IP field to None and select under Load balancing, Place this virtual machine behind an existing load balancing solution, which allows you to place two or more HAProxy Enterprise servers behind an Azure Load Balancer. This allows you to run your HAProxy Enterprise load balancers in an active-active setup for high availability. You must create the Azure Load Balancer before you can complete this step.

  6. Continue through the other tabs until you reach the Review + Create screen. Click Create to create the virtual machine.

Connect to the HAProxy Enterprise instance

During installation, you had the option to configure an SSH keypair that you can use to connect to the virtual machine.

  1. If necessary, change the permissions on the private key file that you downloaded:

    $ chmod 600 my-haproxy-enterprise_key.pem
  2. Copy the public IPv4 address for the instance from the Azure portal.

  3. Connect to the HAProxy Enterprise instance through its public IP using SSH. For example:

    $ ssh -i my-haproxy-enterprise_key.pem azureuser@20.80.234.150

    Note

    If you set up an Azure Load Balancer in front of your instance, then you will need to go the Load balancers screen and create an inbound NAT rule that maps a port for SSH (e.g. 222) on the Azure Load Balancer to port 22 on the HAProxy Enterprise instance.

Manage the HAProxy Enterprise service

The HAProxy Enterprise service runs at startup. You can manage the process with systemctl.

For example, use systemctl status to check that the service is running:

$ sudo systemctl status hapee-2.0-lb

hapee-2.0-lb.service - HAPEE Load Balancer
   Loaded: loaded (/lib/systemd/system/hapee-2.0-lb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/hapee-2.0-lb.service.d
           └─override.conf
   Active: active (running) since Tue 2021-03-30 15:47:08 UTC; 47min ago
 Main PID: 983 (hapee-lb)
    Tasks: 3 (limit: 4615)
   Memory: 12.2M
   CGroup: /system.slice/hapee-2.0-lb.service
           ├─983 /opt/hapee-2.0/sbin/hapee-lb -Ws -f /etc/hapee-2.0/hapee-lb.cfg -p /run/hapee-2.0-lb.pid -m 2623 -f /etc/hapee-2.0/dashboard-module.cfg
           └─993 /opt/hapee-2.0/sbin/hapee-lb -Ws -f /etc/hapee-2.0/hapee-lb.cfg -p /run/hapee-2.0-lb.pid -m 2623 -f /etc/hapee-2.0/dashboard-module.cfg

Access the Real Time Dashboard

  1. Display the HAProxy Enterprise Real Time Dashboard credentials, which are stored in the file /README.txt. For example:

    $ sudo cat /README.txt
    
    username: dashboard
    password: 091l/Bw2
  2. Connect to the dashboard through either HTTP (port 9022) or HTTPS (port 9023). The URLs are http://<Public IPv4 address>:9022/ and https://<Public IPv4 address>:9023/.

    https://cdn.haproxy.com/documentation/hapee/2-0r1/assets/aws-dashboard-e59c60b611e65769e2d4e874919a9e47dd80d302d9e4b6de3e6d26830e2bc595.png

    Note

    Connecting to http://<Public IPv4 address> displays the load balancer's statistics.


Next up

Install Additional Packages