Convert atlas references to vagrant cloud

This commit is contained in:
Chris Roberts 2017-05-22 09:42:31 -07:00
parent 238ac6c4e2
commit 5f955c3d38
32 changed files with 128 additions and 308 deletions

View File

@ -5,12 +5,12 @@ require "thread"
module Vagrant module Vagrant
@@global_lock = Mutex.new @@global_lock = Mutex.new
# This is the default endpoint of the Atlas in # This is the default endpoint of the Vagrant Cloud in
# use. API calls will be made to this for various functions # use. API calls will be made to this for various functions
# of Vagrant that may require remote access. # of Vagrant that may require remote access.
# #
# @return [String] # @return [String]
DEFAULT_SERVER_URL = "https://atlas.hashicorp.com" DEFAULT_SERVER_URL = "https://vagrantcloud.com"
# Max number of seconds to wait for joining an active thread. # Max number of seconds to wait for joining an active thread.
# #

View File

@ -40,7 +40,7 @@ module VagrantPlugins
end end
o.separator "" o.separator ""
o.separator "The box descriptor can be the name of a box on HashiCorp's Atlas," o.separator "The box descriptor can be the name of a box on HashiCorp's Vagrant Cloud,"
o.separator "or a URL, or a local .box file, or a local .json file containing" o.separator "or a URL, or a local .box file, or a local .json file containing"
o.separator "the catalog metadata." o.separator "the catalog metadata."
o.separator "" o.separator ""

View File

@ -86,28 +86,26 @@ module VagrantPlugins
end end
# Reads the access token if there is one. This will first read the # Reads the access token if there is one. This will first read the
# `ATLAS_TOKEN` environment variable and then fallback to the stored # `VAGRANT_CLOUD_TOKEN` environment variable and then fallback to the stored
# access token on disk. # access token on disk.
# #
# @return [String] # @return [String]
def token def token
if present?(ENV["ATLAS_TOKEN"]) && token_path.exist? if present?(ENV["VAGRANT_CLOUD_TOKEN"]) && token_path.exist?
@env.ui.warn <<-EOH.strip @env.ui.warn <<-EOH.strip
Vagrant detected both the ATLAS_TOKEN environment variable and a Vagrant login Vagrant detected both the VAGRANT_CLOUD_TOKEN environment variable and a Vagrant login
token are present on this system. The ATLAS_TOKEN environment variable takes token are present on this system. The VAGRANT_CLOUD_TOKEN environment variable takes
precedence over the locally stored token. To remove this error, either unset precedence over the locally stored token. To remove this error, either unset
the ATLAS_TOKEN environment variable or remove the login token stored on disk: the VAGRANT_CLOUD_TOKEN environment variable or remove the login token stored on disk:
~/.vagrant.d/data/vagrant_login_token ~/.vagrant.d/data/vagrant_login_token
In general, the ATLAS_TOKEN is more preferred because it is respected by all
HashiCorp products.
EOH EOH
end end
if present?(ENV["ATLAS_TOKEN"]) if present?(ENV["VAGRANT_CLOUD_TOKEN"])
@logger.debug("Using authentication token from environment variable") @logger.debug("Using authentication token from environment variable")
return ENV["ATLAS_TOKEN"] return ENV["VAGRANT_CLOUD_TOKEN"]
end end
if token_path.exist? if token_path.exist?
@ -115,6 +113,11 @@ EOH
return token_path.read.strip return token_path.read.strip
end end
if present?(ENV["ATLAS_TOKEN"])
@logger.warn("ATLAS_TOKEN detected within environment. Using ATLAS_TOKEN in place of VAGRANT_CLOUD_TOKEN.")
return ENV["ATLAS_TOKEN"]
end
@logger.debug("No authentication token in environment or #{token_path}") @logger.debug("No authentication token in environment or #{token_path}")
nil nil

View File

@ -2,7 +2,7 @@ module VagrantPlugins
module LoginCommand module LoginCommand
class Command < Vagrant.plugin("2", "command") class Command < Vagrant.plugin("2", "command")
def self.synopsis def self.synopsis
"log in to HashiCorp's Atlas" "log in to HashiCorp's Vagrant Cloud"
end end
def execute def execute
@ -19,7 +19,7 @@ module VagrantPlugins
options[:logout] = k options[:logout] = k
end end
o.on("-t", "--token TOKEN", String, "Set the Atlas token") do |t| o.on("-t", "--token TOKEN", String, "Set the Vagrant Cloud token") do |t|
options[:token] = t options[:token] = t
end end
end end
@ -44,14 +44,14 @@ module VagrantPlugins
# If it is a private cloud installation, show that # If it is a private cloud installation, show that
if Vagrant.server_url != Vagrant::DEFAULT_SERVER_URL if Vagrant.server_url != Vagrant::DEFAULT_SERVER_URL
@env.ui.output("Atlas URL: #{Vagrant.server_url}") @env.ui.output("Vagrant Cloud URL: #{Vagrant.server_url}")
end end
# Ask for the username # Ask for the username
login = nil login = nil
password = nil password = nil
while !login while !login
login = @env.ui.ask("Atlas Username: ") login = @env.ui.ask("Vagrant Cloud Username: ")
end end
while !password while !password

View File

@ -2,11 +2,11 @@ en:
login_command: login_command:
errors: errors:
server_error: |- server_error: |-
The Atlas server responded with an not-OK response: The Vagrant Cloud server responded with an not-OK response:
%{errors} %{errors}
server_unreachable: |- server_unreachable: |-
The Atlas server is not currently accepting connections. Please check The Vagrant Cloud server is not currently accepting connections. Please check
your network connection and try again later. your network connection and try again later.
check_logged_in: |- check_logged_in: |-
@ -16,12 +16,12 @@ en:
your login information to authenticate. your login information to authenticate.
command_header: |- command_header: |-
In a moment we will ask for your username and password to HashiCorp's In a moment we will ask for your username and password to HashiCorp's
Atlas. After authenticating, we will store an access token locally on Vagrant Cloud. After authenticating, we will store an access token locally on
disk. Your login details will be transmitted over a secure connection, and disk. Your login details will be transmitted over a secure connection, and
are never stored on disk locally. are never stored on disk locally.
If you do not have an Atlas account, sign up at If you do not have an Vagrant Cloud account, sign up at
https://atlas.hashicorp.com. https://www.vagrantcloud.com
invalid_login: |- invalid_login: |-
Invalid username or password. Please try again. Invalid username or password. Please try again.
invalid_token: |- invalid_token: |-

View File

@ -29,7 +29,8 @@ module VagrantPlugins
# Vagrant Cloud to Atlas. This preserves access tokens # Vagrant Cloud to Atlas. This preserves access tokens
# appending to both without leaking access tokens to # appending to both without leaking access tokens to
# unsavory URLs. # unsavory URLs.
if u.host == VCLOUD && server_uri.host == ATLAS if (u.host == VCLOUD && server_uri.host == ATLAS) ||
(u.host == ATLAS && server_uri.host == VCLOUD)
replace = true replace = true
end end
end end

View File

@ -8,7 +8,7 @@ module VagrantPlugins
class Plugin < Vagrant.plugin("2") class Plugin < Vagrant.plugin("2")
name "vagrant-login" name "vagrant-login"
description <<-DESC description <<-DESC
Provides the login command and internal API access to Atlas. Provides the login command and internal API access to Vagrant Cloud.
DESC DESC
command(:login) do command(:login) do

View File

@ -11,7 +11,7 @@ Vagrant.configure("2") do |config|
# https://docs.vagrantup.com. # https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for # Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search. # boxes at https://vagrantcloud.com/search.
config.vm.box = "<%= box_name %>" config.vm.box = "<%= box_name %>"
<% if box_version -%> <% if box_version -%>
config.vm.box_version = "<%= box_version %>" config.vm.box_version = "<%= box_version %>"
@ -69,13 +69,6 @@ Vagrant.configure("2") do |config|
# View the documentation for the provider you are using for more # View the documentation for the provider you are using for more
# information on available options. # information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as # Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use. # documentation for more information about their specific syntax and use.

View File

@ -387,7 +387,7 @@ en:
provider. Double-check your requested provider to verify you didn't provider. Double-check your requested provider to verify you didn't
simply misspell it. simply misspell it.
If you're adding a box from HashiCorp's Atlas, make sure the box is If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released. released.
Name: %{name} Name: %{name}
@ -406,7 +406,7 @@ en:
box_add_short_not_found: |- box_add_short_not_found: |-
The box '%{name}' could not be found or The box '%{name}' could not be found or
could not be accessed in the remote catalog. If this is a private could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via box on HashiCorp's Vagrant Cloud, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded `vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below: URL and error message are shown below:
@ -571,12 +571,12 @@ en:
%{versions} %{versions}
box_server_not_set: |- box_server_not_set: |-
A URL to an Atlas server is not set, so boxes cannot be added with a A URL to a Vagrant Cloud server is not set, so boxes cannot be added with a
shorthand ("mitchellh/precise64") format. You may also be seeing this shorthand ("mitchellh/precise64") format. You may also be seeing this
error if you meant to type in a path to a box file which doesn't exist error if you meant to type in a path to a box file which doesn't exist
locally on your system. locally on your system.
To set a URL to an Atlas server, set the `VAGRANT_SERVER_URL` To set a URL to a Vagrant Cloud server, set the `VAGRANT_SERVER_URL`
environmental variable. Or, if you meant to use a file path, make sure environmental variable. Or, if you meant to use a file path, make sure
the path to the file is valid. the path to the file is valid.
box_update_multi_provider: |- box_update_multi_provider: |-

View File

@ -107,13 +107,13 @@ describe VagrantPlugins::LoginCommand::Client do
end end
it "prefers the environment variable" do it "prefers the environment variable" do
stub_env("ATLAS_TOKEN" => "ABCD1234") stub_env("VAGRANT_CLOUD_TOKEN" => "ABCD1234")
subject.store_token("EFGH5678") subject.store_token("EFGH5678")
expect(subject.token).to eq("ABCD1234") expect(subject.token).to eq("ABCD1234")
end end
it "prints a warning if the envvar and stored file are both present" do it "prints a warning if the envvar and stored file are both present" do
stub_env("ATLAS_TOKEN" => "ABCD1234") stub_env("VAGRANT_CLOUD_TOKEN" => "ABCD1234")
subject.store_token("EFGH5678") subject.store_token("EFGH5678")
expect(env.ui).to receive(:warn).with(/detected both/) expect(env.ui).to receive(:warn).with(/detected both/)
subject.token subject.token

View File

@ -67,9 +67,8 @@ description: |-
<h3>Jack Pearkes (<a href="https://github.com/pearkes">@pearkes</a>)</h3> <h3>Jack Pearkes (<a href="https://github.com/pearkes">@pearkes</a>)</h3>
<p> <p>
Jack Pearkes created and maintains many projects at HashiCorp. He Jack Pearkes created and maintains many projects at HashiCorp. He
is the original author of Vagrant Cloud (now is the original author of <a href="https://vagrantcloud.com">Vagrant Cloud</a>.
<a href="https://atlas.hashicorp.com">Atlas</a>). He is also a He is also a core committer to <a href="https://www.packer.io">Packer</a>
core committer to <a href="https://www.packer.io">Packer</a>
and maintains many successful and maintains many successful
<a href="https://github.com/pearkes">open source projects</a> <a href="https://github.com/pearkes">open source projects</a>
while also being an employee of while also being an employee of

View File

@ -19,7 +19,7 @@ boxes. You can read the documentation on the [vagrant box](/docs/cli/box.html)
command for more information. command for more information.
The easiest way to use a box is to add a box from the The easiest way to use a box is to add a box from the
[publicly available catalog of Vagrant boxes](https://atlas.hashicorp.com/boxes/search). [publicly available catalog of Vagrant boxes](https://vagrantcloud.com/boxes/search).
You can also add and share your own customized boxes on this website. You can also add and share your own customized boxes on this website.
Boxes also support versioning so that members of your team using Vagrant Boxes also support versioning so that members of your team using Vagrant
@ -32,7 +32,7 @@ sub-pages in the navigation to the left.
## Discovering Boxes ## Discovering Boxes
The easiest way to find boxes is to look on the The easiest way to find boxes is to look on the
[public Vagrant box catalog](https://atlas.hashicorp.com/boxes/search) [public Vagrant box catalog](https://vagrantcloud.com/boxes/search)
for a box matching your use case. The catalog contains most major operating for a box matching your use case. The catalog contains most major operating
systems as bases, as well as specialized boxes to get you up and running systems as bases, as well as specialized boxes to get you up and running
quickly with LAMP stacks, Ruby, Python, etc. quickly with LAMP stacks, Ruby, Python, etc.
@ -53,7 +53,7 @@ initialize a Vagrant environment with `vagrant init hashicorp/precise64`.
~> **Namespaces do not guarantee canonical boxes!** A common misconception is ~> **Namespaces do not guarantee canonical boxes!** A common misconception is
that a namespace like "ubuntu" represents the canonical space for Ubuntu boxes. that a namespace like "ubuntu" represents the canonical space for Ubuntu boxes.
This is untrue. Namespaces on Atlas behave very similarly to namespaces on This is untrue. Namespaces on Vagrant Cloud behave very similarly to namespaces on
GitHub, for example. Just as GitHub's support team is unable to assist with GitHub, for example. Just as GitHub's support team is unable to assist with
issues in someone's repository, HashiCorp's support team is unable to assist issues in someone's repository, HashiCorp's support team is unable to assist
with third-party published boxes. with third-party published boxes.
@ -74,8 +74,8 @@ Vagrant.configure("2") do |config|
end end
``` ```
For other users, we recommend the [Bento boxes](https://atlas.hashicorp.com/bento). The Bento boxes are [open source](https://github.com/chef/bento) and built for a number of providers including VMware, Virtualbox, and Parallels. There are a variety of operating systems and versions available. For other users, we recommend the [Bento boxes](https://vagrantcloud.com/bento). The Bento boxes are [open source](https://github.com/chef/bento) and built for a number of providers including VMware, Virtualbox, and Parallels. There are a variety of operating systems and versions available.
These are the only two officially-recommended box sets. These are the only two officially-recommended box sets.
~> **It is often a point of confusion**, but Canonical (the company that makes the Ubuntu operating system) publishes boxes under the "ubuntu" namespace on Atlas. These boxes only support Virtualbox and do not provide an ideal experience for most users. If you encounter issues with these boxes, please try the Bento boxes instead. ~> **It is often a point of confusion**, but Canonical (the company that makes the Ubuntu operating system) publishes boxes under the "ubuntu" namespace on Vagrant Cloud. These boxes only support Virtualbox and do not provide an ideal experience for most users. If you encounter issues with these boxes, please try the Bento boxes instead.

View File

@ -66,7 +66,7 @@ Provider-specific guides for creating base boxes are linked below:
* [VMware Base Boxes](/docs/vmware/boxes.html) * [VMware Base Boxes](/docs/vmware/boxes.html)
* [VirtualBox Base Boxes](/docs/virtualbox/boxes.html) * [VirtualBox Base Boxes](/docs/virtualbox/boxes.html)
### Packer and Atlas ### Packer and Vagrant Cloud
We strongly recommend using [Packer](https://www.packer.io) to create reproducible We strongly recommend using [Packer](https://www.packer.io) to create reproducible
builds for your base boxes, as well as automating the builds with builds for your base boxes, as well as automating the builds with
@ -265,7 +265,7 @@ provider-specific guides are linked to towards the top of this page.
You can distribute the box file however you would like. However, if you want You can distribute the box file however you would like. However, if you want
to support versioning, putting multiple providers at a single URL, pushing to support versioning, putting multiple providers at a single URL, pushing
updates, analytics, and more, we recommend you add the box to updates, analytics, and more, we recommend you add the box to
[HashiCorp's Atlas](/docs/other/atlas.html). [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud).
You can upload both public and private boxes to this service. You can upload both public and private boxes to this service.

View File

@ -27,7 +27,7 @@ Today, there are three different components:
box file and so on. box file and so on.
* Box Catalog Metadata - This is a JSON document (typically exchanged * Box Catalog Metadata - This is a JSON document (typically exchanged
during interactions with [HashiCorp's Atlas](/docs/other/atlas.html)) during interactions with [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud))
that specifies the name of the box, a description, available that specifies the name of the box, a description, available
versions, available providers, and URLs to the actual box files versions, available providers, and URLs to the actual box files
(next component) for each provider and version. If this catalog (next component) for each provider and version. If this catalog
@ -86,8 +86,8 @@ providers from a single file, and more.
<div class="alert alert-block alert-info"> <div class="alert alert-block alert-info">
<strong>You do not need to manually make the metadata.</strong> If you <strong>You do not need to manually make the metadata.</strong> If you
have an account with <a href="/docs/other/atlas.html">HashiCorp's Atlas</a>, you have an account with <a href="/docs/vagrant-cloud">HashiCorp's Vagrant Cloud</a>, you
can create boxes there, and HashiCorp's Atlas automatically creates can create boxes there, and HashiCorp's Vagrant Cloud automatically creates
the metadata for you. The format is still documented here. the metadata for you. The format is still documented here.
</div> </div>

View File

@ -30,10 +30,10 @@ to update your own custom boxes with versions. That is covered in
`vagrant box list` only shows _installed_ versions of boxes. If you want `vagrant box list` only shows _installed_ versions of boxes. If you want
to see all available versions of a box, you will have to find the box to see all available versions of a box, you will have to find the box
on [HashiCorp's Atlas](/docs/other/atlas.html). An easy way to find a box on [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud). An easy way to find a box
is to use the url `https://atlas.hashicorp.com/$USER/$BOX`. For example, for is to use the url `https://vagrantcloud.com/$USER/$BOX`. For example, for
the `hashicorp/precise64` box, you can find information about it at the `hashicorp/precise64` box, you can find information about it at
`https://atlas.hashicorp.com/hashicorp/precise64`. `https://vagrantcloud.com/hashicorp/precise64`.
You can check if the box you are using is outdated with `vagrant box outdated`. You can check if the box you are using is outdated with `vagrant box outdated`.
This can check if the box in your current Vagrant environment is outdated This can check if the box in your current Vagrant environment is outdated

View File

@ -32,10 +32,10 @@ This adds a box with the given address to Vagrant. The address can be
one of three things: one of three things:
* A shorthand name from the * A shorthand name from the
[public catalog of available Vagrant images](https://atlas.hashicorp.com/boxes/search), [public catalog of available Vagrant images](https://vagrantcloud.com/boxes/search),
such as "hashicorp/precise64". such as "hashicorp/precise64".
* File path or HTTP URL to a box in a [catalog](https://atlas.hashicorp.com/boxes/search). * File path or HTTP URL to a box in a [catalog](https://vagrantcloud.com/boxes/search).
For HTTP, basic authentication is supported and `http_proxy` environmental For HTTP, basic authentication is supported and `http_proxy` environmental
variables are respected. HTTPS is also supported. variables are respected. HTTPS is also supported.
@ -99,8 +99,8 @@ you are not using a catalog).
to be specified. to be specified.
<div class="alert alert-warning"> <div class="alert alert-warning">
<strong>Checksums for versioned boxes or boxes from HashiCorp's Atlas:</strong> <strong>Checksums for versioned boxes or boxes from HashiCorp's Vagrant Cloud:</strong>
For boxes from HashiCorp's Atlas, the checksums are embedded in the metadata For boxes from HashiCorp's Vagrant Cloud, the checksums are embedded in the metadata
of the box. The metadata itself is served over TLS and its format is validated. of the box. The metadata itself is served over TLS and its format is validated.
</div> </div>

View File

@ -4,7 +4,7 @@ page_title: "vagrant login - Command-Line Interface"
sidebar_current: "cli-login" sidebar_current: "cli-login"
description: |- description: |-
The "vagrant login" command is used to authenticate Vagrant with HashiCorp's The "vagrant login" command is used to authenticate Vagrant with HashiCorp's
Atlas service to use features like private boxes and "vagrant push". Vagrant Cloud service to use features like private boxes and "vagrant push".
--- ---
# Login # Login
@ -12,7 +12,7 @@ description: |-
**Command: `vagrant login`** **Command: `vagrant login`**
The login command is used to authenticate with the The login command is used to authenticate with the
[HashiCorp's Atlas](/docs/other/atlas.html) server. Logging is only [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud) server. Logging is only
necessary if you are accessing protected boxes or using necessary if you are accessing protected boxes or using
[Vagrant Share](/docs/share/). [Vagrant Share](/docs/share/).
@ -34,19 +34,19 @@ is available below.
logged out, this command will do nothing. It is not an error to call this logged out, this command will do nothing. It is not an error to call this
command if you are already logged out. command if you are already logged out.
* `--token` - This will set the Atlas login token manually to the provided * `--token` - This will set the Vagrant Cloud login token manually to the provided
string. It is assumed this token is a valid Atlas access token. string. It is assumed this token is a valid Vagrant Cloud access token.
## Examples ## Examples
Securely authenticate to Atlas using a username and password: Securely authenticate to Vagrant Cloud using a username and password:
```text ```text
$ vagrant login $ vagrant login
# ... # ...
Atlas username: Vagrant Cloud username:
Atlas password: Vagrant Cloud password:
``` ```
Check if the current user is authenticated: Check if the current user is authenticated:
@ -56,7 +56,7 @@ $ vagrant login --check
You are already logged in. You are already logged in.
``` ```
Securely authenticate with Atlas using a token: Securely authenticate with Vagrant Cloud using a token:
```text ```text
$ vagrant login --token ABCD1234 $ vagrant login --token ABCD1234

View File

@ -21,5 +21,5 @@ admin rights. Vagrant will show you an error if it does not have the proper
permissions. permissions.
Boxes for Hyper-V can be easily found on Boxes for Hyper-V can be easily found on
[HashiCorp's Atlas](https://atlas.hashicorp.com/boxes/search). To get started, you might [HashiCorp's Vagrant Cloud](https://vagrantcloud.com/boxes/search). To get started, you might
want to try the `hashicorp/precise64` box. want to try the `hashicorp/precise64` box.

View File

@ -1,23 +0,0 @@
---
layout: "docs"
page_title: "Atlas and Vagrant"
sidebar_current: "other-atlas"
description: |-
A brief description of how to use, sign up for and access the
Vagrant features in Atlas.
---
# Atlas and Vagrant
Atlas is the HashiCorp Suite for the Enterprise,
but also provides features for the community. It hosts
a <a href="https://atlas.hashicorp.com/boxes/search">public registry of Vagrant boxes</a>
as well as powers the Vagrant share features.
Vagrant Enterprise is provided via Atlas and allows
for private boxes to be hosted and distributed to
your team.
## Signing up for Atlas
You can signup for a free Atlas account <a href="https://atlas.hashicorp.com/account/new">here</a>.

View File

@ -12,6 +12,5 @@ description: |-
This section covers other information that does not quite fit under the This section covers other information that does not quite fit under the
other categories. other categories.
- [Atlas](/docs/other/atlas.html)
- [Debugging](/docs/other/debugging.html) - [Debugging](/docs/other/debugging.html)
- [Environment Variables](/docs/other/environmental-variables.html) - [Environment Variables](/docs/other/environmental-variables.html)

View File

@ -1,68 +0,0 @@
---
layout: "docs"
page_title: "Vagrant Push - Atlas Strategy"
sidebar_current: "push-atlas"
description: |-
Atlas is HashiCorp's commercial offering to bring your Vagrant development
environments to production. The Vagrant Push Atlas strategy pushes your
application's code to HashiCorp's Atlas service.
---
# Vagrant Push
## Atlas Strategy
[Atlas][] is HashiCorp's commercial offering to bring your Vagrant development
environments to production. You can read more about HashiCorp's Atlas and all
its features on [the Atlas homepage][Atlas]. The Vagrant Push Atlas strategy
pushes your application's code to HashiCorp's Atlas service.
The Vagrant Push Atlas strategy supports the following configuration options:
- `app` - The name of the application in [HashiCorp's Atlas][Atlas]. If the
application does not exist, it will be created with user confirmation.
- `exclude` - Add a file or file pattern to exclude from the upload, relative to
the `dir`. This value may be specified multiple times and is additive.
`exclude` take precedence over `include` values.
- `include` - Add a file or file pattern to include in the upload, relative to
the `dir`. This value may be specified multiple times and is additive.
- `dir` - The base directory containing the files to upload. By default this is
the same directory as the Vagrantfile, but you can specify this if you have
a `src` folder or `bin` folder or some other folder you want to upload.
- `vcs` - If set to true, Vagrant will automatically use VCS data to determine
the files to upload. Uncommitted changes will not be deployed.
Additionally, the following options are exposed for power users of the Vagrant
Atlas push strategy. Most users will not require these options:
- `address` - The address of the Atlas server to upload to. By default this will
be the public Atlas server.
- `token` - The Atlas token to use. If the user has run `vagrant login`, this
will the token generated by that command. If the environment variable
`ATLAS_TOKEN` is set, the uploader will use this value. By default, this is
nil.
### Usage
The Vagrant Push Atlas strategy is defined in the `Vagrantfile` using the
`atlas` key:
```ruby
config.push.define "atlas" do |push|
push.app = "username/application"
end
```
And then push the application to Atlas:
```shell
$ vagrant push
```
[Atlas]: /docs/other/atlas.html "HashiCorp's Atlas Service"

View File

@ -10,8 +10,7 @@ description: |-
# Vagrant Push # Vagrant Push
As of version 1.7, Vagrant is capable of deploying or "pushing" application code As of version 1.7, Vagrant is capable of deploying or "pushing" application code
in the same directory as your Vagrantfile to a remote such as an FTP server or in the same directory as your Vagrantfile to a remote such as an FTP server.
[HashiCorp's Atlas][Atlas].
Pushes are defined in an application's `Vagrantfile` and are invoked using the Pushes are defined in an application's `Vagrantfile` and are invoked using the
`vagrant push` subcommand. Much like other components of Vagrant, each Vagrant `vagrant push` subcommand. Much like other components of Vagrant, each Vagrant
@ -57,5 +56,4 @@ $ vagrant push staging
Vagrant Push is the easiest way to deploy your application. You can read more Vagrant Push is the easiest way to deploy your application. You can read more
in the documentation links on the sidebar. in the documentation links on the sidebar.
[Atlas]: https://atlas.hashicorp.com/ "HashiCorp's Atlas Service"
[Vagrant Providers]: /docs/providers/ "Vagrant Providers" [Vagrant Providers]: /docs/providers/ "Vagrant Providers"

View File

@ -16,15 +16,12 @@ Any TCP traffic sent to this IP is sent to the shared Vagrant environment.
## Usage ## Usage
Just call `vagrant share`. This will automatically share as many ports as Just call `vagrant share --full`. This will automatically share as many ports as
possible for remote connections. If the Vagrant environment has a static IP or possible for remote connections. Please see
DNS address, then almost every port will be available (although some must be
explicitly enabled for security reasons). Otherwise, Vagrant will only
expose forwarded ports on the machine. Please see
[the Vagrant share security page](/docs/share/security.html) for more [the Vagrant share security page](/docs/share/security.html) for more
information. information.
Note the share name at the end of calling `vagrant share`, and give this to Note the share name at the end of calling `vagrant share --full`, and give this to
the person who wants to connect to your machine. They simply have to call the person who wants to connect to your machine. They simply have to call
`vagrant connect NAME`. This will give them a static IP they can use to access `vagrant connect NAME`. This will give them a static IP they can use to access
your Vagrant environment. your Vagrant environment.

View File

@ -28,15 +28,11 @@ To use HTTP sharing, simply run `vagrant share`:
``` ```
$ vagrant share $ vagrant share
==> default: Detecting network information for machine... ==> default: Detecting network information for machine...
default: Local machine address: 192.168.163.152 default: Local machine address: 192.168.84.130
default: Local HTTP port: 4567 default: Local HTTP port: 9999
default: Local HTTPS port: disabled default: Local HTTPS port: disabled
==> default: Checking authentication and authorization...
==> default: Creating Vagrant Share session... ==> default: Creating Vagrant Share session...
default: Share will be at: ghastly-wombat-4051 ==> default: HTTP URL: http://b1fb1f3f.ngrok.io
==> default: Your Vagrant Share is running!
default: Name: ghastly-wombat-4051
==> default: URL: http://ghastly-wombat-4051.vagrantshare.com
``` ```
Vagrant detects where your HTTP server is running in your Vagrant environment Vagrant detects where your HTTP server is running in your Vagrant environment
@ -83,12 +79,10 @@ should do this anyways!
## HTTPS (SSL) ## HTTPS (SSL)
Vagrant Share can also expose an SSL port that can be accessed over Vagrant Share can also expose an SSL port that can be accessed over
SSL. For example, instead of accessing `http://foo.vagrantshare.com`, it SSL. Creating an HTTPS share requires a non-free ngrok account.
could be accessed at `https://foo.vagrantshare.com`.
`vagrant share` by default looks for any SSL traffic on port 443 in your `vagrant share` by default looks for any SSL traffic on port 443 in your
development environment. If it cannot find any, then SSL is disabled by development environment. If it cannot find any, then SSL is disabled by
default. default.
You can force SSL by setting the `--https` flag to point to the accessible The HTTPS share can be explicitly disabled using the `--disable-https` flag.
SSL port.

View File

@ -38,5 +38,4 @@ The details of each are covered in their specific section in the sidebar
to the left. We also have a section where we go into detail about the to the left. We also have a section where we go into detail about the
security implications of this feature. security implications of this feature.
Vagrant Share requires an account with Vagrant Share requires [ngrok](https://ngrok.com) to be used.
[HashiCorp's Atlas](/docs/other/atlas.html) to be used.

View File

@ -1,66 +0,0 @@
---
layout: "docs"
page_title: "ngrok - Vagrant Share"
sidebar_current: "share-ngrok"
description: |-
Vagrant share can be driven using ngrok for the underlying transport
by supplying the "--driver ngrok" flag to "vagrant share".
---
# Sharing via ngrok
[ngrok](https://ngrok.com) is a hosted reverse proxy service. It allows you to
create a secure tunnel from a public endpoint to a locally running web service.
Vagrant share can be driven using ngrok from the underlying transport
by supplying the `--driver ngrok` flag to `vagrant share`.
The ngrok driver is not enabled by default. When starting the Vagrant
share, ngrok must be specified as the driver. Users connecting to
the share must also specify the ngrok driver to make a proper connection.
## Sharing
Starting a Vagrant share using the ngrok driver is very similar to the
default Vagrant share command. The only addition it requires is the
`--driver ngrok` flag:
```
$ vagrant share --driver ngrok
```
By default this will create a public HTTP endpoint
connected to the shared VM via an ngrok process. When only HTTP is being
shared, no connection is required from the remote side. All that is required
is the public ngrok URL.
### SSH
To share an ssh connection to the shared VM the `--ssh` flag must be provided.
Vagrant share will then create a small utility VM to enable the share with
remote users. Once the setup is complete, a name will be assigned to the
utility VM that remote users can reach using the `vagrant connect` command.
### Full Share
To enable full remote access to the shared VM the `--full` flag must be provided.
This will enable remote users connecting to the local share full access to all
forwarded ports defined by the shared VM Vagrantfile.
## Connecting
Much like the `vagrant share` command, when connecting to a Vagrant share
that was created using the ngrok driver, the `--driver ngrok` flag must
be provided:
```
$ vagrant connect --driver ngrok share_name
```
## ngrok configuration
The current user's ngrok configuration file is used by default when
tunnels are created for Vagrant share. While specific customization
to the ngrok configuration is not yet supported, the feature is being
actively worked on and will be available in the future.

View File

@ -20,20 +20,11 @@ help control access and manage security:
* `--disable-http` will not create a publicly accessible HTTP URL. When * `--disable-http` will not create a publicly accessible HTTP URL. When
this is set, the only way to access the share is with `vagrant connect`. this is set, the only way to access the share is with `vagrant connect`.
* `--ssh-once` will allow only one person to SSH into your shared environment.
After the first SSH access, the keypair is physically deleted and SSH
access will not be possible anymore.
In addition to these options, there are other features we've built to help: In addition to these options, there are other features we've built to help:
* Vagrant share uses end-to-end TLS connections. So even unencrypted TCP streams * Vagrant share uses end-to-end TLS for non-HTTP connections. So even unencrypted
are encrypted through the various proxies and only unencrypted during the final TCP streams are encrypted through the various proxies and only unencrypted during
local communication between the local proxy and the Vagrant environment. the final local communication between the local proxy and the Vagrant environment.
* Share names, such as happy-panda-1234, are randomly chosen from a pool
of over 40,000,000 possible names. And we're routinely adding more
words to grow this pool. It is unlikely that anyone will guess your
share name.
* SSH keys are encrypted by default, using a password that is not transmitted * SSH keys are encrypted by default, using a password that is not transmitted
to our servers or across the network at all. to our servers or across the network at all.
@ -41,20 +32,6 @@ In addition to these options, there are other features we've built to help:
* SSH is not shared by default, it must explicitly be shared with the * SSH is not shared by default, it must explicitly be shared with the
`--ssh` flag. `--ssh` flag.
* A web interface we've built shows share history and will show basic
access logs in the future.
* Share sessions expire after a short time (currently 1 hour), but
can also be expired manually by `ctrl-c` from the sharing machine
or via the web interface.
Most importantly, you must understand that by running `vagrant share`, Most importantly, you must understand that by running `vagrant share`,
you are making your Vagrant environment accessible by anyone who knows you are making your Vagrant environment accessible by anyone who knows
the share name. When share is not running, it is not accessible. the share name. When share is not running, it is not accessible.
Later, we will be expanding the security of this feature by adding ACLs,
so you are able to explicitly allow
access to your share based on who is connecting.
For maximum security, we will also allow you to run your own Vagrant
Share server. This option is not available yet.

View File

@ -25,31 +25,54 @@ Just run `vagrant share --ssh`!
When SSH sharing is enabled, Vagrant generates a brand new keypair for When SSH sharing is enabled, Vagrant generates a brand new keypair for
SSH access. The public key portion is automatically inserted SSH access. The public key portion is automatically inserted
into the Vagrant machine, and the private key portion is uploaded to the into the Vagrant machine, and the private key portion is provided to the
server managing the Vagrant shares. This private key is encrypted using user connecting to the Vagrant share. This private key is encrypted using
a password that you will be prompted for. This password is _never_ transmitted a password that you will be prompted for. This password is _never_ transmitted
across the network by Vagrant, and is an extra layer of security preventing across the network by Vagrant, and is an extra layer of security preventing
us or anyone who may know your share name from easily accessing your machine. anyone who may know your share name from easily accessing your machine.
After running `vagrant share --ssh`, it will output the name of your share: After running `vagrant share --ssh`, it will output the name of your share:
``` ```
$ vagrant share --ssh $ vagrant share --ssh
==> default: Detecting network information for machine... ==> default: Detecting network information for machine...
default: Local machine address: 192.168.163.152 default: Local machine address: 192.168.84.130
default: Local HTTP port: 4567
default: Local HTTPS port: disabled
default: SSH Port: 22
==> default: Generating new SSH key... ==> default: Generating new SSH key...
default: Please enter a password to encrypt the key: default: Please enter a password to encrypt the key:
default: Repeat the password to confirm: default: Repeat the password to confirm:
default: Inserting generated SSH key into machine... default: Inserting generated SSH key into machine...
==> default: Checking authentication and authorization... default: Local HTTP port: disabled
default: Local HTTPS port: disabled
default: SSH Port: 2200
==> default: Creating Vagrant Share session... ==> default: Creating Vagrant Share session...
default: Share will be at: itty-bitty-polar-8667 share: Cloning VMware VM: 'hashicorp/vagrant-share'. This can take some time...
==> default: Your Vagrant Share is running! share: Verifying vmnet devices are healthy...
default: Name: itty-bitty-polar-8667 share: Preparing network adapters...
... share: Starting the VMware VM...
share: Waiting for machine to boot. This may take a few minutes...
share: SSH address: 192.168.84.134:22
share: SSH username: tc
share: SSH auth method: password
share:
share: Inserting generated public key within guest...
share: Removing insecure key from the guest if it's present...
share: Key inserted! Disconnecting and reconnecting using new SSH key...
share: Machine booted and ready!
share: Forwarding ports...
share: -- 31338 => 65534
share: -- 22 => 2202
share: SSH address: 192.168.84.134:22
share: SSH username: tc
share: SSH auth method: password
share: Configuring network adapters within the VM...
==> share:
==> share: Your Vagrant Share is running! Name: bazaar_wolf:sultan_oasis
==> share:
==> share: You're sharing with SSH access. This means that another can SSH to
==> share: your Vagrant machine by running:
==> share:
==> share: vagrant connect --ssh bazaar_wolf:sultan_oasis
==> share:
``` ```
Anyone can then SSH directly to your Vagrant environment by running Anyone can then SSH directly to your Vagrant environment by running
@ -57,8 +80,8 @@ Anyone can then SSH directly to your Vagrant environment by running
previously. previously.
``` ```
$ vagrant connect --ssh itty-bitty-polar-8667 $ vagrant connect --ssh bazaar_wolf:sultan_oasis
Loading share 'itty-bitty-polar-8667'... Loading share 'bazaar_wolf:sultan_oasis'...
The SSH key to connect to this share is encrypted. You will The SSH key to connect to this share is encrypted. You will
require the password entered when creating the share to require the password entered when creating the share to
decrypt it. Verify you have access to this password before decrypt it. Verify you have access to this password before
@ -76,8 +99,3 @@ vagrant@vagrant:~$
If the private key is encrypted (the default behavior), then the connecting If the private key is encrypted (the default behavior), then the connecting
person will be prompted for the password to decrypt the private key. person will be prompted for the password to decrypt the private key.
Additional flags are available such as `--ssh-once` to add another layer
of security to your SSH shared session. With this flag active, only one
`vagrant connect --ssh` can be attempted before the keypair is destroyed,
preventing any future connections.

View File

@ -24,7 +24,7 @@ for the machine to boot and be accessible. By default this is 300 seconds.
`config.vm.box` - This configures what [box](/docs/boxes.html) the `config.vm.box` - This configures what [box](/docs/boxes.html) the
machine will be brought up against. The value here should be the name machine will be brought up against. The value here should be the name
of an installed box or a shorthand name of a box in of an installed box or a shorthand name of a box in
[HashiCorp's Atlas](/docs/other/atlas.html). [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud).
This option requires Vagrant 1.5 or higher. You can download the latest version This option requires Vagrant 1.5 or higher. You can download the latest version
of Vagrant from the [Vagrant installers page](/downloads.html). of Vagrant from the [Vagrant installers page](/downloads.html).
@ -35,7 +35,7 @@ of Vagrant from the [Vagrant installers page](/downloads.html).
the configured box on every `vagrant up`. If an update is found, Vagrant the configured box on every `vagrant up`. If an update is found, Vagrant
will tell the user. By default this is true. Updates will only be checked will tell the user. By default this is true. Updates will only be checked
for boxes that properly support updates (boxes from for boxes that properly support updates (boxes from
[HashiCorp's Atlas](/docs/other/atlas.html) [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud)
or some other versioned box). or some other versioned box).
<hr> <hr>
@ -88,7 +88,7 @@ all subsequent redirects. By default, redirect locations are untrusted so creden
<hr> <hr>
`config.vm.box_url` - The URL that the configured box can be found at. `config.vm.box_url` - The URL that the configured box can be found at.
If `config.vm.box` is a shorthand to a box in [HashiCorp's Atlas](/docs/other/atlas.html) If `config.vm.box` is a shorthand to a box in [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud)
then this value does not need to be specified. Otherwise, it should then this value does not need to be specified. Otherwise, it should
point to the proper place where the box can be found if it is not point to the proper place where the box can be found if it is not
installed. installed.

View File

@ -14,7 +14,7 @@ description: |-
<a class="button primary" href="/intro/index.html">Get Started</a> <a class="button primary" href="/intro/index.html">Get Started</a>
<a class="button" href="/downloads.html">Download <%= latest_version %></a> <a class="button" href="/downloads.html">Download <%= latest_version %></a>
<a class="button" href="https://atlas.hashicorp.com/boxes/search" target="_TOP">Find Boxes</a> <a class="button" href="https://vagrantcloud.com/boxes/search" target="_TOP">Find Boxes</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -34,8 +34,8 @@ $ vagrant box add hashicorp/precise64
``` ```
This will download the box named "hashicorp/precise64" from This will download the box named "hashicorp/precise64" from
[HashiCorp's Atlas box catalog](https://atlas.hashicorp.com/boxes/search), a place where you can find [HashiCorp's Vagrant Cloud box catalog](https://vagrantcloud.com/boxes/search), a place where you can find
and host boxes. While it is easiest to download boxes from HashiCorp's Atlas and host boxes. While it is easiest to download boxes from HashiCorp's Vagrant Cloud
you can also add boxes from a local file, custom URL, etc. you can also add boxes from a local file, custom URL, etc.
Boxes are globally stored for the current user. Each project uses a box Boxes are globally stored for the current user. Each project uses a box
@ -52,7 +52,7 @@ will not be covered in the getting started guide.
~> **Namespaces do not guarantee canonical boxes!** A common misconception is ~> **Namespaces do not guarantee canonical boxes!** A common misconception is
that a namespace like "ubuntu" represents the canonical space for Ubuntu boxes. that a namespace like "ubuntu" represents the canonical space for Ubuntu boxes.
This is untrue. Namespaces on Atlas behave very similarly to namespaces on This is untrue. Namespaces on Vagrant Cloud behave very similarly to namespaces on
GitHub, for example. Just as GitHub's support team is unable to assist with GitHub, for example. Just as GitHub's support team is unable to assist with
issues in someone's repository, HashiCorp's support team is unable to assist issues in someone's repository, HashiCorp's support team is unable to assist
with third-party published boxes. with third-party published boxes.
@ -103,12 +103,12 @@ For the remainder of this getting started guide, we will only use the
this getting started guide, the first question you will probably have is this getting started guide, the first question you will probably have is
"where do I find more boxes?" "where do I find more boxes?"
The best place to find more boxes is [HashiCorp's Atlas box catalog](https://atlas.hashicorp.com/boxes/search). The best place to find more boxes is [HashiCorp's Vagrant Cloud box catalog](https://vagrantcloud.com/boxes/search).
HashiCorp's Atlas has a public directory of freely available boxes that HashiCorp's Vagrant Cloud has a public directory of freely available boxes that
run various platforms and technologies. HashiCorp's Atlas also has a great search run various platforms and technologies. HashiCorp's Vagrant Cloud also has a great search
feature to allow you to find the box you care about. feature to allow you to find the box you care about.
In addition to finding free boxes, HashiCorp's Atlas lets you host your own In addition to finding free boxes, HashiCorp's Vagrant Cloud lets you host your own
boxes, as well as private boxes if you intend on creating boxes for your boxes, as well as private boxes if you intend on creating boxes for your
own organization. own organization.

View File

@ -200,7 +200,6 @@
<li<%= sidebar_current("push") %>> <li<%= sidebar_current("push") %>>
<a href="/docs/push/">Push</a> <a href="/docs/push/">Push</a>
<ul class="nav"> <ul class="nav">
<li<%= sidebar_current("push-atlas") %>><a href="/docs/push/atlas.html">Atlas</a></li>
<li<%= sidebar_current("push-ftp") %>><a href="/docs/push/ftp.html">FTP / SFTP</a></li> <li<%= sidebar_current("push-ftp") %>><a href="/docs/push/ftp.html">FTP / SFTP</a></li>
<li<%= sidebar_current("push-heroku") %>><a href="/docs/push/heroku.html">Heroku</a></li> <li<%= sidebar_current("push-heroku") %>><a href="/docs/push/heroku.html">Heroku</a></li>
<li<%= sidebar_current("push-local-exec") %>><a href="/docs/push/local-exec.html">Local Exec</a></li> <li<%= sidebar_current("push-local-exec") %>><a href="/docs/push/local-exec.html">Local Exec</a></li>