Skip to content

bunhin/xtuple-vagrant

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creating a Vagrant Virtual Development Environment

Vagrant is open-source software used to create lightweight and portable virtual development environments. Vagrant works like a "wrapper" for VirtualBox that can create, configure, and destroy virtual machines with the use of its own terminal commands. Vagrant facilitates the setup of environments without any direct interaction with VirtualBox and allows developers to use preferred editors and browsers in their native operating system. This blog describes a typical workflow using Vagrant in a development environment.

New to Github? Learn more about basic Github activities here.

Note: This document is for setting up a virtual environment on a Unix host. If you are using a Windows host, please use these instructions.

Install Vagrant

  • Download and install VirtualBox 4.3.8
    • Do not open VirtualBox or create a virtual machine. This will be handled by Vagrant.
  • Download and install Vagrant 1.5.0
    • Package managers like apt-get and gem install will install an older version of Vagrant so it is required to use the download page.

Fork the xtuple, fork xtuple-extensions, and fork xtuple-vagrant repositories on Github.

Clone your forks of the xtuple and xtuple-extensions repositories to a directory on your host machine:

mkdir dev
cd dev
git clone --recursive https://github.com/<username>/xtuple.git
git clone --recursive https://github.com/<username>/xtuple-extensions.git

Clone your fork of the xtuple-vagrant repository in a separate directory adjacent to your development folder:

cd ..
mkdir vagrant
cd vagrant
git clone https://github.com/<username>/xtuple-vagrant.git
cd xtuple-vagrant

Important: If you have previously forked these repositories, please ensure that you update your fork and update your dependencies.

Setup Vagrant

  • In the Vagrantfile, ensure that the sourceDir variable to matches the location of the cloned xTuple source code: sourceDir = "../../dev"
    • This path should be relative to the location of the Vagrantfile

Install VirtualBox Guest Additions Plugin

vagrant plugin install vagrant-vbguest

Connect to the Virtual Machine

Start the virtual machine:

vagrant up
  • Vagrant will automatically run a shell script to install git and the xTuple development environment

Connect to the virtual machine via ssh:

vagrant ssh
  • The xTuple source code is synced to the folder ~/dev

Start the datasource:

cd dev/xtuple/node-datasource
node main.js

Launch your local browser and navigate to application using localhost http://localhost:8888 or the static IP Address of the virtual machine http://192.168.33.10:8888

Default username and password to your local application are admin

Additional Information

Accessing the Vagrant Postgres Database from the Host:

Allow host access

Shutting down, restarting, and destroying your VM:

Basic commands

About

Vagrant Development Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published