Git Product home page Git Product logo

zidisha-vagrant's Introduction

Zidisha - Development Environment

About Zidisha

Zidisha is the first person-to-person lending platform to bridge the international wealth divide. We are a nonprofit community that enables direct P2P lending to small business owners in developing countries.

We are also the first microlending service to operate without any brick-and-mortar offices. Zidisha is managed Wikipedia-style by a global network of over 60 volunteers, located on every inhabitable continent.

Finally, we are the world's only open-source person-to-person lending platform. Your contributions to our project will not only help our thousands of members access opportunities to improve their lives, but also serve as a resource for people and organizations everywhere that wish to build on our work.

Bootstrapping your development environment

xkcd automation

This project aims to provide a quick and simple way for you to bootstrap a development environment for helping out the Zidisha project. It's based on Vagrant and Ansible.

With it, you'll be able to quickly start to contributing - it'll provide you with an Ubuntu Server development machine, with the project already configured.

Before you start, make sure you visit Zidisha's Github project page.

Instructions

  • [Before you start](Before you start)
  • Ubuntu
  • [Mac OS X](Mac OS X)
  • Windows

Before you start

Before you start, make sure that:

  1. You have your SSH Agent running
  2. Your Github account SSH key is added to the agent.

Check out this reference to learn how to do it. You'll need the agent to be properly configured in order to clone Zidisha's repository from within the virtual machine we're about to create.

You'll probably want to create a fork of the project and clone the fork rather than the main project. If this is the case, fork the project, open the provisioning/playbook.yml and edit the repository entry.

In my case, it would look something like this:

- hosts: vagrant
  vars:
    apache:
      hostname: zidisha.dev
    git:
        repository: "[email protected]:diogoosorio/zidisha.git"
    database:
        host: 127.0.0.1
        name: zidisha
        user: zidisha
        password: zidisha

Ubuntu

You'll need to install Virtualbox, Vagrant and Ansible before you start. This can trivially be done using the APT Package Manager:

sudo apt-get install python-software-properties virtualbox vagrant saycow
sudo add-apt-repository ppa:rquillo/ansible
sudo apt-get update
sudo apt-get install ansible

Then simply clone this repository and preform a vagrant up:

git clone https://github.com/diogoosorio/zidisha-vagrant.git && cd zidisha-vagrant
vagrant up

If you get an error during the provisioning, re-run:

vagrant provision

And add an entry to your hosts file:

echo 'zidisha.dev     192.168.90.103' | sudo tee -a /etc/hosts

Fire up a browser and visit - http://zidisha.dev/.


Mac OS X

  1. Download and install Virtualbox

  2. Download and install Vagrant

  3. Install the vagrant plugin vagrant-vbguest:

    vagrant plugin install vagrant-vbguest
  4. Install Ansible:

    • Via Homebrew:

      brew install ansible
    • Via the Python package manager Pip:

      sudo pip install ansible
  5. Clone this repository and perform a vagrant up:

    git clone https://github.com/diogoosorio/zidisha-vagrant.git && cd zidisha-vagrant
    vagrant up

    This make take a while to install.

    Answer yes if you get the following message:

    The authenticity of host '192.168.90.103 (192.168.90.103)' can't be established.
    RSA key fingerprint is ...
    Are you sure you want to continue connecting (yes/no)?

    If this is not the first time you run the installation, you might see the following error:

    fatal: [192.168.90.103] => SSH encountered an unknown error during the connection.

    The fix this, just remove the line starting with 192.168.90.103 from ~/.ssh/known_hosts and run vagrant provision.

  6. And add an entry to your hosts file:

    echo '192.168.90.103  zidisha.dev' | sudo tee -a /etc/hosts
  7. You should be done! Fire up a browser and visit - http://zidisha.dev.


Windows

  1. Download and install Virtualbox
  2. Download and install Vagrant
  3. Clone this repository and preform a vagrant up:
git clone https://github.com/diogoosorio/zidisha-vagrant.git && cd zidisha-vagrant
vagrant up --no-provision
  1. SSH into the machine. You'll probably use PuttY or something similar. To simplify, use the following information:

    • IP Address: 192.168.90.103
    • Username: vagrant
    • Password: vagrant
  2. Make sure you have an SSH-Agent running (Pageant, probably) and that your Github SSH key is added on the agent.

  3. Run the provisioning from within the VM:

cd /provisioning
sudo -E bash run.sh
  1. Edit your hosts file. Open My Computer and go to:
%systemroot%\system32\drivers\etc\
  1. Open the file named hosts using Notepad, as an administrator and add the following line:
192.168.90.103 zidisha.dev
  1. You should be done! Fire up a browser and visit - http://zidisha.dev/.

Working in the project

On your host machine, you'll find a directory named workspace that by now, should contain the project's files. This directory is shared with the VM, so just point your favorite IDE to that directory and start hacking! :)


Licensing

This project is licensed under the Apache License 2.0. Please take the time to look at (and make sure you comply with) Zidisha's licensing, before you start working.

zidisha-vagrant's People

Contributors

diogoosorio avatar jonasdt avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.