======================
Run Fabio and consul stack on your machine for testing
You will need to install docker-engine and docker-compose to run this setup
docker-compose up -d
docker-compose kill
docker-compose rm -f
The playbook.yaml ansible will register any application to your consul you have to define the following parameters
you will need to install python-consul to use that playbook
- application - The name of the app
- port - the application port
- admin_port - the admin port for the health check
- healthcheck - the health check url
- urlprefix - the routing path for fabio
ansible-playbook -i hosts ./playbook1.yaml -e application=hello -e port=8080 -e urlprefix=www.spielwie.se/
ansible-playbook -i hosts ./playbook2.yaml -e application=hello -e port=8080 -e admin_port=9080 -e healthcheck='/system/health?pretty=true' -e urlprefix='www.spielwie.se/'
Now simply add the follwoing line to your /etc/hosts file
127.0.0.1 www.spielwie.se
and test the app in your browser