Thursday, 29 June 2017

Vagrant Setup

UP AND RUNNING
$ vagrant init hashicorp/precise64 $ vagrant up
After running the above two commands, you will have a fully running virtual machine in VirtualBox running Ubuntu 12.04 LTS 64-bit. You can SSH into this machine with vagrant ssh, and when you are done playing around, you can terminate the virtual machine with vagrant destroy.
Now imagine every project you've ever worked on being this easy to set up! With Vagrant, vagrant up is all you need to work on any project, to install every dependency that project needs, and to set up any networking or synced folders, so you can continue working from the comfort of your own machine.
The rest of this guide will walk you through setting up a more complete project, covering more features of Vagrant.
Vagrant has a built-in command for initializing a directory for usage with Vagrant: vagrant init. For the purpose of this getting started guide, please follow along in your terminal:
$ mkdir vagrant_getting_started $ cd vagrant_getting_started $ vagrant init This will place a Vagrantfile in your current directory. You can take a look at the Vagrantfile if you want, it is filled with comments and examples. Do not be afraid if it looks intimidating, we will modify it soon enough.
You can also run vagrant init in a pre-existing directory to set up Vagrant for an existing project.
Finally run:
$ vagrant ssh

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive