Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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)
  • Vagrant system/executable files themselves
    • Windows: C:\HashiCorp\Vagrant

Sample Output from "vagrant up"

This shows a fully working vagrant build.
Inline image 1

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
    Displaying VagrantScreenShot.png
    • try "vagrant reload --provision"
      otherwise 
    • try a complete reload with "vagrant destroy" then "vagrant up"
  • 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

  • No labels