...
This document describes how to install HAProxy after the upgrade from 3.10.x to 4.0.x.
Author: Marc Cirauqui
Install HAProxy on the UI Server
Before you begin: check that you have the epel-release package installed. Otherwise HAProxy might not be available or it might be an old version.
Code Block |
---|
# yum -y install haproxy |
Configure HAProxy
The configuration to use depends on your architecture.
Running websockify on each Remote Services server
If you have multiple datacenters and are running websockify on each Remote Services server, you will need to define the backend for each server. Use Configure the UI server with the following model for the /etc/haproxy/haproxy.cfg file and make the changes described below.
...
Code Block |
---|
# grep datacenter.id /opt/abiquo/config/abiquo.properties abiquo.datacenter.id = ss008063 ## With openssl toolkit # echo -n ss008063 | openssl dgst -sha1 | cut -f2 -d' ' 2af9eaa6f48878b7952cbca17bc3d784b642d2ac ## With ruby # ruby -e 'require "digest/sha1"; puts Digest::SHA1.hexdigest "ss008063"' 2af9eaa6f48878b7952cbca17bc3d784b642d2ac ## With python # python -c "import hashlib; print hashlib.sha1('ss008063').hexdigest()" 2af9eaa6f48878b7952cbca17bc3d784b642d2ac |
So , requests with path 2af9eaa6f48878b7952cbca17bc3d784b642d2ac will use backend named 2af9eaa6f48878b7952cbca17bc3d784b642d2ac.
...
When you have all the acl and use_backend lines, as well as the backend blocks for all the datacenters, restart the haproxy daemon to start routing requests.
Running one default websockify daemon
If you have multiple datacenters with ESXi hosts and you can allow access to all hosts in all datacenters, then you could use the following configuration with a single default websockify daemon.
...