From 45b17571aeea2b21cbb04269a13b88cc2a70cfb0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 1 Mar 2014 10:00:19 +0100 Subject: [PATCH] website/docs: update getting started guide to use box directory --- website/docs/source/layouts/layout.erb | 1 + .../source/v2/getting-started/boxes.html.md | 38 +++++++++---- .../source/v2/getting-started/index.html.md | 2 +- .../source/v2/getting-started/share.html.md | 56 +++++++++++++++++++ .../docs/source/v2/getting-started/up.html.md | 2 +- 5 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 website/docs/source/v2/getting-started/share.html.md diff --git a/website/docs/source/layouts/layout.erb b/website/docs/source/layouts/layout.erb index 48ce72e14..ed9b866f9 100644 --- a/website/docs/source/layouts/layout.erb +++ b/website/docs/source/layouts/layout.erb @@ -96,6 +96,7 @@ >Synced Folders >Provisioning >Networking + >Share >Teardown >Rebuild >Providers diff --git a/website/docs/source/v2/getting-started/boxes.html.md b/website/docs/source/v2/getting-started/boxes.html.md index 4a892c5b1..2afefbe08 100644 --- a/website/docs/source/v2/getting-started/boxes.html.md +++ b/website/docs/source/v2/getting-started/boxes.html.md @@ -23,17 +23,17 @@ under a specific name so that multiple Vagrant environments can re-use it. If you haven't added a box yet, you can do so now: ``` -$ vagrant box add precise32 \ - http://files.vagrantup.com/precise32.box +$ vagrant box add hashicorp/precise32 ``` -This will download the box from an HTTP source and save it as "precise32" -in a directory that Vagrant manages (away from your project). You can also -add boxes from a local file path. +This will download the box named "hashicorp/precise32" from +[Vagrant Cloud](http://www.vagrantcloud.com), a place where you can find +and host boxes. While it is easiest to download boxes from Vagrant Cloud +you can also add boxes from a local file, custom URL, etc. Added boxes can be re-used by multiple projects. Each project uses a box as an initial image to clone from, and never modifies the actual base -image. This means that if you have two projects both using the `precise32` +image. This means that if you have two projects both using the `hashicorp/precise32` box we just added, adding files in one guest machine will have no effect on the other machine. @@ -45,12 +45,30 @@ contents to the following: ```ruby Vagrant.configure("2") do |config| - config.vm.box = "precise32" + config.vm.box = "hashicorp/precise32" end ``` -The "precise32" in this case must match the name you used to add -the box above. This is how Vagrant knows what box to use. +The "hashicorp/precise32" in this case must match the name you used to add +the box above. This is how Vagrant knows what box to use. If the box wasn't +added before, Vagrant will automatically download and add the box when it is +run. -In the next section, we'll bring up the guest machine and interact +In the next section, we'll bring up the Vagrant environment and interact with it a little bit. + +## Finding More Boxes + +For the remainder of this getting started guide, we'll only use the +"hashicorp/precise32" box we added previously. But soon after finishing +this getting started guide, the first question you'll probably have is +"where do I find more boxes?" + +The best place to find more boxes is [Vagrant Cloud](http://www.vagrantcloud.com). +Vagrant Cloud has a public directory of freely available boxes that +run various platorms and technologies. Vagrant Cloud also has a great search +feature to allow you to find the box you care about. + +In addition to finding free boxes, Vagrant Cloud lets you host your own +boxes, as well as private boxes if you intend on creating boxes for your +own organization. diff --git a/website/docs/source/v2/getting-started/index.html.md b/website/docs/source/v2/getting-started/index.html.md index c743b4cf4..fd73de81b 100644 --- a/website/docs/source/v2/getting-started/index.html.md +++ b/website/docs/source/v2/getting-started/index.html.md @@ -34,7 +34,7 @@ Vagrant: Up and Running ## Up and Running ``` -$ vagrant init precise32 http://files.vagrantup.com/precise32.box +$ vagrant init hashicorp/precise32 $ vagrant up ``` diff --git a/website/docs/source/v2/getting-started/share.html.md b/website/docs/source/v2/getting-started/share.html.md new file mode 100644 index 000000000..e82d8f927 --- /dev/null +++ b/website/docs/source/v2/getting-started/share.html.md @@ -0,0 +1,56 @@ +--- +page_title: "Share - Getting Started" +sidebar_current: "gettingstarted-share" +--- + +# Share + +Now that we have a web server up and running and accessible from your machine, +we have a fairly functional development environment. But in addition to +providing a development environment, Vagrant also makes it easy to share +and collaborate on these environments. The primary feature to do this in +Vagrant is called [Vagrant Share](/v2/share/index.html). + +Vagrant Share lets you share your Vagrant environment to anyone around the +world. It will give you a URL that will route directly to your Vagrant +environment from any device in the world that is connected to the internet. + +## Login to Vagrant Cloud + +Before being able to share your Vagrant environment, you'll need an account on +[Vagrant Cloud](http://www.vagrantcloud.com). Don't worry, it's free. + +Once you have an account, log in using `vagrant login`: + +``` +$ vagrant login: +Username or Email: mitchellh +Password (will be hidden): +You're now logged in! +``` + +## Share + +Once you're logged in, run `vagrant share`: + +``` +$ vagrant share +... +==> default: Your Vagrant Share is running! +==> default: URL: http://frosty-weasel-0857.vagrantshare.com +... +``` + +Your URL will be different, so don't try the URL above. Instead, copy +the URL that `vagrant share` outputted for you and visit that in a web +browser. It should load the index page we setup in the previous pages. + +Now, modify your "index.html" file and refresh the URL. It will be updated! +That URL is routing directly into your Vagrant environment, and works from +any device in the world that is connected to the internet. + +To end the sharing session, hit `Ctrl+C` in your terminal. You can refresh +the URL again to verify that your environment is no longer being shared. + +Vagrant Share is much more powerful than simply HTTP sharing. For more +details, see the [complete Vagrant Share documentation](/v2/share/index.html). diff --git a/website/docs/source/v2/getting-started/up.html.md b/website/docs/source/v2/getting-started/up.html.md index c064aae3c..3a9686afa 100644 --- a/website/docs/source/v2/getting-started/up.html.md +++ b/website/docs/source/v2/getting-started/up.html.md @@ -5,7 +5,7 @@ sidebar_current: "gettingstarted-up" # Up And SSH -It is time to boot your first guest machine. Run the following: +It is time to boot your first Vagrant environment. Run the following: ``` $ vagrant up