Skip to content

Instantly share code, notes, and snippets.

@musamamasood
Last active April 7, 2016 21:37
Show Gist options
  • Save musamamasood/6a5a842b16a881e7c4b2195105d14813 to your computer and use it in GitHub Desktop.
Save musamamasood/6a5a842b16a881e7c4b2195105d14813 to your computer and use it in GitHub Desktop.
Setup Vagrant for Development.
# Make directory
$ mkdir vagrant_test
# Init Vagrant
$ vagrant init
# Add boxes to Vagrant
$ vagrant box add ubuntu/trusty64 ##https://atlas.hashicorp.com/boxes/search
# Open Vagrant File in editor and add/update
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64" ## The "ubuntu/trusty64" in this case must match the name you used to add the box above.
end
# Boot Vagrant environment
$ vagrant up
# SSH into Vagrant machine
$ vagrant ssh
# Terminate the vagrant machine
$ vagrant destory
OR
$ vagrant halt
OR
$ vagrant suspend
## both do same work with minor difference.
# if you like to remove Vagrant Box
$ vagrant box remove
## Provisioning in Vagrant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment