denniswambua / kira-playbooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playbooks

A collection of Ansible scripts and templates used to deploy various Kobotoolbox projects to various environments.

Setup

To run the stuff herein, you need Ansible. To use Ansible you might need pycrypto. To build pycrypto, you need the latest python (2.1 <= ver <= 3.3) development libs & headers. Stick with python v2.7 for now. It's the current status quo. In a nutshell, if you're using debian/ubuntu :- apt-get install python-dev

For local "dev" deployments, you will need to install Virtualbox and Vagrant. Download Virtualbox from here and Vagrant from here or feel free to install those from your distro's repos (and brew if using OSX).

Clone this repo git clone git@github.com:onaio/kira-playbooks.git playbooks && cd playbooks

Install Requirements pip install -r requirements.txt

Install required roles ansible-galaxy install -r requirements/roles.yml -p roles

Deployment Commands

Deploying dkobo

ansible-playbook -i inventory/dkobo.ini dkobo.yaml --extra-vars="" --vault-password-file [path to password file]

Deploying kobocat

ansible-playbook -i inventory/kobocat.ini kobocat.yaml --extra-vars="" --vault-password-file [path to password file]

Deploying enketo

ansible-playbook -i inventory/enketo-kobocat.ini enketo-kobocat.yaml --extra-vars="" --vault-password-file [path to password file]

Usage (dev environment)

For development deploys, first rename ansible.cfg.vagrant to ansible.cfg. This config tells ansible to use the vagrant remote user & public key

vagrant up - (downloads and) brings up the local Virtualbox dev VM we'll deploy to. ansible-playbook -i inventory/vagrant_vm_single.ini onadata.yaml -vvvv - deploy onadata to the dev vm that vagrant just spun up

About


Languages

Language:Python 75.6%Language:Shell 24.4%