Get the Flask 'Hello World' app up and running on a Vagrant VM using your known best practices as well as the instructions in the guidelines below. You must use Ansible as your provisioner to install and configure everything. When you're done, we should be able to type vagrant up
and our app will be running and reachable on http port 80 at http://192.168.33.15
.
Guidelines:
- The provisioner should clone a Github-hosted repo into the VM under
/etc/chownow/infratest
- The app should route through nginx and gunicorn or uWSGI.
- The app should be running as a non-privileged user
- The app should be automatically restarted if crashes or is killed
- The app should maximize all of the available CPUs (have Vagrant virtualize multiple CPUs and use them)
- The app's logs should be captured to
/var/log/chownow/app.log
, and they should be rotated hourly - Timezone should be in US PST
Write your Ansible code and templates in your own private repo and when complete, send to us the contents in a zip or tarball.
You may stick to the default Vagrant image (ubuntu/trusty64
) or use another preferred flavor of Linux.
We'll evaluate the submission on simplicity, code quality, and use of best practices of the provisioning code. Feel free to be creative and take liberties where you feel it will improve the deliverable!