Skip to content

sachinlala/Vagrant101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reference

For 1st time setup only

  1. Ensure the following are installed
  1. Initialize with a default stable Vagrantfile and bring up the VM:
    cd scratch-area
    vagrant box add hashicorp/precise64 http://files.vagrantup.com/precise64.box
    vagrant init hashicorp/precise64
    vagrant up
    
    Note: 'vagrant box add' step is optional, when using a template from HashiCorp Atlas site

Sample Dev Box w/ a web-server(e.g. when you need a dev env with JDK & Jetty in it):

What were the key steps executed to construct this box:

  1. Give a name to the VM
  2. Open and map the required port (80:8080) between host & guest OS
  3. Provision a SHELL to download & bring up Jetty
cd jetty
vagrant up

Command List

Command Purpose
vagrant up Create new or bring up an existing VM
vagrant status Check status
vagrant halt Suspend (Graceful Shutdown)
vagrant destroy Destroy VM
vagrant reload Bounce VM
vagrant box list Print the list of all templates (aka vagrant boxes) present in your machine
vagrant box add <title> Add new base box
vagrant box update Update the box to latest version available
vagrant provision Run the provisioner mentioned in Vagrantfile, while the VM is up & running

Releases

No releases published

Packages

No packages published