Configure a Flask app on a VM using Vagrant, with provisioning handled by Ansible i.e setting up python, virtualenv, nginx, gunicorn, etc.
You need to install:
I will be using VirtualBox for this setup, you can grab a copy for your OS here.
- clone this repo and cd into it:
git clone [email protected]:clovisphere/Flask-Vagrant-Setup.git && cd Flask-Vagrant-Setup
- Boot up your Vagrant environment:
vagrant up
(*) If you get an HTTP 500, try doing a:
vagrant up --provision
or vagrant reload --provision
This may take less or more than a minute depending on your internet connection (so be patient).
Vagrant runs the virtual machine without a UI. To prove that it is running, you can SSH into the machine:
vagrant ssh
You'd be seeing a welcome message like:
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-139-generic x86_64)
.
.
.
.
Now logout by typing: logout
Point your browser to: http://10.0.0.5, you'd see a fancy "Hello" message:-)
- Aaron Oxborrow, without whom I would have spent many more hours trying to understand vagrant-ansible provisioning.