Run with Vagrant
-
Download Install VirtualBox
-
Download Install Vagrant
-
Install Ansible, preferably from source
cd ~/ git clone git://github.com/ansible/ansible.git cd ./ansible source ./hacking/env-setup
If you don’t have pip installed in your version of Python, install pip (No harm running it if its already installed):
sudo easy_install pip
Install Ansible's requirements
sudo pip install paramiko PyYAML jinja2 httplib2
-
Change back into the project's directory
cd /path/to/this/project
-
Clone the Ona playbooks repo (into a different directory)
git clone [email protected]:onaio/playbooks.git ~/playbooks
-
Make a symbolic link to the playbooks directory
ln -s ~/playbooks ansible
-
Bring up the virtual machine with Vagrant
vagrant up
NOTE: This will keep the virtual machine running until you halt it via
vagrant halt
-
Provision using ansible
vagrant provision
NOTE: To update to the latest version at any time, run the provision command again.
-
ssh into the virtual machine
vagrant ssh
-
Change into the project's directory
cd /vagrant
-
Activate the virtual environment
source ~/.virtualenvs/composting/bin/activate
-
Run the server
pserve development --reload
Load the app in your browser at http://192.168.33.15:6543/
You can now make edits from your host (read OSX) and have them reflected when you refresh the browser.