Project setup page
This commit is contained in:
parent
14d63a97d7
commit
715a6fa340
|
@ -3,7 +3,8 @@
|
|||
<ol>
|
||||
<li><a href="/docs/getting-started/index.html">Overview</a></li>
|
||||
<li><a href="/docs/getting-started/why.html">Why Vagrant?</a></li>
|
||||
<li><a href="/docs/getting-started/introduction.html">Introduction and Setup</a></li>
|
||||
<li><a href="/docs/getting-started/introduction.html">Introduction</a></li>
|
||||
<li><a href="/docs/getting-started/setup.html">Project Setup</a></li>
|
||||
<li><a href="/docs/getting-started/boxes.html">Boxes</a></li>
|
||||
<li><a href="/docs/getting-started/provisioning.html">Provisioning</a></li>
|
||||
<li><a href="/docs/getting-started/ports.html">Port Forwarding</a></li>
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
Loading…
Reference in New Issue