diff --git a/_layouts/getting_started.html b/_layouts/getting_started.html index 92ebb6ccd..d905a7a55 100644 --- a/_layouts/getting_started.html +++ b/_layouts/getting_started.html @@ -3,7 +3,8 @@
  1. Overview
  2. Why Vagrant?
  3. -
  4. Introduction and Setup
  5. +
  6. Introduction
  7. +
  8. Project Setup
  9. Boxes
  10. Provisioning
  11. Port Forwarding
  12. diff --git a/docs/getting-started/introduction.md b/docs/getting-started/introduction.md new file mode 100644 index 000000000..2d5122030 --- /dev/null +++ b/docs/getting-started/introduction.md @@ -0,0 +1,36 @@ +--- +layout: getting_started +title: Getting Started - Introduction +--- +# Introduction + +This initial section will introduce the binaries and Vagrantfile, which are +used extensively in controlling Vagrant. The remainder of the getting started +guides assumes this basic knowledge. + +## Vagrant Binaries + +Once Vagrant is installed, it is typically controlled through the `vagrant` +command line interface. Vagrant comes with around 10 separate binaries, all prefixed +with `vagrant`, such as `vagrant-up`, `vagrant-ssh`, and `vagrant-package`. These are +known as _git style binaries_ (since they mimic git). Taking it one step further, +the hyphen between the commands are optional. To call `vagrant-up` for example, you +could just do `vagrant up` and the two commands would behave the exact same way. + +## The Vagrantfile + +A Vagrantfile is to Vagrant as a Makefile is to Make. The Vagrantfile exists at the root +of any Vagrant project and is used to configure and specify the behavior of +Vagrant and the virtual machine it creates. A basic Vagrantfile is embedded below +so you can get a brief idea of how it looks: + +{% highlight ruby %} +Vagrant::Config.run do |config| + # Setup the box + config.vm.box = "my_box" +end +{% endhighlight %} + +As you can see, a Vagrantfile is simply Ruby code which typically contains a Vagrant +configuration block. For most commands, Vagrant will first load the project's +Vagrantfile for configuration. \ No newline at end of file diff --git a/docs/getting-started/setup.md b/docs/getting-started/setup.md new file mode 100644 index 000000000..2fc89762c --- /dev/null +++ b/docs/getting-started/setup.md @@ -0,0 +1,26 @@ +--- +layout: getting_started +title: Getting Started - Project Setup +--- +# Project Setup + +The remainder of this getting started guide is written as a walkthrough. +As the reader, you are encouraged to follow along with the samples on your own +personal computer. Since Vagrant works with virtual machines, there will be no +"cruft" left over if you ever wish to stop (no extraneous software, files, etc) +as Vagrant will handle destroying the virtual machine if you so choose. + +The first step for any project which uses Vagrant is to mark the root directory +and setup the basic required files. Vagrant provides a handy command-line utility +for just that. In the terminal transcript below, we create the directory for our +project and initialize it for Vagrant: + +{% highlight bash %} +$ mkdir vagrant_guide +$ cd vagrant_guide +$ vagrant init +{% endhighlight %} + +`vagrant init` creates an initial Vagrantfile. For now, we'll leave this Vagrantfile +as-is, but it will be used extensively in future steps to configure our virtual +machine. \ No newline at end of file