A very simple Vagrant box that hosts both HAProxy & NFS to be used by XL-Release :-)
- Download the zipped file on your machine,
cd
into that directory, remove the Vagrantfile & then issuevagrant init
command. This will create a .vagrant directory inside this parent directory & initialise vagrant. - Copy back the Vagrantfile from this repository to your current directory. Then issue
vagrant up
command which will download the Ubuntu 14.04 basebox, start it & then call Chef script that will setup HAProxy alongwith NFS. - Now issue
vagrant ssh
command to check the newly built box.
Edit the haproxy.cfg & /etc/exports file to reflect your own XLR setup, like host names, IP addresses & directory names.
Vagrant will throw below error if your vagrant version is < 1.8.4.
==> default: [2017-01-03T07:36:04+00:00] INFO: HTTP Request Returned 404 Not Found: Parent not found: chefzero://localhost:8889/nodes
==> default:
==> default: ================================================================================
==> default: Chef encountered an error attempting to load the node data for "vagrant-fb4844cb"
==> default: ================================================================================
==> default:
==> default:
==> default: Resource Not Found:
==> default: -------------------
==> default: The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
To fix it, remove your old installation of vagrant using rm -rf /opt/vagrant
& rm -rf /usr/local/bin/vagrant
commands. Afterwards, install the latest version. I have tested it on my current version of 1.8.4.