{"id":17154672,"url":"https://github.com/jzohrab/vagrant-haproxy-keepalived","last_synced_at":"2025-07-26T05:32:36.531Z","repository":{"id":93092415,"uuid":"49680493","full_name":"jzohrab/vagrant-haproxy-keepalived","owner":"jzohrab","description":"Vagrant haproxy keepalived","archived":false,"fork":false,"pushed_at":"2016-01-14T23:41:54.000Z","size":12,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-15T21:49:49.041Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jzohrab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-14T22:50:44.000Z","updated_at":"2024-06-20T09:46:51.000Z","dependencies_parsed_at":"2023-03-18T00:40:38.678Z","dependency_job_id":null,"html_url":"https://github.com/jzohrab/vagrant-haproxy-keepalived","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jzohrab%2Fvagrant-haproxy-keepalived","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jzohrab%2Fvagrant-haproxy-keepalived/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jzohrab%2Fvagrant-haproxy-keepalived/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jzohrab%2Fvagrant-haproxy-keepalived/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jzohrab","download_url":"https://codeload.github.com/jzohrab/vagrant-haproxy-keepalived/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227652535,"owners_count":17799235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T21:49:45.450Z","updated_at":"2024-12-02T01:12:14.603Z","avatar_url":"https://github.com/jzohrab.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Vagrant-haproxy-keepalived\n====================\n\nDemo of HAProxy high availability using Vagrant.\n\nThis project sets up the following VMs on a private network in VirtualBox:\n\n* haproxy1 (192.168.1.9)\n* haproxy2 (192.168.1.10)\n* web1 (192.168.1.11)\n* web2 (192.168.1.12)\n\nThe HAProxy servers are themselves made redundant via keepalived, with\nvirtual IP 192.168.1.2.\n\n# Prerequisites\n\n1.  Install [Vagrant](http://www.vagrantup.com/downloads.html)\n2.  Install [Virtualbox](https://www.virtualbox.org/wiki/Downloads)\n3.  Either clone this repo, or download the zip file and extract it to an empty directory.\n\n# Getting started\n\n* From the root directory, run `vagrant up`\n* View the various pages:\n  * source web sites: e.g., http://192.168.1.11\n  * web site, load-balanced via HA Proxy: e.g., http://192.168.1.9\n  * web site, through the virtual IP: http://192.168.1.2\n  * HA proxy status: e.g., http://192.168.1.2/haproxy?stats\n\n## Determining the active HAProxy\n\nkeepalived is an implementation of the VRRP (Virtual Router Redundancy\nProtocol) protocol to make IPs highly available - a so called VIP\n(Virtual IP).\n\nYou can check which HAProxy server is currently handling requests to the virtual IP 192.168.1.2 by checking the server's ip addresses:\n\n    $ vagrant ssh haproxy1 -c \"echo haproxy1; ip addr | grep 192.168.1.2/32\"\n    haproxy1\n        inet 192.168.1.2/32 scope global eth1\n    Connection to 127.0.0.1 closed.\n    $ vagrant ssh haproxy2 -c \"echo haproxy2; ip addr | grep 192.168.1.2/32\"\n    haproxy2\n    Connection to 127.0.0.1 closed.\n\n## Scenarios to investigate\n\nTry turning various servers on and off, and visit any of the URLs to\nsee what the results are.  As HAProxy services are turned on and off,\nalso check the active HAProxy.\n\nExamples:\n\n* `vagrant ssh web1 -c \"sudo service apache2 stop\"`\n* `vagrant ssh web1 -c \"sudo service apache2 start\"`\n* `vagrant ssh haproxy1 -c \"sudo service haproxy stop\"`\n* `vagrant ssh haproxy1 -c \"sudo service haproxy start\"`\n\n\n# Shutting down\n\n* `vagrant halt` turns off vms\n* `vagrant destroy` destroys all traces of the VMs, but leaves the\n  cached images\n* `vagrant box remove ...` removes the downloaded image file.\n\n# Reference material\n* [Vagrant](http://vagrantup.com)\n* [VirtualBox](http://www.virtualbox.org)\n* [HAProxy](http://haproxy.1wt.eu/)\n* [Keepalived](http://www.keepalived.org/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjzohrab%2Fvagrant-haproxy-keepalived","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjzohrab%2Fvagrant-haproxy-keepalived","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjzohrab%2Fvagrant-haproxy-keepalived/lists"}