Install Vagrant, Virtualbox and Git to setup a development environment

Based on this below one can setup a virtual development enviroment with vagrant, virtualbox and git.

This page describes how to do that on a computer with Windows 10.

A. Download software:




B. Install software:

1. Install Virtualbox

2. Install Vagrant (reboot is recommended after installation)

3. Install vagrant cashier plugin at command promt : vagrant plugin install vagrant-cachier

4. Install git (from download A.1)

C. Configure vagrant

1. For a sample vagrant config goto this web page:

Select in the Left Hand Menu, under Actions the word Clone. Copy the URL and paste it into a text editor.

Choose where to store “tdd-java-ch02-example-vagrant.git” (here ist is a new folder called “tdd”, with the file “tdd-java-ch02-example-vagrant”.
In the text editor it looks like this:
git clone tdd/tdd-java-ch02-example-vagrant
Open a command prompt and paste this command, a copy will be made into /tdd/tdd-java-ch02-example-vagrant.

D. Use Vagrant

1. Goto this directory where the Vagrantfile resides to check the status of the current VMs: vagrant status

2. Start the virtual machine with the command: vagrant up.
This will take a while and the process should not be interrupted, please wait until the promt comes back.

The screen output should like listed below.

==> default: Machine booted and ready!
default: VirtualBox Version: 5.0
==> default: Mounting shared folders…
default: /vagrant => C:/tdd/tdd-java-ch02-example-vagrant
default: /tmp/vagrant-cache => C:/Users/<username>/.vagrant.d/cache/ubuntu/trusty64
==> default: Configuring cache buckets…
==> default: Running provisioner: docker…
default: Installing Docker onto machine…
==> default: Starting Docker containers…
==> default: — Container: mongoDB
==> default: Configuring cache buckets…


3. Check the status of the VM

C:\tdd\tdd-java-ch02-example-vagrant>vagrant status
Current machine states:

default running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.