Moved "user guide" to just be "documentation"

This commit is contained in:
Mitchell Hashimoto 2010-03-06 20:45:23 -08:00
parent 2fa3111683
commit 290f091a87
10 changed files with 69 additions and 139 deletions

View File

@ -25,7 +25,7 @@
<ul id="nav">
<li><a href="/">home</a></li>
<li><a href="/docs/getting-started/index.html">get started</a></li>
<li><a href="/docs/user-guide/index.html">user guide</a></li>
<li><a href="/docs/index.html">documentation</a></li>
<li><a href="/faq.html">faq</a></li>
<li><a href="/support.html">support</a></li>
<li><a href="http://github.com/mitchellh/vagrant">code</a></li>

View File

@ -0,0 +1,19 @@
{% include header.html %}
<div class="grid_3 alpha sidebar">
<div class="block">
<ol>
<li><a href="/docs/index.html">Overview</a></li>
<li><a href="/docs/commands.html">Commands</a></li>
<li><a href="/docs/vagrantfile.html">Vagrantfile</a></li>
<li><a href="/docs/provisioning.html">Provisioning</a></li>
<li><a href="/docs/boxes.html">Boxes</a></li>
<li><a href="/docs/rake.html">Rake Integration</a></li>
</ol>
</div>
{% include block_beta_warning.html %}
</div>
<div class="grid_9 omega guide">
{{ content }}
</div>
{% include footer.html %}

View File

@ -1,6 +1,6 @@
---
layout: guide
title: User Guide - Boxes
layout: documentation
title: Documentation - Boxes
---
# Boxes

View File

@ -1,6 +1,6 @@
---
layout: guide
title: User Guide - Commands
layout: documentation
title: Documentation - Commands
---
# Commands
@ -37,9 +37,9 @@ the command, so you can easily use the browser search to find any command you're
looking for.
<a name="vagrant-box"> </a>
## vagrant box
## vagrant box
Boxes have there own section: [Vagrant Boxes](/docs/user-guide/boxes.html)
Boxes have there own section: [Vagrant Boxes](/docs/boxes.html)
<a name="vagrant-init"> </a>
## vagrant init
@ -55,16 +55,16 @@ For more information regarding `Vagrantfile`s, read the entire section of the us
guide dedicated to the `Vagrantfile`.
<a name="vagrant-package"> </a>
## vagrant package
## vagrant package
{% highlight bash %}
$ vagrant package [ output-file ] [ --include ]
$ vagrant package [ output-file ] [ --include ]
{% endhighlight %}
Vagrant package brings together all the necessary files required for [VirtualBox](http://www.virtualbox.org) to create
Vagrant package brings together all the necessary files required for [VirtualBox](http://www.virtualbox.org) to create
and register an identical virtual environment for other projects or other machines. It is important to note
that if you intend to recreate an identical experience for another developer using Vagrant that the Vagrantfile
residing at the root of your project directory should be included, see [Vagrant Boxes](/docs/user-guide/boxes.html/#creating-a-box) for more information.
residing at the root of your project directory should be included, see [Vagrant Boxes](/docs/boxes.html#creating-a-box) for more information.
<a name="vagrant-resume"> </a>
## vagrant resume
@ -76,7 +76,7 @@ When you're ready to get rolling again its just as easy to start your virtual ma
## vagrant suspend
When you're ready to call it quits for the day, there's no need to leave your Vagrant box soaking
up cpu cycles and memory. Simply issue `vagrant suspend` from your project root and VirtualBox will
up cpu cycles and memory. Simply issue `vagrant suspend` from your project root and VirtualBox will
take a snapshot of the box's current state from which you can resume later.
<a name="vagrant-ssh"> </a>
@ -84,7 +84,7 @@ take a snapshot of the box's current state from which you can resume later.
Working from the command line inside your box is accomplished with a vanilla ssh connection. In fact
you could use ssh directly, but using `vagrant ssh` means you don't have to remember the login information
or what port ssh is forwarded to from your box. To learn more about those settings see the section on the [Vagrantfile](/docs/user-guide/vagrantfile.html).
or what port ssh is forwarded to from your box. To learn more about those settings see the section on the [Vagrantfile](/docs/vagrantfile.html).
If you're box is booted simply run `vagrant ssh` from the root of your project directory.
<a name="vagrant-up"> </a>

View File

@ -1,87 +0,0 @@
---
layout: default
title: Getting Started
---
This getting started guide will walk you through the basics of setting up and
building your first virtual machine with vagrant. The VM built from this page
will largely be useless from a development point of view, but functions to introduce
you to the basic concepts of Vagrant. This guide will not introduce the provisioning
functionality or packaging system built-in to vagrant.
After the getting started guide, we recommend you read the [Vagrant tutorial](/docs/tutorial/index.html),
which is a much more detailed guide which sets up an HTTP server with MySQL to
run in the background.
## Getting Started in Less than 5 Minutes
Let's get started with the bare minimum needed to get your first virtual environment
running, then we'll go over them step by step. After running the following sequence of
commands, you'll have a fully functional Ubuntu-based server running in the background!
{% highlight bash %}$ sudo gem install vagrant
$ vagrant box add base http://files.vagrantup.com/base.box
$ vagrant init
$ vagrant up{% endhighlight %}
## Step-by-Step Explanations
### Installation
Vagrant is packaged as a [RubyGem](http://rubygems.org/). Since Vagrant is written
in Ruby and RubyGems is a standard part of most Ruby installations, RubyGems is the
quickest and easiest way to distribute Vagrant to the masses, and it can be installed
just as easily:
{% highlight bash %}
$ sudo gem install vagrant
{% endhighlight %}
**Note:** Although Vagrant is written in Ruby and packaged as a RubyGem, Vagrant usage
is _not limited to Ruby-based projects only_. Vagrant will work happily with any project,
no matter what language its written in or uses.
### Add a Box
Vagrant doesn't build a virtual machine _completely_ from scratch. To save time, all VMs
are built from a base, which can be thought of as a preconfigured VM, but only a skeleton.
These base VM configurations are packaged in `box` files, and can be added using the
`vagrant box` command.
Boxes can be built by anyone, including you! But to help you get started, we host our own
bare bones box which is an Ubuntu-based server VM with 360 MB of RAM (by default) and 40 GB
of dynamically-resizing disk storage.
The following command downloads this box from our host and installs it for use:
{% highlight bash %}
$ vagrant box add base http://files.vagrantup.com/base.box
{% endhighlight %}
For more details on boxes such as their structure, where they are unpackaged to, etc.
please read the detailed technical documentation (coming soon).
### Initialize Your Project
Just like make uses a `Makefile` and rake uses a `Rakefile`, Vagrant uses a `Vagrantfile`!
This file is used to configure a project's virtual environment, such as what box to build off
of, what ports to forward, where to share folders, etc. This file is required prior to building
any Vagrant environment.
`vagrant init` simply copies a premade `Vagrantfile` to the current working directory which
by default has a single configuration option to build from the "base" box.
{% highlight bash %}
$ vagrant init
{% endhighlight %}
### Vagrant Up!
Finally, `vagrant up` brings everything together by building a personalized VM from all
the pieces. While in this simple example, Vagrant appears to simply be importing a
virtual machine and starting it, Vagrant is much more powerful than that! Through simple
configuration, Vagrant can forward ports, automatically provision systems with [chef](http://www.opscode.com/chef/),
share folders, and more.
{% highlight bash %}
$ vagrant up
{% endhighlight %}

16
docs/index.md Normal file
View File

@ -0,0 +1,16 @@
---
layout: documentation
title: Documentation - Overview
---
# Documentation
This portion of the site will be dedicated to documenting Vagrant
from top-to-bottom. If you're just getting started with Vagrant, we recommend
you first read the [getting started guide](/docs/getting-started/index.html).
<div class="warning">
<strong>Work in progress!</strong> The documentation is a huge work in progress.
While the getting started guide is fairly complete, the detailed documentation
still has a long way to go. If you have questions, we recommend you check out the
different methods of <a href="/support.html">support lines</a> we have.
</div>

View File

@ -1,6 +1,6 @@
---
layout: guide
title: User Guide - Provisioning
layout: documentation
title: Documentation - Provisioning
---
# Provisioning

View File

@ -1,6 +1,6 @@
---
layout: guide
title: User Guide - Rake Integration
layout: documentation
title: Documentation - Rake Integration
---
# Rake Integration

View File

@ -1,18 +0,0 @@
---
layout: guide
title: User Guide - Overview
---
# Overview
The user guide is a set of documentation meant to both introduce and
explain in detail every portion of Vagrant and its uses. This guide
is hand-written instead of being generated from the Vagrant codebase.
If you're reading this guide on the Vagrant website, then we guarantee
it'll be up-to-date to the currently released gem version. Older versions
of the documentation can be extracted from the git repository, since each
release is tagged, including the documentation branch.
This guide goes through every aspect of Vagrant in great detail. If instead
you're more of the tinkering type and want to just get Vagrant up and running,
check out the [Getting Started](/docs/getting-started/index.html) page instead.

View File

@ -1,6 +1,6 @@
---
layout: guide
title: User Guide - Vagrantfile
layout: documentation
title: Documentation - Vagrantfile
---
# Vagrantfile
@ -43,37 +43,37 @@ There are many available configuration options.
## config.vagrant
The vagrant configuration subset represents configuration settings for Vagrant itself and
The vagrant configuration subset represents configuration settings for Vagrant itself and
should _*not*_ be altered in your packaged box or project Vagrantfile.
## config.ssh
These settings will be used when logging into your Vagrant boxes. Generally, this will be configured
in the Vagrantfile packaged with any boxes you're using as the packaged virtual machine should have been
setup to use a specific user account for connecting.
setup to use a specific user account for connecting.
## config.vm
Vm settings are used when creating new virtual machines to alert Vagrant about how they
should be configured for use.
Vm settings are used when creating new virtual machines to alert Vagrant about how they
should be configured for use.
`config.vm.box` determines which of your boxes will be used when creating a new virtual machine for your project.
In many cases this will be the only configuration you'll ever have to do. The [example](#init-config) above represents a
Vagrantfile configuration where the box being used was installed with
Vagrantfile configuration where the box being used was installed with
{% highlight bash %}
$ vagrant box add my_box http://some.url.for/some_remote_box.box
{% endhighlight %}
or
or
{% highlight bash %}
$ vagrant box add my_box some_downloaded.box
{% endhighlight %}
`config.vm.box_ovf` tells Vagrant and consequently the [virtualbox](http://github.com/mitchellh/virtualbox) gem
which file in the ~/.vagrant/boxes/[configured box]/ directory should be used when importing the configured box
for duplication. (see `config.vm.box`). This setting is only really important for those creating
which file in the ~/.vagrant/boxes/[configured box]/ directory should be used when importing the configured box
for duplication. (see `config.vm.box`). This setting is only really important for those creating
boxes for distribution as this configuration should be included in the packaged Vagrantfile.
`config.vm.base_mac` configures the mac address that the vm will use when built. Because Vagrant duplicates virtual machines
@ -81,7 +81,7 @@ and updating operating system configuration to accomodate changing mac addresses
force a predetermined mac address at vm creation.
`config.vm.project_directory` tells vagrant where to mount the current project directory as a shared folder
withing the new virtual machine's file system.
withing the new virtual machine's file system.
{% highlight ruby %}
config.vm.project_directory = "/vagrant"
@ -90,21 +90,21 @@ config.vm.project_directory = "/vagrant"
The above will use the vagrant folder under root as the mount point for the shared project directory.
`config.vm.forward_ports` is a function that will add a set of ports to forward from the host machine to the virtual machine
created with vagrant. The default Vagrantfile that is packaged with Vagrant itself forwards port 2222 on the host machine to
port 22 on the guest for ssh.
created with vagrant. The default Vagrantfile that is packaged with Vagrant itself forwards port 2222 on the host machine to
port 22 on the guest for ssh.
`config.vm.disk_image_format` alerts Vagrant to the prefered virtual disk image file format for use when creating new virtual machines. VirtualBox
`config.vm.disk_image_format` alerts Vagrant to the prefered virtual disk image file format for use when creating new virtual machines. VirtualBox
supports many disk formats such as .vdi (VirtualBox's own format), .vmdk (VMWare's disk image format), and .vhd (Microsoft's format).
## config.package
These setting determine the defaults for the file name, `config.package.name`, and file extension, `config.package.extension`, used
when [packaging](/docs/getting-started/packaging.html) a vm for distribution.
when [packaging](/docs/getting-started/packaging.html) a vm for distribution.
## config.chef
Vagrant leverages Chef's ability to [provision](/docs/user-guide/provisioning.html) environments quickly and easily through this set of configuration options.
Vagrant leverages Chef's ability to [provision](/docs/provisioning.html) environments quickly and easily through this set of configuration options.
`config.chef.enabled` is set to false in the default Vagrantfile and must be explicity turned on in a packaged or project specific Vagrantfile.
@ -122,7 +122,7 @@ $ sudo chef solo -c solo.rb -j dna.json
{% highlight ruby %}
config.chef.json = {
:instance_role => "vagrant",
:recipes => ["vagrant_main"]
:recipes => ["vagrant_main"]
}
{% endhighlight %}