Link: https://github.com/crolfe/vagrant-OpenMRS
Sets up a headless development Virtual Machine on your computer using Vagrant
Vagrant Overview
- "vagrant up" to read the configuration Vagrantfile which tells how to build the virtual machine
- Downloads a base virtual image (called a box ) to create the development environment from (boxes stored in locally in user directory e.g. C:\Users\Tim\.vagrant.d\boxes / ~.vagrant.d\boxes)
- Once virtual machine is booted it will perform any configurations set in the Vagrantfile
- e.g. install tomcat and openmrs, set up networking (currently done via puppe)
- "vagrant destroy" will kill the entire virtual machine. all data deleted
- "vagrant halt" to shutdown the virtual machine. data still persists
- "vagrant ssh" (or ssh to 127.0.0.1:2222)
Vagrant Filepaths
- User downloaded files like boxes
- Windows: C:\Users\Tim\.vagrant.d\
- *nix: ~/.vagrant.d
- Virtual Machines created
- C:\Users\Tim\VirtualBox VMs\
- openmrs-dev
- precise32 (based on box downloaded specified in Vagrantfile)
- C:\Users\Tim\VirtualBox VMs\
- Vagrant system/executable files themselves
- Windows: C:\HashiCorp\Vagrant
Sample Output from "vagrant up"
This shows a fully working vagrant build.
Credentials to Vagrant VM
User: vagrant
Password: vagrant
Issues Encountered Setting up Vagrant
- Corrupt / Incomplete box download (can't remember the error)
- Deleted download box file in ~/.vagrant.d/boxes
- Windows: vagrant not recognized in command line
- Add to PATH environment variables or just run the following "PATH=%PATH%;C:\HashiCorp\Vagrant\bin" (alter based on your install location)
- Puppet never ran on the VM machine
- try "vagrant reload --provision"
otherwise - try a complete reload with "vagrant destroy" then "vagrant up"
- try "vagrant reload --provision"
- openmrs-dev.local:8080 not accessible on host machine
- check IP of virtual machine (ifconfig)
- access using the IP found
or - add IP to the host file (C:\Windows\System32\drivers\etc\hosts or /etc/hosts)
192.168.33.10 openmrs-dev.local
- access using the IP found
- check IP of virtual machine (ifconfig)