Setting up HAProxy

Comments

9 comments

  • Avatar
    Graham Green

    One suggestion to this would be to add redundancy to this configuration by also configuring a 2nd HAProxy server for failover.

    0
    Comment actions Permalink
  • Avatar
    Tim Thompson

    If your databases are behind a firewall, then you will have to open up a few things for this to work.  One is ICMP Ping.   Then 2 TCP ports, 3306 for mysql, and 9200 for Haproxy to run/query the scripts that are installed on the Galera/Mysql servers.

    0
    Comment actions Permalink
  • Avatar
    David Majchrzak

    Seems that HAProxy is no longer in the Epel Repository, so the script fails when installing haproxy.

    0
    Comment actions Permalink
  • Avatar
    David Majchrzak

    Workaround is to use official centos6 CR repository on the app servers/haproxy servers:

    yum install centos-release-cr

    Then edit: /etc/yum.repos.d/CentOS-CR.repo and set it enabled=0. We don't want all the latest unstable fixes.

    You need to update the install-haproxy.sh script with from:

    case $OS in
    rhel|redhat)
    PKG_MGR="yum install -y "

     

    to

    case $OS in
    rhel|redhat)
    PKG_MGR="yum install -y --enablerepo=cr "

    0
    Comment actions Permalink
  • Avatar
    Johan

    Hi David,

    Many thanks for this! We will incorporate your suggestions soon.

    Best regards

    Johan

    0
    Comment actions Permalink
  • Avatar
    Johan

    Hi Daniel, 

    https://github.com/severalnines/haproxy

    has been updated with your proposed changes. Thanks again.

    Best regards

    Johan

    0
    Comment actions Permalink
  • Avatar
    Pablob

    Hi, I have already installed cluster control with galera and two haproxies with a keepalive, but I need to install SSL on the haproxy, and current clustercontrol haproxy is 1.4 which I found out do not supports SSL implementation.

    How could I update the script at the clustercontrol to instal the 1.5 version instead of the 1.4?

     

    Thanks.

    0
    Comment actions Permalink
  • Avatar
    Ashraf Sharif

    Hi Pablob,

    Haproxy version 1.5 is yet to be released on stable line. But of course you can install/recompile to the version that you want. Just make sure to maintain the same path to the Haproxy binary and ClusterControl should able to provision the process (as listed in ClusterControl > Manage > Processes).

    Regards,
    Ashraf

    0
    Comment actions Permalink
  • Avatar
    Johan

    Pablob,

    In the s9s_haproxy script (installed in /usr/bin if you used the Configurator) on the controller  you can change:

            HAPROXY_SRC="haproxy-1.4.23.tar.gz"

    to specify whatever version you want to use. However, 1.5 may require that you install ssl packages for devel, you  may have to update the scripts more.

    One 1.5 is released stable we will update the s9s_haproxy script.

    BR

    johan

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk