{ "info": { "author": "Juned Memon", "author_email": "junaid18183@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "HALB\n===========\n\nHALB is the wrapper script to install/setup/manage multiple haproxy configuration on the same server. Along with the Keepalived for easy failover. \n\nDependencies\n===========\nMake sure you install the keepalived and haproxy.\n\n> In redhat/centos systems you can\n> install them using\n\n yum install -y keepalived \n yum install -y heartbeat\n\nInstallation\n============\nYou can install HALB using the pip/setuptools or install from tar.gz \n\n pip install HALB\n python setup.py install \n\nThis will install following files on your system\n\n - /usr/bin/lbtool -- The actual wrapper lbtool script which you will be using\n - /etc/HALB/halb.conf -- The Configuration file for HALB to control the data location where HALB saves/checks for data.\n - /etc/HALB/DATA/* -- Actual HALB files. \n \n\nThe setup installs the sample configuration for you to start off present in /etc/HALB/DATA/{example.vig,real.dat,vip.dat}\n\nConfiguration\n============\nThe Configuration file /etc/HALB/halb.conf controls follwing options\n\n - DC - the name of the DC, optional preset to DATA\n - HAPLB_HOME - HOME for your HALB installation,the actual haproxy configuration is saved under this directory\n - HAPROXY -- PATH for haproxy binary \n - KEEPALIVE_CONF -- Keepalived configuration file\n - VIP_DEVICE -- The device name to which keepalived will bind the the VIP\n\nThe lbtool will require following four directories under HAPLB_HOME/DC\n\n - dat - All .vig files, real.dat and\n vip.dat files are stored here \n - bin - copies of haproxy binary for each\n individual haproxy haproxy - home for all haproxy configuration \n status - status directory for all backend nodes\n----------\n**Adding new configs:**\n\n - \n - Create new vig file\n\nCreate new .vig file for the rotation under /etc/HALB/DATA/dat/ \nEx: /etc/HALB/DATA/dat/test.vig (Replace test with the desired name)\n\n [root@lb1 lb]# cat /etc/HALB/DATA/dat/test.vig\n keepalived: vid=51\n #Vip: www.test.com\n www.test.com: vip=www.test.com name=www.test.com dns=www.test.com\n www.test.com: port=80 vip_mode=http,https vip_maxconn=25000\n www.test.com: real=tiber1:80 #is\n\n> The keepalived vid must be unique as\n> its identification for vip group in\n> keepalived configuration.\n> \n> **Use Command to find the number of vid used in existing vig file.**\n\n grep -ir 'keepalived: vid='/etc/HALB/DATA/dat/*.vig | awk '{print $NF}'| sort\n\n - Add Vip info in vip.dat\n\nAdd vip information under /etc/HALB/DATA/dat/vip.dat \n\n [root@lb1 lb]# cat /etc/HALB/DATA/dat/vip.dat\n www.test.com: vip=www.test.com ip=10.0.9.214\n\n - Add Vip info in vip.dat\nAdd real server information under /etc/HALB/DATA/dat/real.dat \n\n [root@lb1 lb]# cat /etc/HALB/DATA/dat/real.dat\n tiber1: status=is name=tiber1 dns=tiber1.test.colo ip=10.0.7.54\n\n> Before adding check if the ips/servers\n> are present in the vip.dat and\n> real.dat. If present then there is no\n> need to add. Please avoid duplicate\n> entries.\n\n----------\n\n> Use vig name as argument to lbtool\n\n \n\n\n [root@lb1 lb]# lbtool test\n example> help\n Valid Choices are :\n exit|quit --> To exit the program\n gen_conf|generate_conf --> To generate the Haproxy configuration\n ha_vig --> start|stop|reload|restart|status the configuration.\"\n gen_keep --> MASTER|BACKUP genrates the Keepalived Configuration\n is --> set the server status to In serving\n oos --> set the server status to Out of serving\n help --> show the valid commands.\n\n\nFor example below steps needs to be done in order\n\n\n [root@lb1 root]# lbtool test \n \n \n\n> Name of haproxy vig as argument to lb\n> script.\n\n test > generate_conf \n \n> Generates haproxy config file\n\n test > gen_keep MASTER \n \n\n> Generates keepalived config for the\n> new rotation.if role is MASTER it the\n> rotation will be active on this\n> server. If BACKUP then it will receive\n> traffic only when the MASTER server\n> fails.\n\n \n\n test > ha_vig start \n \n\n Starts the haproxy config \n\n test > keep_init reload \n \n> Reloads keepalived with newly updated\n> config file.\n\n test > exit\n\n\n**Adding new hosts to a config:**\n\nAdd new hosts to real.dat file. \n\n> Before adding check if the host is\n> present in the file. If yes then do\n> not add. We should avoid duplicate\n> entries.\n\nAdd the host to the .vig file for the rotation. \n\n [root@lb1 lb]# lb test \n\n> Name of haproxy vig as argument to lb\n> script.\n\n test > is tiber1 \n\n> Adds host tiber1 into rotation of\n> haproxy config for test\n\n test > generate_conf \n test > ha_vig restart \n test > exit \n\n**Taking a host out of rotation:**\n\n\n [root@lb1 lb]# lb test\n test > oos tiber1 \n\n \n\n> Takes host tiber1 out of rotation from\n> haproxy config for test.\n\ntest > generate_conf\ntest > ha_vig restart\ntest > exit\n\n\n#################################################\nmisc -\nadd net.ipv4.ip_nonlocal_bind = 1 in sysctl.conf so that keepalived can bind non local ip's", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/junaid18183/HALB", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "HALB", "package_url": "https://pypi.org/project/HALB/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/HALB/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/junaid18183/HALB" }, "release_url": "https://pypi.org/project/HALB/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "Haproxy and Keepalived base multiple HA on same server", "version": "0.1.5" }, "last_serial": 2114050, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "a11072e278829e3653b44bcc0a8b68fb", "sha256": "93aa9559ca7e0ed5700a5421df306c48c61c9f540bf79346b5486c7c4636c42f" }, "downloads": -1, "filename": "HALB-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a11072e278829e3653b44bcc0a8b68fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9807, "upload_time": "2014-02-26T16:45:14", "url": "https://files.pythonhosted.org/packages/8d/77/269000067414d55ec455785ca56693b8c2b6c4d55aee20b823581a6dce6c/HALB-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f5f38e0703722c1d7c796b27ca235fc6", "sha256": "61562d3a0baf0c95ae2517b4ea41934a2b57175291fb0a06c835453acafea8bf" }, "downloads": -1, "filename": "HALB-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f5f38e0703722c1d7c796b27ca235fc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10042, "upload_time": "2014-02-28T11:06:17", "url": "https://files.pythonhosted.org/packages/8d/2c/ccf23f7ba7454b371c7be47a66d88bb791c4ce77ed6096d6c8ce066f642e/HALB-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "62a756ecc16e92f1f2edfb5029ba9960", "sha256": "108c909c98982f87858caac027d6d1923b8b1b09d09df5cca1f10487d18d0ff6" }, "downloads": -1, "filename": "HALB-0.1.3.tar.gz", "has_sig": false, "md5_digest": "62a756ecc16e92f1f2edfb5029ba9960", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9017, "upload_time": "2015-08-14T11:07:16", "url": "https://files.pythonhosted.org/packages/7d/d1/532d54c2d8ccd0e14e9ba7424681f74093cba4536d2990cc4be5d54935d1/HALB-0.1.3.tar.gz" } ], "0.1.4": [], "0.1.5": [ { "comment_text": "", "digests": { "md5": "c9b3aa66462435f506dccb7586085c3f", "sha256": "f5f47c200014f30c696a2b4b502523ca45bddb6faabddfa7227db372719658fc" }, "downloads": -1, "filename": "HALB-0.1.5.tar.gz", "has_sig": false, "md5_digest": "c9b3aa66462435f506dccb7586085c3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9193, "upload_time": "2016-05-13T11:47:12", "url": "https://files.pythonhosted.org/packages/39/ca/edb807ebd8d5ce679e87e7dda7606c0764aeb8d17049efc6b1a762451eb3/HALB-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c9b3aa66462435f506dccb7586085c3f", "sha256": "f5f47c200014f30c696a2b4b502523ca45bddb6faabddfa7227db372719658fc" }, "downloads": -1, "filename": "HALB-0.1.5.tar.gz", "has_sig": false, "md5_digest": "c9b3aa66462435f506dccb7586085c3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9193, "upload_time": "2016-05-13T11:47:12", "url": "https://files.pythonhosted.org/packages/39/ca/edb807ebd8d5ce679e87e7dda7606c0764aeb8d17049efc6b1a762451eb3/HALB-0.1.5.tar.gz" } ] }