Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

In order to keep the development environment configuration very close to the production environment, during development we use virtual box vm on our (physical) development machines.

...

Setup git

Please Google to find out how to setup git on the host machine. (one such link - http://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

Checkout bahmni-environment project

bahmni-environment has everything you need to setup your vm
git clone https://github.com/Bhamni/bahmni-environment.git
(or if you have commit rights on bahmni environment then) git clone git@github.com:Bhamni/bahmni-environment.git

Setup vagrant and virtual box on your host machine

https://www.virtualbox.org/wiki/Downloads
https://www.vagrantup.com/downloads.html

Setup the vm

bahmni-environment has Vagrantfile which contains the location of the box image. If you have want the box image to be downloaded from elsewhere you can change Vagrantfile in bahmni-environment's base directory. We keep virtual box image here (https://bahmni-repo.twhosted.com/boxes/bahmni.box).
- Copy the file named "bahmni.box" to the root of bahmni-environment folder.
- From the root of bahmni-environment do a "vagrant up".

    1. Case 1: vagrant up fails.
      Edit the Vagrantfile present in the root of bahmni-environment and comment out the following lines. The Vagrantfile is in ruby so "#" marks the line as a comment.
      #config.vm.network :forwarded_port, guest: 8080, host: 8081
      #config.vm.network :forwarded_port, guest: 443, host: 8082
      #config.vm.network :forwarded_port, guest: 80, host: 8083
      #config.vm.network :public_network
    2. Case 2: vagrant up fails. Follow the following.

      vagrant ssh
      sudo rm -f /etc/udev/rules.d/70-persistent-net.rules
      sudo rm -f /etc/sysconfig/network-scripts/ifcfg-eth1
      sudo rm -f /etc/sysconfig/network-scripts/ifcfg-eth2
    3. Case 3: vagrant up passes.

- Run vagrant reload command

Now that vagrant is up, ssh into that and need to import mysql and postgres dump from emr-functional-tests/dbdump directory.

You have Bahmni up and running, and accessible on https://192.168.33.10/home

## (https://www.dropbox.com/s/xujsvi8x5w9yp5u/bahmni.box?dl=1)

Installed on your vm

tomcat : /home/bahmni/apache-tomcat-{version}
httpd : /var/www/
openerp: /usr/lib/python2.6/site-packages/openerp-{version}.egg
openmrs modules: /home/bahmni/.OpenMRS/modules

 

...

For more details on how to setup VM/Vagrant for development please refer to this document Bahmni Virtual Box.