Virtualbox and vagrant used to build virtual machines as servers.
This vagrant profile install Nginx, Mysql, Python3, Flask.
I use the lastest Ubuntu 16.04 x64 image
install these requirements
- Download and Install VitualBox
- Download and Install Vagrant
- Install guest additions to Vagrant
vagrant plugin install vagrant-vbguest
- Install vagrant hostmanager
vagrant plugin install vagrant-hostmanager
- Install Ansible.
sudo pip install ansible
- Install Git.
- clone this repository:
git clone [email protected]:jack-factor/flask_ansible_vagrant.git
- Modify /etc/hosts file. Add this line:
192.168.20.10 project.app
- Start Vagrant VM:
vagrant up
- Open your browser:
http://project.app
Note:
- If something goes wrong. You can re-provision Vagrant VM
vagrant provision
- If you want to delete the Vagrant VM
vagrant destroy
- You can shut down the Vagrant VM
vagrant destroy