The infra-challenge app high availablity deployment
The complete task can be found here.
Architecture solution
The HA environment for the application mentioned above consist of 4 virtual machines. First one for reverse proxy (entry point), other three for the application itself.
Requirements
Usage
To launch deploy process in the root of this repository run:
$ vagrant up
Once the deployment is complete, you can determine the public IP address assigned to the web server:
$ echo $(vagrant ssh nginx -c "ip address show eth2 | grep 'inet ' |
sed -e 's/^.*inet //' -e 's/\/.*$//'")
Also you can use the hardcoded private IP 10.2.2.100
to access the webserver.
Now you can try some tests.
Unsupported URI:
$ curl -v -GET http://192.168.1.231
$ curl -v -GET http://192.168.1.231/ping
After that, you can stop one of the nodes and repeat the test:
$ vagrant halt node1
$ vagrant global-status
$ curl -v -GET http://192.168.1.231/ping
Try to stop the second one and repeat the test again:
$ vagrant halt node2
$ vagrant global-status
$ curl -v -GET http://192.168.1.231/ping
Finally stop the last one and check:
$ vagrant halt node3
$ vagrant global-status
$ curl -v -GET http://192.168.1.231/ping
Now you can launch some nodes again and try to test one more time:
$ vagrant up node2 node3
$ vagrant global-status
$ curl -v -GET http://192.168.1.231/ping