Merge pull request #11583 from hashicorp/je.new-website
New Docs Website
This commit is contained in:
commit
821b120873
@ -1,33 +1,33 @@
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
build-website:
|
||||
# setting the working_directory along with the checkout path allows us to not have
|
||||
# to cd into the website/ directory for commands
|
||||
working_directory: ~/project/website
|
||||
build-website-docker-image:
|
||||
docker:
|
||||
- image: hashicorp/middleman-hashicorp:0.3.35
|
||||
- image: circleci/buildpack-deps
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/project
|
||||
- restore_cache:
|
||||
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
command: bundle check || bundle install --path vendor/bundle
|
||||
- save_cache:
|
||||
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
||||
paths:
|
||||
- ~/project/website/vendor/bundle
|
||||
- run:
|
||||
command: bundle exec middleman build
|
||||
- run:
|
||||
command: ./scripts/deploy.sh
|
||||
name: Build Docker Image if Necessary
|
||||
command: |
|
||||
IMAGE_TAG=$(cat website/Dockerfile website/package-lock.json | sha256sum | awk '{print $1;}')
|
||||
echo "Using $IMAGE_TAG"
|
||||
if curl https://hub.docker.com/v2/repositories/hashicorp/vagrant-website/tags/$IMAGE_TAG -fsL > /dev/null; then
|
||||
echo "Dependencies have not changed, not building a new website docker image."
|
||||
else
|
||||
cd website/
|
||||
docker build -t hashicorp/vagrant-website:$IMAGE_TAG .
|
||||
docker tag hashicorp/vagrant-website:$IMAGE_TAG hashicorp/vagrant-website:latest
|
||||
docker login -u $WEBSITE_DOCKER_USER -p $WEBSITE_DOCKER_PASS
|
||||
docker push hashicorp/vagrant-website
|
||||
fi
|
||||
workflows:
|
||||
version: 2
|
||||
website:
|
||||
build_website_docker_image:
|
||||
jobs:
|
||||
- build-website:
|
||||
context: static-sites
|
||||
- build-website-docker-image:
|
||||
filters:
|
||||
branches:
|
||||
only: stable-website
|
||||
only:
|
||||
- master
|
||||
|
||||
10
README.md
10
README.md
@ -1,8 +1,8 @@
|
||||
# Vagrant
|
||||
|
||||
* Website: [https://www.vagrantup.com/](https://www.vagrantup.com/)
|
||||
* Source: [https://github.com/hashicorp/vagrant](https://github.com/hashicorp/vagrant)
|
||||
* HashiCorp Discuss: [https://discuss.hashicorp.com/c/vagrant/24](https://discuss.hashicorp.com/c/vagrant/24)
|
||||
- Website: [https://www.vagrantup.com/](https://www.vagrantup.com/)
|
||||
- Source: [https://github.com/hashicorp/vagrant](https://github.com/hashicorp/vagrant)
|
||||
- HashiCorp Discuss: [https://discuss.hashicorp.com/c/vagrant/24](https://discuss.hashicorp.com/c/vagrant/24)
|
||||
|
||||
Vagrant is a tool for building and distributing development environments.
|
||||
|
||||
@ -41,12 +41,12 @@ the box doesn't already exist on your system.
|
||||
## Getting Started Guide
|
||||
|
||||
To learn how to build a fully functional development environment, follow the
|
||||
[getting started guide](https://www.vagrantup.com/docs/getting-started/index.html).
|
||||
[getting started guide](https://www.vagrantup.com/docs/getting-started).
|
||||
|
||||
## Installing from Source
|
||||
|
||||
If you want the bleeding edge version of Vagrant, we try to keep master pretty stable
|
||||
and you're welcome to give it a shot. Please review the installation page [here](https://www.vagrantup.com/docs/installation/source.html).
|
||||
and you're welcome to give it a shot. Please review the installation page [here](https://www.vagrantup.com/docs/installation/source).
|
||||
|
||||
## Contributing to Vagrant
|
||||
|
||||
|
||||
18
website/.editorconfig
Normal file
18
website/.editorconfig
Normal file
@ -0,0 +1,18 @@
|
||||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
[{*.md,*.json}]
|
||||
max_line_length = null
|
||||
4
website/.eslintrc.js
Normal file
4
website/.eslintrc.js
Normal file
@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
...require('@hashicorp/nextjs-scripts/.eslintrc.js'),
|
||||
ignorePatterns: ['public/'],
|
||||
}
|
||||
5
website/.gitignore
vendored
Normal file
5
website/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
.next
|
||||
out
|
||||
.mdx-data
|
||||
4
website/.stylelintrc.js
Normal file
4
website/.stylelintrc.js
Normal file
@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
...require('@hashicorp/nextjs-scripts/.stylelintrc.js'),
|
||||
/* Specify overrides here */
|
||||
}
|
||||
7
website/Dockerfile
Normal file
7
website/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM node:10.16.3-alpine
|
||||
RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev
|
||||
|
||||
COPY ./package.json /website/package.json
|
||||
COPY ./package-lock.json /website/package-lock.json
|
||||
WORKDIR /website
|
||||
RUN npm install
|
||||
@ -1,3 +0,0 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "middleman-hashicorp", "0.3.44"
|
||||
@ -1,161 +0,0 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
autoprefixer-rails (9.7.4)
|
||||
execjs
|
||||
bootstrap-sass (3.4.1)
|
||||
autoprefixer-rails (>= 5.2.1)
|
||||
sassc (>= 2.0.0)
|
||||
builder (3.2.4)
|
||||
capybara (2.4.4)
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
chunky_png (1.3.11)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
compass (1.0.3)
|
||||
chunky_png (~> 1.2)
|
||||
compass-core (~> 1.0.2)
|
||||
compass-import-once (~> 1.0.5)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
sass (>= 3.3.13, < 3.5)
|
||||
compass-core (1.0.3)
|
||||
multi_json (~> 1.0)
|
||||
sass (>= 3.3.0, < 3.5)
|
||||
compass-import-once (1.0.5)
|
||||
sass (>= 3.2, < 3.5)
|
||||
em-websocket (0.5.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.7.0)
|
||||
ffi (1.12.2)
|
||||
haml (5.1.2)
|
||||
temple (>= 0.8.0)
|
||||
tilt
|
||||
hike (1.2.3)
|
||||
hooks (0.4.1)
|
||||
uber (~> 0.0.14)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.7.0)
|
||||
json (2.3.0)
|
||||
kramdown (1.17.0)
|
||||
listen (3.0.8)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
middleman (3.4.1)
|
||||
coffee-script (~> 2.2)
|
||||
compass (>= 1.0.0, < 2.0.0)
|
||||
compass-import-once (= 1.0.5)
|
||||
execjs (~> 2.0)
|
||||
haml (>= 4.0.5)
|
||||
kramdown (~> 1.2)
|
||||
middleman-core (= 3.4.1)
|
||||
middleman-sprockets (>= 3.1.2)
|
||||
sass (>= 3.4.0, < 4.0)
|
||||
uglifier (~> 2.5)
|
||||
middleman-core (3.4.1)
|
||||
activesupport (~> 4.1)
|
||||
bundler (~> 1.1)
|
||||
capybara (~> 2.4.4)
|
||||
erubis
|
||||
hooks (~> 0.3)
|
||||
i18n (~> 0.7.0)
|
||||
listen (~> 3.0.3)
|
||||
padrino-helpers (~> 0.12.3)
|
||||
rack (>= 1.4.5, < 2.0)
|
||||
thor (>= 0.15.2, < 2.0)
|
||||
tilt (~> 1.4.1, < 2.0)
|
||||
middleman-hashicorp (0.3.44)
|
||||
bootstrap-sass (~> 3.3)
|
||||
builder (~> 3.2)
|
||||
middleman (~> 3.4)
|
||||
middleman-livereload (~> 3.4)
|
||||
middleman-syntax (~> 3.0)
|
||||
redcarpet (~> 3.3)
|
||||
turbolinks (~> 5.0)
|
||||
middleman-livereload (3.4.6)
|
||||
em-websocket (~> 0.5.1)
|
||||
middleman-core (>= 3.3)
|
||||
rack-livereload (~> 0.3.15)
|
||||
middleman-sprockets (3.5.0)
|
||||
middleman-core (>= 3.3)
|
||||
sprockets (~> 2.12.1)
|
||||
sprockets-helpers (~> 1.1.0)
|
||||
sprockets-sass (~> 1.3.0)
|
||||
middleman-syntax (3.2.0)
|
||||
middleman-core (>= 3.2)
|
||||
rouge (~> 3.2)
|
||||
mime-types (3.3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2019.1009)
|
||||
mini_portile2 (2.4.0)
|
||||
minitest (5.14.0)
|
||||
multi_json (1.14.1)
|
||||
nokogiri (1.10.9)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
padrino-helpers (0.12.9)
|
||||
i18n (~> 0.6, >= 0.6.7)
|
||||
padrino-support (= 0.12.9)
|
||||
tilt (>= 1.4.1, < 3)
|
||||
padrino-support (0.12.9)
|
||||
activesupport (>= 3.1)
|
||||
rack (1.6.13)
|
||||
rack-livereload (0.3.17)
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.0)
|
||||
rouge (3.16.0)
|
||||
sass (3.4.25)
|
||||
sassc (2.2.1)
|
||||
ffi (~> 1.9)
|
||||
sprockets (2.12.5)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-helpers (1.1.0)
|
||||
sprockets (~> 2.0)
|
||||
sprockets-sass (1.3.1)
|
||||
sprockets (~> 2.0)
|
||||
tilt (~> 1.1)
|
||||
temple (0.8.2)
|
||||
thor (1.0.1)
|
||||
thread_safe (0.3.6)
|
||||
tilt (1.4.1)
|
||||
turbolinks (5.2.1)
|
||||
turbolinks-source (~> 5.2)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (1.2.6)
|
||||
thread_safe (~> 0.1)
|
||||
uber (0.0.15)
|
||||
uglifier (2.7.2)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
xpath (2.1.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
middleman-hashicorp (= 0.3.44)
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.3
|
||||
@ -1,25 +1,54 @@
|
||||
VERSION?="0.3.44"
|
||||
|
||||
build:
|
||||
@echo "==> Starting build in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--volume "$(shell pwd):/website" \
|
||||
-e "ENV=production" \
|
||||
hashicorp/middleman-hashicorp:${VERSION} \
|
||||
bundle exec middleman build --verbose --clean
|
||||
|
||||
# Default: run this if working on the website locally to run in watch mode.
|
||||
website:
|
||||
@echo "==> Downloading latest Docker image..."
|
||||
@docker pull hashicorp/vagrant-website
|
||||
@echo "==> Starting website in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--publish "4567:4567" \
|
||||
--publish "35729:35729" \
|
||||
--workdir "/website" \
|
||||
--volume "$(shell pwd):/website" \
|
||||
hashicorp/middleman-hashicorp:${VERSION}
|
||||
--volume "/website/node_modules" \
|
||||
--publish "3000:3000" \
|
||||
hashicorp/vagrant-website \
|
||||
npm start
|
||||
|
||||
.PHONY: build website
|
||||
# This command will generate a static version of the website to the "out" folder.
|
||||
build:
|
||||
@echo "==> Downloading latest Docker image..."
|
||||
@docker pull hashicorp/vagrant-website
|
||||
@echo "==> Starting build in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--workdir "/website" \
|
||||
--volume "$(shell pwd):/website" \
|
||||
--volume "/website/node_modules" \
|
||||
hashicorp/vagrant-website \
|
||||
npm run static
|
||||
|
||||
# If you are changing node dependencies locally, run this to generate a new
|
||||
# local Docker image with the dependency changes included.
|
||||
build-image:
|
||||
@echo "==> Building Docker image..."
|
||||
@docker build -t hashicorp-vagrant-website-local .
|
||||
|
||||
# Use this if you have run `build-image` to use the locally built image
|
||||
# rather than our CI-generated image to test dependency changes.
|
||||
website-local:
|
||||
@echo "==> Starting website in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--workdir "/website" \
|
||||
--volume "$(shell pwd):/website" \
|
||||
--volume "/website/node_modules" \
|
||||
--publish "3000:3000" \
|
||||
hashicorp-vagrant-website-local \
|
||||
npm start
|
||||
|
||||
.DEFAULT_GOAL := website
|
||||
.PHONY: build build-image website website-local
|
||||
|
||||
@ -1,23 +1,195 @@
|
||||
# Vagrant Website
|
||||
|
||||
This subdirectory contains the entire source for the [Vagrant Website][vagrant].
|
||||
This is a [Middleman][middleman] project, which builds a static site from these
|
||||
source files.
|
||||
[](https://app.netlify.com/sites/vagrant-docs/deploys)
|
||||
|
||||
This subdirectory contains the entire source for the [Vagrant Website](https://vagrant.io/). This is a [NextJS](https://nextjs.org/) project, which builds a static site from these source files.
|
||||
|
||||
## Contributions Welcome!
|
||||
|
||||
If you find a typo or you feel like you can improve the HTML, CSS, or
|
||||
JavaScript, we welcome contributions. Feel free to open issues or pull requests
|
||||
like any normal GitHub project, and we'll merge it in.
|
||||
|
||||
See also the [Vagrant Contributing Guide](https://github.com/hashicorp/vagrant/blob/master/.github/CONTRIBUTING.md) for more details.
|
||||
If you find a typo or you feel like you can improve the HTML, CSS, or JavaScript, we welcome contributions. Feel free to open issues or pull requests like any normal GitHub project, and we'll merge it in 🚀
|
||||
|
||||
## Running the Site Locally
|
||||
|
||||
Running the site locally is simple. Clone this repo and run `make website`.
|
||||
The website can be run locally through node.js or Docker. If you choose to run through Docker, everything will be a little bit slower due to the additional overhead, so for frequent contributors it may be worth it to use node.
|
||||
|
||||
Then open up `http://localhost:4567`. Note that some URLs you may need to append
|
||||
".html" to make them work (in the navigation).
|
||||
> **Note:** If you are using a text editor that uses a "safe write" save style such as **vim** or **goland**, this can cause issues with the live reload in development. If you turn off safe write, this should solve the problem. In vim, this can be done by running `:set backupcopy=yes`. In goland, search the settings for "safe write" and turn that setting off.
|
||||
|
||||
[middleman]: https://www.middlemanapp.com
|
||||
[vagrant]: https://www.vagrantup.com
|
||||
### With Docker
|
||||
|
||||
Running the site locally is simple. Provided you have Docker installed, clone this repo, run `make`, and then visit `http://localhost:3000`.
|
||||
|
||||
The docker image is pre-built with all the website dependencies installed, which is what makes it so quick and simple, but also means if you need to change dependencies and test the changes within Docker, you'll need a new image. If this is something you need to do, you can run `make build-image` to generate a local Docker image with updated dependencies, then `make website-local` to use that image and preview.
|
||||
|
||||
### With Node
|
||||
|
||||
If your local development environment has a supported version (v10.0.0+) of [node installed](https://nodejs.org/en/) you can run:
|
||||
|
||||
- `npm install`
|
||||
- `npm start`
|
||||
|
||||
and then visit `http://localhost:3000`.
|
||||
|
||||
If you pull down new code from github, you should run `npm install` again. Otherwise, there's no need to re-run `npm install` each time the site is run, you can just run `npm start` to get it going.
|
||||
|
||||
## Editing Content
|
||||
|
||||
Documentation content is written in [Markdown](https://www.markdownguide.org/cheat-sheet/) and you'll find all files listed under the `/pages` directory.
|
||||
|
||||
To create a new page with Markdown, create a file ending in `.mdx` in the `pages/` directory. The path in the pages directory will be the URL route. For example, `pages/hello/world.mdx` will be served from the `/hello/world` URL.
|
||||
|
||||
This file can be standard Markdown and also supports [YAML frontmatter](https://middlemanapp.com/basics/frontmatter/). YAML frontmatter is optional, there are defaults for all keys.
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: 'My Title'
|
||||
description: "A thorough, yet succinct description of the page's contents"
|
||||
---
|
||||
|
||||
```
|
||||
|
||||
The significant keys in the YAML frontmatter are:
|
||||
|
||||
- `title` `(string)` - This is the title of the page that will be set in the HTML title.
|
||||
- `description` `(string)` - This is a description of the page that will be set in the HTML description.
|
||||
|
||||
> ⚠️Since `api` is a reserved directory within NextJS, all `/api/**` pages are listed under the `/pages/api-docs` path.
|
||||
|
||||
### Editing Sidebars
|
||||
|
||||
The structure of the sidebars are controlled by files in the [`/data` directory](data).
|
||||
|
||||
- Edit [this file](data/docs-navigation.js) to change the **docs** sidebar
|
||||
- Edit [this file](data/api-navigation.js) to change the **api** sidebar
|
||||
- Edit [this file](data/guides-navigation.js) to change the **guides** sidebar
|
||||
- Edit [this file](data/intro-navigation.js) to change the **intro** sidebar
|
||||
|
||||
To nest sidebar items, you'll want to add a new `category` key/value accompanied by the appropriate embedded `content` values.
|
||||
|
||||
- `category` values will be **directory names** within the `pages` directory
|
||||
- `content` values will be **file names** within their appropriately nested directory.
|
||||
|
||||
### Creating New Pages
|
||||
|
||||
There is currently a small bug with new page creation - if you create a new page and link it up via subnav data while the server is running, it will report an error saying the page was not found. This can be resolved by restarting the server.
|
||||
|
||||
### Changing the Release Version
|
||||
|
||||
To change the version of vagrant displayed for download on the website, head over to `data/version.js` and change the number there. It's important to note that the version number must match a version that has been released and is live on `releases.hashicorp.com` -- if it does not, the website will be unable to fetch links to the binaries and will not compile. So this version number should be changed _only after a release_.
|
||||
|
||||
#### Displaying a Prerelease
|
||||
|
||||
If there is a prerelease of any type that should be displayed on the downloads page, this can be done by editing `pages/downloads/index.jsx`. By default, the download component might look something like this:
|
||||
|
||||
```jsx
|
||||
<ProductDownloader
|
||||
product="Vagrant"
|
||||
version={VERSION}
|
||||
downloads={downloadData}
|
||||
community="/resources"
|
||||
/>
|
||||
```
|
||||
|
||||
To add a prerelease, an extra `prerelease` property can be added to the component as such:
|
||||
|
||||
```jsx
|
||||
<ProductDownloader
|
||||
product="Vagrant"
|
||||
version={VERSION}
|
||||
downloads={downloadData}
|
||||
community="/resources"
|
||||
prerelease={{
|
||||
type: 'release candidate', // the type of prerelease: beta, release candidate, etc.
|
||||
name: 'v1.0.0', // the name displayed in text on the website
|
||||
version: '1.0.0-rc1', // the actual version tag that was pushed to releases.hashicorp.com
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
This configuration would display something like the following text on the website, emphasis added to the configurable parameters:
|
||||
|
||||
```
|
||||
A {{ release candidate }} for Vagrant {{ v1.0.0 }} is available! The release can be <a href='https://releases.hashicorp.com/vagrant/{{ 1.0.0-rc1 }}'>downloaded here</a>.
|
||||
```
|
||||
|
||||
You may customize the parameters in any way you'd like. To remove a prerelease from the website, simply delete the `prerelease` paremeter from the above component.
|
||||
|
||||
### Markdown Enhancements
|
||||
|
||||
There are several custom markdown plugins that are available by default that enhance standard markdown to fit our use cases. This set of plugins introduces a couple instances of custom syntax, and a couple specific pitfalls that are not present by default with markdown, detailed below:
|
||||
|
||||
- If you see the symbols `~>`, `->`, `=>`, or `!>`, these represent [custom alerts](https://github.com/hashicorp/remark-plugins/tree/master/plugins/paragraph-custom-alerts#paragraph-custom-alerts). These render as colored boxes to draw the user's attention to some type of aside.
|
||||
- If you see `@include '/some/path.mdx'`, this is a [markdown include](https://github.com/hashicorp/remark-plugins/tree/master/plugins/include-markdown#include-markdown-plugin). It's worth noting as well that all includes resolve from `website/pages/partials` by default.
|
||||
- If you see `# Headline ((#slug))`, this is an example of an [anchor link alias](https://github.com/hashicorp/remark-plugins/tree/je.anchor-link-adjustments/plugins/anchor-links#anchor-link-aliases). It adds an extra permalink to a headline for compatibility and is removed from the output.
|
||||
- Due to [automatically generated permalinks](https://github.com/hashicorp/remark-plugins/tree/je.anchor-link-adjustments/plugins/anchor-links#anchor-links), any text changes to _headlines_ or _list items that begin with inline code_ can and will break existing permalinks. Be very cautious when changing either of these two text items.
|
||||
|
||||
Headlines are fairly self-explanitory, but here's an example of how list items that begin with inline code look.
|
||||
|
||||
```markdown
|
||||
- this is a normal list item
|
||||
- `this` is a list item that begins with inline code
|
||||
```
|
||||
|
||||
Its worth noting that _only the inline code at the beginning of the list item_ will cause problems if changed. So if you changed the above markup to...
|
||||
|
||||
```markdown
|
||||
- lsdhfhksdjf
|
||||
- `this` jsdhfkdsjhkdsfjh
|
||||
```
|
||||
|
||||
...while it perhaps would not be an improved user experience, no links would break because of it. The best approach is to **avoid changing headlines and inline code at the start of a list item**. If you must change one of these items, make sure to tag someone from the digital marketing development team on your pull request, they will help to ensure as much compatibility as possible.
|
||||
|
||||
### Redirects
|
||||
|
||||
This website structures URLs based on the filesystem layout. This means that if a file is moved, removed, or a folder is re-organized, links will break. If a path change is necessary, it can be mitigated using redirects.
|
||||
|
||||
To add a redirect, head over to the `_redirects` file - the format is fairly simple. On the left is the current path, and on the right is the path that should be redirected to. It's important to note that if there are links to a `.html` version of a page, that must also be explicitly redirected. For example:
|
||||
|
||||
```
|
||||
/foo /bar 301!
|
||||
/foo.html /bar 301!
|
||||
```
|
||||
|
||||
This redirect rule will send all incoming links to `/foo` and `/foo.html` to `/bar`. For more details on the redirects file format, [check out the docs on netlify](https://docs.netlify.com/routing/redirects/rewrites-proxies). Note that it is critical that `301!` is added to every one-to-one redirect - if it is left off the redirect may not work.
|
||||
|
||||
There are a couple important caveats with redirects. First, redirects are applied at the hosting layer, and therefore will not work by default in local dev mode. To test in local dev mode, you can use [`netlify dev`](https://www.netlify.com/products/dev/), or just push a commit and check using the deploy preview.
|
||||
|
||||
Second, redirects do not apply to client-side navigation. By default, all links in the navigation and docs sidebar will navigate purely on the client side, which makes navigation through the docs significantly faster, especially for those with low-end devices and/or weak internet connections. In the future, we plan to convert all internal links within docs pages to behave this way as well. This means that if there is a link on this website to a given piece of content that has changed locations in some way, we need to also _directly change existing links to the content_. This way, if a user clicks a link that navigates on the client side, or if they hit the url directly and the page renders from the server side, either one will work perfectly.
|
||||
|
||||
Let's look at an example. Say you have a page called `/docs/foo` which needs to be moved to `/docs/nested/foo`. Additionally, this is a page that has been around for a while and we know there are links into `/docs/foo.html` left over from our previous website structure. First, we move the page, then adjust the docs sidenav, in `data/docs-navigation.js`. Find the category the page is in, and move it into the appropriate subcategory. Next, we add to `_redirects` as such:
|
||||
|
||||
```
|
||||
/foo /nested/foo 301!
|
||||
/foo.html /nested/foo 301!
|
||||
```
|
||||
|
||||
Finally, we run a global search for internal links to `/foo`, and make sure to adjust them to be `/nested/foo` - this is to ensure that client-side navigation still works correctly. _Adding a redirect alone is not enough_.
|
||||
|
||||
One more example - let's say that content is being moved to an external website. A common example is guides moving to `learn.hashicorp.com`. In this case, we take all the same steps, except that we need to make a different type of change to the `docs-navigation` file. If previously the structure looked like:
|
||||
|
||||
```js
|
||||
{
|
||||
category: 'docs',
|
||||
content: [
|
||||
'foo'
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
If we no longer want the link to be in the side nav, we can simply remove it. If we do still want the link in the side nav, but pointing to an external destnation, we need to slightly change the structure as such:
|
||||
|
||||
```js
|
||||
{
|
||||
category: 'docs',
|
||||
content: [
|
||||
{ title: 'Foo Title', href: 'https://learn.hashicorp.com/vault/foo' }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
As the majority of items in the side nav are internal links, the structure makes it as easy as possible to represent these links. This alternate syntax is the most concise manner than an external link can be represented. External links can be used anywhere within the docs sidenav.
|
||||
|
||||
It's also worth noting that it is possible to do glob-based redirects, for example matching `/docs/*`, and you may see this pattern in the `_redirects` file. This type of redirect is much higher risk and the behavior is a bit more nuanced, so if you need to add a glob redirect, please reach out to the website maintainers and ask about it first.
|
||||
|
||||
### Deployment
|
||||
|
||||
This website is hosted on Netlify and configured to automatically deploy anytime you push code to the `stable-website` branch. Any time a pull request is submitted that changes files within the `website` folder, a deployment preview will appear in the github checks which can be used to validate the way docs changes will look live. Deployments from `stable-website` will look and behave the same way as deployment previews.
|
||||
|
||||
33
website/_redirects
Normal file
33
website/_redirects
Normal file
@ -0,0 +1,33 @@
|
||||
# REDIRECTS FILE
|
||||
#
|
||||
# See the README file in this directory for documentation. Please do not
|
||||
# modify or delete existing redirects without first verifying internally.
|
||||
|
||||
/support.html /
|
||||
/support /
|
||||
/sponsors.html /
|
||||
/sponsors /
|
||||
/about.html /intro
|
||||
/about /intro
|
||||
/v1/* https://docs-v1.vagrantup.com/:splat
|
||||
/blog/* https://www.hashicorp.com/blog/:splat
|
||||
/docs/getting-started /intro/getting-started
|
||||
/docs/getting-started/* /intro/getting-started/:splat
|
||||
/download-archive/* https://releases.hashicorp.com/vagrant
|
||||
|
||||
/intro/index /intro
|
||||
/docs/index /docs
|
||||
/docs/boxes.html /docs/boxes
|
||||
/docs/boxes /docs/boxes
|
||||
/docs/experimental/index.html /docs/experimental
|
||||
/docs/multi-machine/index.html /docs/multi-machine
|
||||
/docs/virtualbox/index.html /docs/providers/virtualbox
|
||||
/docs/virtualbox/* /docs/providers/virtualbox/:splat
|
||||
/docs/vmware/index.html /docs/providers/vmware
|
||||
/docs/vmware/* /docs/providers/vmware/:splat
|
||||
/docs/docker/index.html /docs/providers/docker
|
||||
/docs/docker/* /docs/providers/docker/:splat
|
||||
/docs/hyperv/index.html /docs/providers/hyperv
|
||||
/docs/hyperv/* /docs/providers/hyperv/:splat
|
||||
/docs/vagrant-cloud /vagrant-cloud
|
||||
/docs/vagrant-cloud/* /vagrant-cloud/:splat
|
||||
4
website/babel.config.js
Normal file
4
website/babel.config.js
Normal file
@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
presets: ['next/babel'],
|
||||
plugins: ['import-glob-array'],
|
||||
}
|
||||
32
website/components/footer/index.jsx
Normal file
32
website/components/footer/index.jsx
Normal file
@ -0,0 +1,32 @@
|
||||
import Link from 'next/link'
|
||||
|
||||
export default function Footer({ openConsentManager }) {
|
||||
return (
|
||||
<footer className="g-footer">
|
||||
<div className="g-container">
|
||||
<div className="left">
|
||||
<Link href="/intro">
|
||||
<a>Intro</a>
|
||||
</Link>
|
||||
<Link href="/docs">
|
||||
<a>Docs</a>
|
||||
</Link>
|
||||
<a href="https://www.amazon.com/gp/product/1449335837/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1449335837&linkCode=as2&tag=vagrant-20">
|
||||
Book
|
||||
</a>
|
||||
<Link href="/vmware">
|
||||
<a>VMWare</a>
|
||||
</Link>
|
||||
<a href="https://hashicorp.com/privacy">Privacy</a>
|
||||
<Link href="/security">
|
||||
<a>Security</a>
|
||||
</Link>
|
||||
<Link href="/files/press-kit.zip">
|
||||
<a>Press Kit</a>
|
||||
</Link>
|
||||
<a onClick={openConsentManager}>Consent Manager</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
32
website/components/footer/style.css
Normal file
32
website/components/footer/style.css
Normal file
@ -0,0 +1,32 @@
|
||||
.g-footer {
|
||||
padding: 25px 0 17px 0;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
|
||||
& .g-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
& a {
|
||||
color: black;
|
||||
opacity: 0.5;
|
||||
transition: opacity 0.25s ease;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
& .left > a {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
website/components/subnav/index.jsx
Normal file
23
website/components/subnav/index.jsx
Normal file
@ -0,0 +1,23 @@
|
||||
import Subnav from '@hashicorp/react-subnav'
|
||||
import subnavItems from '../../data/subnav'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
export default function VagrantSubnav() {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<Subnav
|
||||
titleLink={{
|
||||
text: 'vagrant',
|
||||
url: '/',
|
||||
}}
|
||||
ctaLinks={[
|
||||
{ text: 'GitHub', url: 'https://www.github.com/hashicorp/vagrant' },
|
||||
{ text: 'Download', url: '/downloads' },
|
||||
]}
|
||||
currentPath={router.pathname}
|
||||
menuItemsAlign="right"
|
||||
menuItems={subnavItems}
|
||||
constrainWidth
|
||||
/>
|
||||
)
|
||||
}
|
||||
61
website/components/tabs/README.md
Normal file
61
website/components/tabs/README.md
Normal file
@ -0,0 +1,61 @@
|
||||
# Tabs Component
|
||||
|
||||
> An MDX-compatible Tabs component
|
||||
|
||||
This React component renders tabbed content.
|
||||
|
||||
## Usage
|
||||
|
||||
- Use the `<Tabs>` tag in your markdown file to begin a tabbed content section.
|
||||
- Use the `<Tab>` tag with a `heading` prop to separate your markdown
|
||||
|
||||
### Important
|
||||
|
||||
A line must be skipped between the `<Tab>` and your markdown (for both above and below said markdown). [This is a limitation of MDX also pointed out by the Docusaurus folks 🔗 ](https://v2.docusaurus.io/docs/markdown-features/#multi-language-support-code-blocks)
|
||||
|
||||
### Example
|
||||
|
||||
```mdx
|
||||
<Tabs>
|
||||
<Tab heading="CLI command">
|
||||
<!-- Intentionally skipped line.. -->
|
||||
### Content
|
||||
<!-- Intentionally skipped line.. -->
|
||||
</Tab>
|
||||
<Tab heading="API call using cURL">
|
||||
|
||||
### Content
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
```
|
||||
|
||||
### Component Props
|
||||
|
||||
`<Tabs>` can be provided any arbitrary `children` so long as the `heading` prop is present the React or HTML tag used to wrap markdown, that said, we provide the `<Tab>` component to separate your tab content without rendering extra, unnecessary markup.
|
||||
|
||||
This works:
|
||||
|
||||
```mdx
|
||||
<Tabs>
|
||||
<Tab heading="CLI command">
|
||||
|
||||
### Content
|
||||
|
||||
</Tab>
|
||||
....
|
||||
</Tabs>
|
||||
```
|
||||
|
||||
This _does not_ work:
|
||||
|
||||
```mdx
|
||||
<Tabs>
|
||||
<Tab> <!-- missing the `heading` prop to provide a tab heading -->
|
||||
|
||||
### Content
|
||||
|
||||
</Tab>
|
||||
....
|
||||
</Tabs>
|
||||
```
|
||||
17
website/components/tabs/index.jsx
Normal file
17
website/components/tabs/index.jsx
Normal file
@ -0,0 +1,17 @@
|
||||
import ReactTabs from '@hashicorp/react-tabs'
|
||||
|
||||
export default function Tabs({ children }) {
|
||||
return (
|
||||
<ReactTabs
|
||||
items={children.map((Block) => ({
|
||||
heading: Block.props.heading,
|
||||
// eslint-disable-next-line react/display-name
|
||||
tabChildren: () => Block,
|
||||
}))}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export function Tab({ children }) {
|
||||
return <>{children}</>
|
||||
}
|
||||
8
website/components/tabs/style.css
Normal file
8
website/components/tabs/style.css
Normal file
@ -0,0 +1,8 @@
|
||||
/* This is a CSS overwrite on top of the existing component styles to accommodate the Learn layout */
|
||||
.g-tabs {
|
||||
& .g-grid-container,
|
||||
& > .g-grid-container {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
14
website/components/temporary_text-split/index.jsx
Normal file
14
website/components/temporary_text-split/index.jsx
Normal file
@ -0,0 +1,14 @@
|
||||
import styles from './style.module.css'
|
||||
|
||||
export default function TextSplit({ text, reverse, children }) {
|
||||
return (
|
||||
<div className={`${styles.root} ${reverse ? styles.reverse : ''}`}>
|
||||
<div className={styles.text}>
|
||||
<div className={styles.tag}>{text.tag}</div>
|
||||
<h2 className={styles.headline}>{text.headline}</h2>
|
||||
<p className="g-type-body">{text.text}</p>
|
||||
</div>
|
||||
<div className={styles.content}>{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
48
website/components/temporary_text-split/style.module.css
Normal file
48
website/components/temporary_text-split/style.module.css
Normal file
@ -0,0 +1,48 @@
|
||||
.root {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.reverse {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
composes: g-type-label from global;
|
||||
display: inline-block;
|
||||
background: black;
|
||||
color: white;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.headline {
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 50%;
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
width: 100%;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
30
website/components/vmware-purchase-form/index.jsx
Normal file
30
website/components/vmware-purchase-form/index.jsx
Normal file
@ -0,0 +1,30 @@
|
||||
import s from './style.module.css'
|
||||
import { useState } from 'react'
|
||||
|
||||
export default function VMWarePurchaseForm({ productId }) {
|
||||
const [seats, setSeats] = useState(1)
|
||||
const submit = (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
const seatsInt = parseInt(seats, 10)
|
||||
if (isNaN(seatsInt)) {
|
||||
return alert('The number of seats you want to purchase must be a number.')
|
||||
}
|
||||
if (seatsInt <= 0) {
|
||||
return alert('The number of seats you want must be greater than zero.')
|
||||
}
|
||||
|
||||
window.location.href = `http://shopify.hashicorp.com/cart/${productId}:${seats}`
|
||||
}
|
||||
|
||||
return (
|
||||
<form className={s.root} onSubmit={submit}>
|
||||
<input
|
||||
type="number"
|
||||
value={seats}
|
||||
onChange={(e) => setSeats(e.target.value)}
|
||||
></input>
|
||||
<button>Buy Now</button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
32
website/components/vmware-purchase-form/style.module.css
Normal file
32
website/components/vmware-purchase-form/style.module.css
Normal file
@ -0,0 +1,32 @@
|
||||
.root {
|
||||
& input {
|
||||
border: none;
|
||||
box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
font-size: 18px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 15px;
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
& button {
|
||||
background: #1563ff;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
color: #fff;
|
||||
font-family: 'gilmer-web', 'Gilmer', Geneva, Tahoma, Helvetica, Verdana,
|
||||
sans-serif;
|
||||
font-size: 18px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 15px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.25s ease;
|
||||
|
||||
&:hover {
|
||||
background: #3176ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,114 +0,0 @@
|
||||
set :base_url, "https://www.vagrantup.com/"
|
||||
|
||||
set :vmware_utility_name, "vagrant-vmware-utility"
|
||||
set :vmware_utility_version, "1.0.9"
|
||||
|
||||
activate :hashicorp do |h|
|
||||
h.name = "vagrant"
|
||||
h.version = "2.2.9"
|
||||
h.github_slug = "hashicorp/vagrant"
|
||||
h.website_root = "website"
|
||||
end
|
||||
|
||||
helpers do
|
||||
# Returns a segment tracking ID such that local development is not
|
||||
# tracked to production systems.
|
||||
def segmentId()
|
||||
if (ENV['ENV'] == 'production')
|
||||
'wFMyBE4PJCZttWfu0pNhYdWr7ygW0io4'
|
||||
else
|
||||
'0EXTgkNx0Ydje2PGXVbRhpKKoe5wtzcE'
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the FQDN of the image URL.
|
||||
#
|
||||
# @param [String] path
|
||||
#
|
||||
# @return [String]
|
||||
def image_url(path)
|
||||
File.join(base_url, image_path(path))
|
||||
end
|
||||
|
||||
# Get the title for the page.
|
||||
#
|
||||
# @param [Middleman::Page] page
|
||||
#
|
||||
# @return [String]
|
||||
def title_for(page)
|
||||
if page && page.data.page_title
|
||||
return "#{page.data.page_title} - Vagrant by HashiCorp"
|
||||
end
|
||||
|
||||
"Vagrant by HashiCorp"
|
||||
end
|
||||
|
||||
# Get the description for the page
|
||||
#
|
||||
# @param [Middleman::Page] page
|
||||
#
|
||||
# @return [String]
|
||||
def description_for(page)
|
||||
description = (page.data.description || "")
|
||||
.gsub('"', '')
|
||||
.gsub(/\n+/, ' ')
|
||||
.squeeze(' ')
|
||||
|
||||
return escape_html(description)
|
||||
end
|
||||
|
||||
# This helps by setting the "active" class for sidebar nav elements
|
||||
# if the YAML frontmatter matches the expected value.
|
||||
def sidebar_current(expected)
|
||||
current = current_page.data.sidebar_current || ""
|
||||
if current.start_with?(expected)
|
||||
return " class=\"active\""
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the id for this page.
|
||||
# @return [String]
|
||||
def body_id_for(page)
|
||||
if !(name = page.data.sidebar_current).blank?
|
||||
return "page-#{name.strip}"
|
||||
end
|
||||
if page.url == "/" || page.url == "/index.html"
|
||||
return "page-home"
|
||||
end
|
||||
if !(title = page.data.page_title).blank?
|
||||
return title
|
||||
.downcase
|
||||
.gsub('"', '')
|
||||
.gsub(/[^\w]+/, '-')
|
||||
.gsub(/_+/, '-')
|
||||
.squeeze('-')
|
||||
.squeeze(' ')
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
# Returns the list of classes for this page.
|
||||
# @return [String]
|
||||
def body_classes_for(page)
|
||||
classes = []
|
||||
|
||||
if !(layout = page.data.layout).blank?
|
||||
classes << "layout-#{page.data.layout}"
|
||||
end
|
||||
|
||||
if !(title = page.data.page_title).blank?
|
||||
title = title
|
||||
.downcase
|
||||
.gsub('"', '')
|
||||
.gsub(/[^\w]+/, '-')
|
||||
.gsub(/_+/, '-')
|
||||
.squeeze('-')
|
||||
.squeeze(' ')
|
||||
classes << "page-#{title}"
|
||||
end
|
||||
|
||||
return classes.join(" ")
|
||||
end
|
||||
end
|
||||
32
website/data/cloud-navigation.js
Normal file
32
website/data/cloud-navigation.js
Normal file
@ -0,0 +1,32 @@
|
||||
// The root folder for this documentation category is `pages/docs`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category, or a "name" property to
|
||||
// serve as the category title in the sidebar
|
||||
|
||||
export default [
|
||||
{ title: 'Back to Vagrant Documentation', href: '/docs' },
|
||||
{
|
||||
category: 'boxes',
|
||||
content: [
|
||||
'catalog',
|
||||
'create',
|
||||
'create-version',
|
||||
'distributing',
|
||||
'lifecycle',
|
||||
'private',
|
||||
'release-workflow',
|
||||
'using',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'organizations',
|
||||
content: ['create', 'migrate', 'authentication-policy'],
|
||||
},
|
||||
{ category: 'users', content: ['authentication', 'recovery'] },
|
||||
'request-limits',
|
||||
'support',
|
||||
'api',
|
||||
]
|
||||
184
website/data/docs-navigation.js
Normal file
184
website/data/docs-navigation.js
Normal file
@ -0,0 +1,184 @@
|
||||
// The root folder for this documentation category is `pages/docs`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category, or a "name" property to
|
||||
// serve as the category title in the sidebar
|
||||
|
||||
export default [
|
||||
'index',
|
||||
{
|
||||
category: 'installation',
|
||||
content: [
|
||||
'backwards-compatibility',
|
||||
'upgrading',
|
||||
'upgrading-from-1-0',
|
||||
'source',
|
||||
'uninstallation',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'cli',
|
||||
content: [
|
||||
'box',
|
||||
'cloud',
|
||||
'connect',
|
||||
'destroy',
|
||||
'global-status',
|
||||
'halt',
|
||||
'init',
|
||||
'login',
|
||||
'package',
|
||||
'plugin',
|
||||
'port',
|
||||
'powershell',
|
||||
'provision',
|
||||
'rdp',
|
||||
'reload',
|
||||
'resume',
|
||||
'share',
|
||||
'snapshot',
|
||||
'ssh',
|
||||
'ssh_config',
|
||||
'status',
|
||||
'suspend',
|
||||
'up',
|
||||
'upload',
|
||||
'validate',
|
||||
'version',
|
||||
'non-primary',
|
||||
'aliases',
|
||||
'machine-readable',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'share',
|
||||
content: ['http', 'ssh', 'connect', 'security', 'provider'],
|
||||
},
|
||||
{
|
||||
category: 'vagrantfile',
|
||||
content: [
|
||||
'version',
|
||||
'vagrant_version',
|
||||
'tips',
|
||||
'machine_settings',
|
||||
'ssh_settings',
|
||||
'winrm_settings',
|
||||
'winssh_settings',
|
||||
'vagrant_settings',
|
||||
],
|
||||
},
|
||||
{ category: 'boxes', content: ['versioning', 'base', 'format', 'info'] },
|
||||
{
|
||||
category: 'provisioning',
|
||||
content: [
|
||||
'basic_usage',
|
||||
'file',
|
||||
'shell',
|
||||
'ansible_intro',
|
||||
'ansible',
|
||||
'ansible_local',
|
||||
'ansible_common',
|
||||
'cfengine',
|
||||
'chef_common',
|
||||
'chef_solo',
|
||||
'chef_zero',
|
||||
'chef_client',
|
||||
'chef_apply',
|
||||
'docker',
|
||||
'podman',
|
||||
'puppet_apply',
|
||||
'puppet_agent',
|
||||
'salt',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'networking',
|
||||
content: [
|
||||
'basic_usage',
|
||||
'forwarded_ports',
|
||||
'private_network',
|
||||
'public_network',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'synced-folders',
|
||||
content: ['basic_usage', 'nfs', 'rsync', 'smb', 'virtualbox'],
|
||||
},
|
||||
{
|
||||
category: 'disks',
|
||||
content: [
|
||||
'configuration',
|
||||
'usage',
|
||||
{ category: 'virtualbox', content: ['usage', 'common-issues'] },
|
||||
],
|
||||
},
|
||||
'multi-machine',
|
||||
{
|
||||
category: 'providers',
|
||||
content: [
|
||||
'installation',
|
||||
'basic_usage',
|
||||
'configuration',
|
||||
'default',
|
||||
{
|
||||
category: 'virtualbox',
|
||||
content: [
|
||||
'usage',
|
||||
'boxes',
|
||||
'configuration',
|
||||
'networking',
|
||||
'common-issues',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'vmware',
|
||||
content: [
|
||||
'installation',
|
||||
'vagrant-vmware-utility',
|
||||
'usage',
|
||||
'boxes',
|
||||
'configuration',
|
||||
'known-issues',
|
||||
'kernel-upgrade',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'docker',
|
||||
content: ['basics', 'commands', 'boxes', 'configuration', 'networking'],
|
||||
},
|
||||
{
|
||||
category: 'hyperv',
|
||||
content: ['usage', 'boxes', 'configuration', 'limitations'],
|
||||
},
|
||||
'custom',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'plugins',
|
||||
content: [
|
||||
'usage',
|
||||
'development-basics',
|
||||
'action-hooks',
|
||||
'commands',
|
||||
'configuration',
|
||||
'guests',
|
||||
'guest-capabilities',
|
||||
'hosts',
|
||||
'host-capabilities',
|
||||
'providers',
|
||||
'provisioners',
|
||||
'packaging',
|
||||
],
|
||||
},
|
||||
{ category: 'push', content: ['ftp', 'heroku', 'local-exec'] },
|
||||
{ category: 'triggers', content: ['configuration', 'usage'] },
|
||||
'experimental',
|
||||
{
|
||||
category: 'other',
|
||||
content: ['debugging', 'environmental-variables', 'wsl'],
|
||||
},
|
||||
'---',
|
||||
{ title: 'Vagrant Cloud', href: '/vagrant-cloud' },
|
||||
]
|
||||
28
website/data/intro-navigation.js
Normal file
28
website/data/intro-navigation.js
Normal file
@ -0,0 +1,28 @@
|
||||
// The root folder for this documentation category is `pages/vmware`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category, or a "name" property to
|
||||
// serve as the category title in the sidebar
|
||||
|
||||
export default [
|
||||
'index',
|
||||
{ category: 'vs', content: ['cli-tools', 'docker', 'terraform'] },
|
||||
{
|
||||
category: 'getting-started',
|
||||
content: [
|
||||
'install',
|
||||
'project_setup',
|
||||
'boxes',
|
||||
'up',
|
||||
'synced_folders',
|
||||
'provisioning',
|
||||
'networking',
|
||||
'share',
|
||||
'teardown',
|
||||
'rebuild',
|
||||
'providers',
|
||||
],
|
||||
},
|
||||
]
|
||||
22
website/data/subnav.js
Normal file
22
website/data/subnav.js
Normal file
@ -0,0 +1,22 @@
|
||||
export default [
|
||||
{
|
||||
text: 'Intro',
|
||||
url: '/intro',
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'Docs',
|
||||
url: '/docs',
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'VMWare',
|
||||
url: '/vmware',
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'Community',
|
||||
url: '/community',
|
||||
type: 'inbound',
|
||||
},
|
||||
]
|
||||
4
website/data/version.json
Normal file
4
website/data/version.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"VERSION": "2.2.9",
|
||||
"VMWARE_UTILITY_VERSION": "1.0.9"
|
||||
}
|
||||
14
website/data/vmware-navigation.js
Normal file
14
website/data/vmware-navigation.js
Normal file
@ -0,0 +1,14 @@
|
||||
// The root folder for this documentation category is `pages/guides`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category, or a "name" property to
|
||||
// serve as the category title in the sidebar
|
||||
|
||||
export default [
|
||||
'reseller',
|
||||
'eula',
|
||||
{ title: 'Privacy Policy', href: 'https://www.hashicorp.com/privacy' },
|
||||
'terms-of-service',
|
||||
]
|
||||
5
website/jsconfig.json
Normal file
5
website/jsconfig.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
}
|
||||
}
|
||||
43
website/layouts/docs.jsx
Normal file
43
website/layouts/docs.jsx
Normal file
@ -0,0 +1,43 @@
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/docs-navigation.js'
|
||||
import { frontMatter as data } from '../pages/docs/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import Tabs, { Tab } from '../components/tabs'
|
||||
import Button from '@hashicorp/react-button'
|
||||
|
||||
const DEFAULT_COMPONENTS = { Tabs, Tab, Button }
|
||||
|
||||
function DocsLayoutWrapper(pageMeta) {
|
||||
function DocsLayout(props) {
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<DocsPage
|
||||
{...props}
|
||||
product="vagrant"
|
||||
head={{
|
||||
is: Head,
|
||||
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||
description: pageMeta.description,
|
||||
siteName: 'Vagrant by HashiCorp',
|
||||
}}
|
||||
sidenav={{
|
||||
Link,
|
||||
category: 'docs',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
||||
DocsLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||
|
||||
return DocsLayout
|
||||
}
|
||||
|
||||
export default DocsLayoutWrapper
|
||||
35
website/layouts/index.jsx
Normal file
35
website/layouts/index.jsx
Normal file
@ -0,0 +1,35 @@
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
|
||||
function DefaultLayoutWrapper(pageMeta) {
|
||||
function DefaultLayout(props) {
|
||||
return (
|
||||
<DocsPage
|
||||
{...props}
|
||||
product="vagrant"
|
||||
head={{
|
||||
is: Head,
|
||||
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||
description: pageMeta.description,
|
||||
siteName: 'Vagrant by HashiCorp',
|
||||
}}
|
||||
sidenav={{
|
||||
Link,
|
||||
category: 'docs',
|
||||
currentPage: props.path,
|
||||
data: [],
|
||||
order: [],
|
||||
disableFilter: true,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
DefaultLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||
|
||||
return DefaultLayout
|
||||
}
|
||||
|
||||
export default DefaultLayoutWrapper
|
||||
41
website/layouts/intro.jsx
Normal file
41
website/layouts/intro.jsx
Normal file
@ -0,0 +1,41 @@
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/intro-navigation.js'
|
||||
import { frontMatter as data } from '../pages/intro/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
|
||||
const DEFAULT_COMPONENTS = {}
|
||||
|
||||
function IntroLayoutWrapper(pageMeta) {
|
||||
function IntroLayout(props) {
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<DocsPage
|
||||
{...props}
|
||||
product="vagrant"
|
||||
head={{
|
||||
is: Head,
|
||||
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||
description: pageMeta.description,
|
||||
siteName: 'Vagrant by HashiCorp',
|
||||
}}
|
||||
sidenav={{
|
||||
Link,
|
||||
category: 'intro',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
||||
IntroLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||
|
||||
return IntroLayout
|
||||
}
|
||||
|
||||
export default IntroLayoutWrapper
|
||||
43
website/layouts/vagrant-cloud.jsx
Normal file
43
website/layouts/vagrant-cloud.jsx
Normal file
@ -0,0 +1,43 @@
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/cloud-navigation.js'
|
||||
import { frontMatter as data } from '../pages/vagrant-cloud/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import Button from '@hashicorp/react-button'
|
||||
import Tabs, { Tab } from '../components/tabs'
|
||||
|
||||
const DEFAULT_COMPONENTS = { Button, Tabs, Tab }
|
||||
|
||||
function CloudLayoutWrapper(pageMeta) {
|
||||
function CloudLayout(props) {
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<DocsPage
|
||||
{...props}
|
||||
product="vagrant"
|
||||
head={{
|
||||
is: Head,
|
||||
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||
description: pageMeta.description,
|
||||
siteName: 'Vagrant by HashiCorp',
|
||||
}}
|
||||
sidenav={{
|
||||
Link,
|
||||
category: 'vagrant-cloud',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
||||
CloudLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||
|
||||
return CloudLayout
|
||||
}
|
||||
|
||||
export default CloudLayoutWrapper
|
||||
42
website/layouts/vmware.jsx
Normal file
42
website/layouts/vmware.jsx
Normal file
@ -0,0 +1,42 @@
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/vmware-navigation.js'
|
||||
import { frontMatter as data } from '../pages/vmware/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import Button from '@hashicorp/react-button'
|
||||
|
||||
const DEFAULT_COMPONENTS = { Button }
|
||||
|
||||
function VMWareLayoutWrapper(pageMeta) {
|
||||
function VMWareLayout(props) {
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<DocsPage
|
||||
{...props}
|
||||
product="vagrant"
|
||||
head={{
|
||||
is: Head,
|
||||
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||
description: pageMeta.description,
|
||||
siteName: 'Vagrant by HashiCorp',
|
||||
}}
|
||||
sidenav={{
|
||||
Link,
|
||||
category: 'vmware',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
||||
VMWareLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||
|
||||
return VMWareLayout
|
||||
}
|
||||
|
||||
export default VMWareLayoutWrapper
|
||||
18
website/netlify.toml
Normal file
18
website/netlify.toml
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
# This file sets configuration for Netlify
|
||||
# ref: https://www.netlify.com/docs/netlify-toml-reference/
|
||||
|
||||
[build]
|
||||
publish = "out"
|
||||
command = "npm run static"
|
||||
|
||||
[context.production]
|
||||
environment = { HASHI_ENV = "production", NODE_ENV = "production"}
|
||||
|
||||
[context.deploy-preview]
|
||||
environment = { HASHI_ENV = "staging" }
|
||||
|
||||
[[headers]]
|
||||
for = "/*"
|
||||
[headers.values]
|
||||
X-Frame-Options = "SAMEORIGIN"
|
||||
14
website/next.config.js
Normal file
14
website/next.config.js
Normal file
@ -0,0 +1,14 @@
|
||||
const withHashicorp = require('@hashicorp/nextjs-scripts')
|
||||
|
||||
module.exports = withHashicorp({
|
||||
defaultLayout: true,
|
||||
transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'],
|
||||
})({
|
||||
experimental: { modern: true },
|
||||
env: {
|
||||
HASHI_ENV: process.env.HASHI_ENV || 'development',
|
||||
SEGMENT_WRITE_KEY: 'wFMyBE4PJCZttWfu0pNhYdWr7ygW0io4',
|
||||
BUGSNAG_CLIENT_KEY: '87a42e709789c35676b06b0d29a9075d',
|
||||
BUGSNAG_SERVER_KEY: '4acc6140aaebfab35f535a3666674a07',
|
||||
},
|
||||
})
|
||||
15739
website/package-lock.json
generated
Normal file
15739
website/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
56
website/package.json
Normal file
56
website/package.json
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "vagrant-docs",
|
||||
"description": "Documentation website for HashiCorp Vagrant",
|
||||
"version": "1.0.0",
|
||||
"author": "HashiCorp",
|
||||
"dependencies": {
|
||||
"@hashicorp/nextjs-scripts": "^8.1.0",
|
||||
"@hashicorp/react-button": "^2.2.0",
|
||||
"@hashicorp/react-code-block": "^1.2.7",
|
||||
"@hashicorp/react-consent-manager": "^2.1.0",
|
||||
"@hashicorp/react-content": "^3.0.0-0",
|
||||
"@hashicorp/react-docs-page": "^2.0.0",
|
||||
"@hashicorp/react-docs-sidenav": "^3.2.3",
|
||||
"@hashicorp/react-global-styles": "^4.4.0",
|
||||
"@hashicorp/react-head": "^1.0.0",
|
||||
"@hashicorp/react-image": "^2.0.1",
|
||||
"@hashicorp/react-mega-nav": "^4.0.1-2",
|
||||
"@hashicorp/react-product-downloader": "^3.3.0",
|
||||
"@hashicorp/react-section-header": "^2.0.0",
|
||||
"@hashicorp/react-subnav": "^3.2.1",
|
||||
"@hashicorp/react-tabs": "^0.4.0",
|
||||
"@hashicorp/react-vertical-text-block-list": "^2.0.1",
|
||||
"babel-plugin-import-glob-array": "^0.2.0",
|
||||
"imagemin-mozjpeg": "^8.0.0",
|
||||
"imagemin-optipng": "^7.1.0",
|
||||
"imagemin-svgo": "^7.1.0",
|
||||
"isomorphic-unfetch": "^3.0.0",
|
||||
"next": "9.4.2",
|
||||
"nprogress": "^0.2.0",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dart-linkcheck": "^2.0.15",
|
||||
"glob": "^7.1.6",
|
||||
"husky": "^4.2.5",
|
||||
"inquirer": "^7.1.0",
|
||||
"prettier": "^2.0.5"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "next-hashicorp precommit"
|
||||
}
|
||||
},
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "node --max-old-space-size=2048 ./node_modules/.bin/next build",
|
||||
"export": "node --max-old-space-size=2048 ./node_modules/.bin/next export",
|
||||
"format": "next-hashicorp format",
|
||||
"generate:component": "next-hashicorp generate component",
|
||||
"lint": "next-hashicorp lint",
|
||||
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
|
||||
"static": "npm run build && npm run export && cp _redirects out/.",
|
||||
"linkcheck": "linkcheck https://vagrantup.com"
|
||||
}
|
||||
}
|
||||
32
website/pages/404.jsx
Normal file
32
website/pages/404.jsx
Normal file
@ -0,0 +1,32 @@
|
||||
import Link from 'next/link'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export default function NotFound() {
|
||||
useEffect(() => {
|
||||
if (
|
||||
typeof window !== 'undefined' &&
|
||||
typeof window?.analytics?.track === 'function' &&
|
||||
typeof window?.document?.referrer === 'string' &&
|
||||
typeof window?.location?.href === 'string'
|
||||
)
|
||||
window.analytics.track(window.location.href, {
|
||||
category: '404 Response',
|
||||
label: window.document.referrer || 'No Referrer',
|
||||
})
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div id="p-404" className="g-grid-container">
|
||||
<h1>Page Not Found</h1>
|
||||
<p>
|
||||
We‘re sorry but we can‘t find the page you‘re looking
|
||||
for.
|
||||
</p>
|
||||
<p>
|
||||
<Link href="/">
|
||||
<a>Back to Home</a>
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
80
website/pages/_app.js
Normal file
80
website/pages/_app.js
Normal file
@ -0,0 +1,80 @@
|
||||
import './style.css'
|
||||
import '@hashicorp/nextjs-scripts/lib/nprogress/style.css'
|
||||
|
||||
import NProgress from '@hashicorp/nextjs-scripts/lib/nprogress'
|
||||
import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager'
|
||||
import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics'
|
||||
import Router from 'next/router'
|
||||
import HashiHead from '@hashicorp/react-head'
|
||||
import Head from 'next/head'
|
||||
import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag'
|
||||
import MegaNav from '@hashicorp/react-mega-nav'
|
||||
import ProductSubnav from '../components/subnav'
|
||||
import Footer from '../components/footer'
|
||||
import Error from './_error'
|
||||
|
||||
NProgress({ Router })
|
||||
const { ConsentManager, openConsentManager } = createConsentManager({
|
||||
preset: 'oss',
|
||||
})
|
||||
|
||||
function App({ Component, pageProps }) {
|
||||
useAnchorLinkAnalytics()
|
||||
|
||||
return (
|
||||
<ErrorBoundary FallbackComponent={Error}>
|
||||
<HashiHead
|
||||
is={Head}
|
||||
title="Vagrant by HashiCorp"
|
||||
siteName="Vagrant by HashiCorp"
|
||||
description="Vagrant enables users to create and configure lightweight, reproducible, and
|
||||
portable development environments."
|
||||
image="https://www.vagrantup.com/img/og-image.png"
|
||||
stylesheet={[
|
||||
{
|
||||
href:
|
||||
'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap',
|
||||
},
|
||||
]}
|
||||
icon={[{ href: '/favicon.ico' }]}
|
||||
preload={[
|
||||
{ href: '/fonts/klavika/medium.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/light.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/medium.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/book.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/semi-bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/dejavu/mono.woff2', as: 'font' },
|
||||
]}
|
||||
/>
|
||||
<MegaNav product="Vagrant" />
|
||||
<ProductSubnav />
|
||||
<div className="content">
|
||||
<Component {...pageProps} />
|
||||
</div>
|
||||
<Footer openConsentManager={openConsentManager} />
|
||||
<ConsentManager />
|
||||
</ErrorBoundary>
|
||||
)
|
||||
}
|
||||
|
||||
App.getInitialProps = async ({ Component, ctx }) => {
|
||||
let pageProps = {}
|
||||
|
||||
if (Component.getInitialProps) {
|
||||
pageProps = await Component.getInitialProps(ctx)
|
||||
} else if (Component.isMDXComponent) {
|
||||
// fix for https://github.com/mdx-js/mdx/issues/382
|
||||
const mdxLayoutComponent = Component({}).props.originalType
|
||||
if (mdxLayoutComponent.getInitialProps) {
|
||||
pageProps = await mdxLayoutComponent.getInitialProps(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
return { pageProps }
|
||||
}
|
||||
|
||||
export default App
|
||||
27
website/pages/_document.js
Normal file
27
website/pages/_document.js
Normal file
@ -0,0 +1,27 @@
|
||||
import Document, { Head, Main, NextScript } from 'next/document'
|
||||
import HashiHead from '@hashicorp/react-head'
|
||||
|
||||
export default class MyDocument extends Document {
|
||||
static async getInitialProps(ctx) {
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return { ...initialProps }
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<html>
|
||||
<HashiHead is={Head} />
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
<script
|
||||
noModule
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `window.MSInputMethodContext && document.documentMode && document.write('<script src="/ie-custom-properties.js"><\\x2fscript>');`,
|
||||
}}
|
||||
/>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
}
|
||||
14
website/pages/_error.jsx
Normal file
14
website/pages/_error.jsx
Normal file
@ -0,0 +1,14 @@
|
||||
import NotFound from './404'
|
||||
import Bugsnag from '@hashicorp/nextjs-scripts/lib/bugsnag'
|
||||
|
||||
function Error({ statusCode }) {
|
||||
return <NotFound statusCode={statusCode} />
|
||||
}
|
||||
|
||||
Error.getInitialProps = ({ res, err }) => {
|
||||
if (err) Bugsnag.notify(err)
|
||||
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
||||
return { statusCode }
|
||||
}
|
||||
|
||||
export default Error
|
||||
51
website/pages/community/index.jsx
Normal file
51
website/pages/community/index.jsx
Normal file
@ -0,0 +1,51 @@
|
||||
import VerticalTextBlockList from '@hashicorp/react-vertical-text-block-list'
|
||||
import SectionHeader from '@hashicorp/react-section-header'
|
||||
import Head from 'next/head'
|
||||
|
||||
export default function CommunityPage() {
|
||||
return (
|
||||
<div id="p-community">
|
||||
<Head>
|
||||
<title key="title">Community | Vagrant by HashiCorp</title>
|
||||
</Head>
|
||||
<SectionHeader
|
||||
headline="Community"
|
||||
description="Vagrant is an open source project with a growing community. There are active, dedicated users willing to help you through various mediums."
|
||||
use_h1={true}
|
||||
/>
|
||||
<VerticalTextBlockList
|
||||
data={[
|
||||
{
|
||||
header: 'IRC',
|
||||
body: '`#vagrant` on freenode',
|
||||
},
|
||||
{
|
||||
header: 'Announcement List',
|
||||
body:
|
||||
'[HashiCorp Announcement Google Group](https://groups.google.com/group/hashicorp-announce)',
|
||||
},
|
||||
{
|
||||
header: 'Discussion List',
|
||||
body:
|
||||
'[Vagrant Google Group](https://groups.google.com/forum/#!forum/vagrant-up)',
|
||||
},
|
||||
{
|
||||
header: 'Community Forum',
|
||||
body:
|
||||
'[Vagrant Community Forum](https://discuss.hashicorp.com/c/vagrant/24)',
|
||||
},
|
||||
{
|
||||
header: 'Bug Tracker',
|
||||
body:
|
||||
'[Issue tracker on GitHub](https://github.com/hashicorp/vagrant/issues). Please only use this for reporting bugs. Do not ask for general help here. Use IRC or the mailing list for that.',
|
||||
},
|
||||
{
|
||||
header: 'Training',
|
||||
body:
|
||||
'Paid [HashiCorp training courses](https://www.hashicorp.com/training) are also available in a city near you. Private training courses are also available.',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
8
website/pages/community/style.css
Normal file
8
website/pages/community/style.css
Normal file
@ -0,0 +1,8 @@
|
||||
#p-community {
|
||||
max-width: var(--site-max-width);
|
||||
margin: 72px auto;
|
||||
|
||||
& .g-section-header {
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Creating a Base Box"
|
||||
sidebar_current: "boxes-base"
|
||||
layout: docs
|
||||
page_title: Creating a Base Box
|
||||
sidebar_title: Creating a Base Box
|
||||
description: |-
|
||||
There are a special category of boxes known as "base boxes." These boxes
|
||||
contain the bare minimum required for Vagrant to function, are generally
|
||||
@ -25,12 +25,10 @@ which to build future development environments. The Vagrant project hopes
|
||||
in the future to be able to provide base boxes for many more operating systems.
|
||||
Until then, this page documents how you can create your own base box.
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>Advanced topic!</strong> Creating a base box can be a time consuming
|
||||
and tedious process, and is not recommended for new Vagrant users. If you are
|
||||
just getting started with Vagrant, we recommend trying to find existing
|
||||
base boxes to use first.
|
||||
</div>
|
||||
~> **Advanced topic!** Creating a base box can be a time consuming
|
||||
and tedious process, and is not recommended for new Vagrant users. If you are
|
||||
just getting started with Vagrant, we recommend trying to find existing
|
||||
base boxes to use first.
|
||||
|
||||
## What's in a Base Box?
|
||||
|
||||
@ -38,10 +36,10 @@ A base box typically consists of only a bare minimum set of software
|
||||
for Vagrant to function. As an example, a Linux box may contain only the
|
||||
following:
|
||||
|
||||
* Package manager
|
||||
* SSH
|
||||
* SSH user so Vagrant can connect
|
||||
* Perhaps Chef, Puppet, etc. but not strictly required.
|
||||
- Package manager
|
||||
- SSH
|
||||
- SSH user so Vagrant can connect
|
||||
- Perhaps Chef, Puppet, etc. but not strictly required.
|
||||
|
||||
In addition to this, each [provider](/docs/providers/) may require
|
||||
additional software. For example, if you are making a base box for VirtualBox,
|
||||
@ -61,16 +59,16 @@ boxes.
|
||||
|
||||
Provider-specific guides for creating base boxes are linked below:
|
||||
|
||||
* [Docker Base Boxes](/docs/docker/boxes.html)
|
||||
* [Hyper-V Base Boxes](/docs/hyperv/boxes.html)
|
||||
* [VMware Base Boxes](/docs/vmware/boxes.html)
|
||||
* [VirtualBox Base Boxes](/docs/virtualbox/boxes.html)
|
||||
- [Docker Base Boxes](/docs/docker/boxes)
|
||||
- [Hyper-V Base Boxes](/docs/hyperv/boxes)
|
||||
- [VMware Base Boxes](/docs/vmware/boxes)
|
||||
- [VirtualBox Base Boxes](/docs/virtualbox/boxes)
|
||||
|
||||
### Packer and Vagrant Cloud
|
||||
|
||||
We strongly recommend using [Packer](https://www.packer.io) to create reproducible
|
||||
builds for your base boxes, as well as automating the builds. Read more about
|
||||
[automating Vagrant box creation with Packer](https://www.packer.io/guides/packer-on-cicd/build-image-in-cicd.html)
|
||||
[automating Vagrant box creation with Packer](https://www.packer.io/guides/packer-on-cicd/build-image-in-cicd)
|
||||
in the Packer documentation.
|
||||
|
||||
### Disk Space
|
||||
@ -179,22 +177,22 @@ can take many seconds.
|
||||
|
||||
Supported Windows guest operating systems:
|
||||
|
||||
- Windows 7
|
||||
- Windows 8
|
||||
- Windows Server 2008
|
||||
- Windows Server 2008 R2
|
||||
- Windows Server 2012
|
||||
- Windows Server 2012 R2
|
||||
- Windows 7
|
||||
- Windows 8
|
||||
- Windows Server 2008
|
||||
- Windows Server 2008 R2
|
||||
- Windows Server 2012
|
||||
- Windows Server 2012 R2
|
||||
|
||||
Windows Server 2003 and Windows XP are _not_ supported, but if you are a die
|
||||
hard XP fan [this](https://stackoverflow.com/a/18593425/18475) may help you.
|
||||
|
||||
### Base Windows Configuration
|
||||
|
||||
- Turn off UAC
|
||||
- Disable complex passwords
|
||||
- Disable "Shutdown Tracker"
|
||||
- Disable "Server Manager" starting at login (for non-Core)
|
||||
- Turn off UAC
|
||||
- Disable complex passwords
|
||||
- Disable "Shutdown Tracker"
|
||||
- Disable "Server Manager" starting at login (for non-Core)
|
||||
|
||||
In addition to disabling UAC in the control panel, you also must disable
|
||||
UAC in the registry. This may vary from Windows version to Windows version,
|
||||
@ -293,7 +291,7 @@ You can upload both public and private boxes to this service.
|
||||
|
||||
To test the box, pretend you are a new user of Vagrant and give it a shot:
|
||||
|
||||
```
|
||||
```shell-session
|
||||
$ vagrant box add --name my-box /path/to/the/new.box
|
||||
...
|
||||
$ vagrant init my-box
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Box File Format"
|
||||
sidebar_current: "boxes-format"
|
||||
layout: docs
|
||||
page_title: Box File Format
|
||||
sidebar_title: Box File Format
|
||||
description: |-
|
||||
The box file format for Vagrant has changed from only supporting VirtualBox to
|
||||
supporting a number different providers and box formats.
|
||||
@ -9,9 +9,9 @@ description: |-
|
||||
|
||||
# Box File Format
|
||||
|
||||
In the past, boxes were just [tar files](https://en.wikipedia.org/wiki/Tar_\(computing\))
|
||||
In the past, boxes were just [tar files](<https://en.wikipedia.org/wiki/Tar_(computing)>)
|
||||
of VirtualBox exports. With Vagrant supporting multiple
|
||||
[providers](/docs/providers/) and [versioning](/docs/boxes/versioning.html)
|
||||
[providers](/docs/providers/) and [versioning](/docs/boxes/versioning)
|
||||
now, box files are slightly more complicated.
|
||||
|
||||
Box files made for Vagrant 1.0.x (the VirtualBox export `tar` files) continue
|
||||
@ -20,13 +20,13 @@ it automatically updates it internally to the new format.
|
||||
|
||||
Today, there are three different components:
|
||||
|
||||
* Box File - This is a compressed (`tar`, `tar.gz`, `zip`) file that is specific
|
||||
- Box File - This is a compressed (`tar`, `tar.gz`, `zip`) file that is specific
|
||||
to a single provider and can contain anything. Vagrant core does not ever
|
||||
use the contents of this file. Instead, they are passed to the provider.
|
||||
Therefore, a VirtualBox box file has different contents from a VMware
|
||||
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 Vagrant Cloud](/docs/vagrant-cloud))
|
||||
that specifies the name of the box, a description, available
|
||||
versions, available providers, and URLs to the actual box files
|
||||
@ -34,9 +34,9 @@ Today, there are three different components:
|
||||
metadata does not exist, a box file can still be added directly, but
|
||||
it will not support versioning and updating.
|
||||
|
||||
* Box Information - This is a JSON document that can provide additional
|
||||
- Box Information - This is a JSON document that can provide additional
|
||||
information about the box that displays when a user runs
|
||||
`vagrant box list -i`. More information is provided [here](/docs/boxes/info.html).
|
||||
`vagrant box list -i`. More information is provided [here](/docs/boxes/info).
|
||||
|
||||
The first two components are covered in more detail below.
|
||||
|
||||
@ -52,7 +52,7 @@ archive can be anything, and is specific to each
|
||||
the boxes for use later.
|
||||
|
||||
Within the archive, Vagrant does expect a single file:
|
||||
`metadata.json`. This is a JSON file that is completely unrelated to
|
||||
`metadata.json`. This is a JSON file that is completely unrelated to
|
||||
the above box catalog metadata component; there is only one
|
||||
`metadata.json` per box file (inside the box file), whereas one
|
||||
catalog metadata JSON document can describe multiple versions of the
|
||||
@ -81,15 +81,13 @@ file.
|
||||
## Box Metadata
|
||||
|
||||
The metadata is an optional component for a box (but highly recommended)
|
||||
that enables [versioning](/docs/boxes/versioning.html), updating, multiple
|
||||
that enables [versioning](/docs/boxes/versioning), updating, multiple
|
||||
providers from a single file, and more.
|
||||
|
||||
<div class="alert alert-block alert-info">
|
||||
<strong>You do not need to manually make the metadata.</strong> If you
|
||||
have an account with <a href="/docs/vagrant-cloud">HashiCorp's Vagrant Cloud</a>, you
|
||||
can create boxes there, and HashiCorp's Vagrant Cloud automatically creates
|
||||
the metadata for you. The format is still documented here.
|
||||
</div>
|
||||
-> **You do not need to manually make the metadata.** If you
|
||||
have an account with [HashiCorp's Vagrant Cloud](/docs/vagrant-cloud), you
|
||||
can create boxes there, and HashiCorp's Vagrant Cloud automatically creates
|
||||
the metadata for you. The format is still documented here.
|
||||
|
||||
It is a JSON document, structured in the following way:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Boxes"
|
||||
sidebar_current: "boxes"
|
||||
layout: docs
|
||||
page_title: Boxes
|
||||
sidebar_title: Boxes
|
||||
description: |-
|
||||
Boxes are the package format for Vagrant environments. A box can be used by
|
||||
anyone on any platform that Vagrant supports to bring up an identical
|
||||
@ -15,7 +15,7 @@ anyone on any platform that Vagrant supports to bring up an identical
|
||||
working environment.
|
||||
|
||||
The `vagrant box` utility provides all the functionality for managing
|
||||
boxes. You can read the documentation on the [vagrant box](/docs/cli/box.html)
|
||||
boxes. You can read the documentation on the [vagrant box](/docs/cli/box)
|
||||
command for more information.
|
||||
|
||||
The easiest way to use a box is to add a box from the
|
||||
@ -44,7 +44,7 @@ VirtualBox, VMware, AWS, etc. you should be able to find a box you need.
|
||||
Adding a box from the catalog is very easy. Each box shows you instructions
|
||||
with how to add it, but they all follow the same format:
|
||||
|
||||
```
|
||||
```shell-session
|
||||
$ vagrant box add USER/BOX
|
||||
```
|
||||
|
||||
@ -62,7 +62,7 @@ with third-party published boxes.
|
||||
|
||||
HashiCorp (the makers of Vagrant) publish a basic Ubuntu 18.04 64-bit box that is available for minimal use cases. It is highly optimized, small in size, and includes support for Virtualbox, Hyper-V, and VMware. You can use it like this:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ vagrant init hashicorp/bionic64
|
||||
```
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Box Info Format"
|
||||
sidebar_current: "boxes-info"
|
||||
layout: docs
|
||||
page_title: Box Info Format
|
||||
sidebar_title: Box Info Format
|
||||
description: |-
|
||||
A box can provide additional information to the user by supplying an info.json
|
||||
file within the box.
|
||||
@ -24,19 +24,19 @@ hashicorp/bionic64 (virtualbox, 1.0.0)
|
||||
## Box Info
|
||||
|
||||
To accomplish this, you simply need to include a file named `info.json` when
|
||||
creating a [base box](/docs/boxes/base.html) which is a JSON document containing
|
||||
creating a [base box](/docs/boxes/base) which is a JSON document containing
|
||||
any and all relevant information that will be displayed to the user when the
|
||||
`-i` option is used with `vagrant box list`.
|
||||
|
||||
```json
|
||||
{
|
||||
"author": "brian",
|
||||
"homepage": "https://example.com"
|
||||
"author": "brian",
|
||||
"homepage": "https://example.com"
|
||||
}
|
||||
```
|
||||
|
||||
There are no special keys or values in `info.json`, and Vagrant will print each
|
||||
key and value on its own line.
|
||||
|
||||
The [Box File Format](/docs/boxes/format.html) provides more information about what
|
||||
The [Box File Format](/docs/boxes/format) provides more information about what
|
||||
else goes into a Vagrant box.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Box Versioning"
|
||||
sidebar_current: "boxes-versioning"
|
||||
layout: docs
|
||||
page_title: Box Versioning
|
||||
sidebar_title: Box Versioning
|
||||
description: |-
|
||||
Since Vagrant 1.5, boxes support versioning. This allows the people who
|
||||
make boxes to push updates to the box, and the people who use the box
|
||||
@ -24,7 +24,7 @@ to Vagrant makes it easy to use and fit nicely into the Vagrant workflow.
|
||||
|
||||
This page will cover how to use versioned boxes. It does _not_ cover how
|
||||
to update your own custom boxes with versions. That is covered in
|
||||
[creating a base box](/docs/boxes/base.html).
|
||||
[creating a base box](/docs/boxes/base).
|
||||
|
||||
## Viewing Versions and Updating
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Aliases - Command-Line Interface"
|
||||
sidebar_current: "cli-aliases"
|
||||
layout: docs
|
||||
page_title: Aliases - Command-Line Interface
|
||||
sidebar_title: Aliases
|
||||
description: |-
|
||||
Custom Vagrant commands can be defined using aliases, allowing for a simpler,
|
||||
easier, and more familiar command line interface.
|
||||
@ -18,7 +18,7 @@ Aliases can be defined within `VAGRANT_HOME/aliases` file, or in a custom file
|
||||
defined using the `VAGRANT_ALIAS_FILE` environment variable, in the following
|
||||
format:
|
||||
|
||||
```
|
||||
```shell
|
||||
# basic command-level aliases
|
||||
start = up
|
||||
stop = halt
|
||||
@ -40,13 +40,13 @@ useful for creating commands that you think _should_ exist. For example,
|
||||
if `vagrant stop` feels more intuitive than `vagrant halt`, the following alias
|
||||
definitions would make that change possible:
|
||||
|
||||
```
|
||||
```shell
|
||||
stop = halt
|
||||
```
|
||||
|
||||
This makes the following commands equivalent:
|
||||
|
||||
```
|
||||
```shell
|
||||
vagrant stop
|
||||
vagrant halt
|
||||
```
|
||||
@ -62,13 +62,13 @@ and memory utilization of the active project's virtual machine. To do this, you
|
||||
could define a `vagrant metrics` command that returns the required information
|
||||
in an easy-to-read format, like so:
|
||||
|
||||
```
|
||||
```shell
|
||||
metrics = !ps aux | grep "[V]BoxHeadless" | grep $(cat .vagrant/machines/default/virtualbox/id) | awk '{ printf("CPU: %.02f%%, Memory: %.02f%%", $3, $4) }'
|
||||
```
|
||||
|
||||
The above alias, from within the context of an active Vagrant project, would
|
||||
print the CPU and memory utilization directly to the console:
|
||||
|
||||
```
|
||||
```text
|
||||
CPU: 4.20%, Memory: 11.00%
|
||||
```
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant box - Command-Line Interface"
|
||||
sidebar_current: "cli-box"
|
||||
layout: docs
|
||||
page_title: vagrant box - Command-Line Interface
|
||||
sidebar_title: box
|
||||
description: |-
|
||||
The "vagrant box" command is used to manage "vagrant box add", "vagrant box
|
||||
remove", and other box-related commands such as "outdated", "list", and
|
||||
@ -12,17 +12,17 @@ description: |-
|
||||
|
||||
**Command: `vagrant box`**
|
||||
|
||||
This is the command used to manage (add, remove, etc.) [boxes](/docs/boxes.html).
|
||||
This is the command used to manage (add, remove, etc.) [boxes](/docs/boxes).
|
||||
|
||||
The main functionality of this command is exposed via even more subcommands:
|
||||
|
||||
* [`add`](#box-add)
|
||||
* [`list`](#box-list)
|
||||
* [`outdated`](#box-outdated)
|
||||
* [`prune`](#box-prune)
|
||||
* [`remove`](#box-remove)
|
||||
* [`repackage`](#box-repackage)
|
||||
* [`update`](#box-update)
|
||||
- [`add`](#box-add)
|
||||
- [`list`](#box-list)
|
||||
- [`outdated`](#box-outdated)
|
||||
- [`prune`](#box-prune)
|
||||
- [`remove`](#box-remove)
|
||||
- [`repackage`](#box-repackage)
|
||||
- [`update`](#box-update)
|
||||
|
||||
# Box Add
|
||||
|
||||
@ -31,16 +31,16 @@ The main functionality of this command is exposed via even more subcommands:
|
||||
This adds a box with the given address to Vagrant. The address can be
|
||||
one of three things:
|
||||
|
||||
* A shorthand name from the
|
||||
[public catalog of available Vagrant images](https://vagrantcloud.com/boxes/search),
|
||||
such as "hashicorp/bionic64".
|
||||
- A shorthand name from the
|
||||
[public catalog of available Vagrant images](https://vagrantcloud.com/boxes/search),
|
||||
such as "hashicorp/bionic64".
|
||||
|
||||
* 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
|
||||
variables are respected. HTTPS is also supported.
|
||||
- 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
|
||||
variables are respected. HTTPS is also supported.
|
||||
|
||||
* URL directly a box file. In this case, you must specify a `--name` flag
|
||||
(see below) and versioning/updates will not work.
|
||||
- URL directly a box file. In this case, you must specify a `--name` flag
|
||||
(see below) and versioning/updates will not work.
|
||||
|
||||
If an error occurs during the download or the download is interrupted with
|
||||
a Ctrl-C, then Vagrant will attempt to resume the download the next time it
|
||||
@ -49,32 +49,32 @@ after the initial download.
|
||||
|
||||
## Options
|
||||
|
||||
* `--box-version VALUE` - The version of the box you want to add. By default,
|
||||
- `--box-version VALUE` - The version of the box you want to add. By default,
|
||||
the latest version will be added. The value of this can be an exact version
|
||||
number such as "1.2.3" or it can be a set of version constraints. A version
|
||||
constraint looks like ">= 1.0, < 2.0".
|
||||
|
||||
* `--cacert CERTFILE` - The certificate for the CA used to verify the peer.
|
||||
- `--cacert CERTFILE` - The certificate for the CA used to verify the peer.
|
||||
This should be used if the remote end does not use a standard root CA.
|
||||
|
||||
* `--capath CERTDIR` - The certificate directory for the CA used to verify the peer.
|
||||
- `--capath CERTDIR` - The certificate directory for the CA used to verify the peer.
|
||||
This should be used if the remote end does not use a standard root CA.
|
||||
|
||||
* `--cert CERTFILE` - A client certificate to use when downloading the box, if
|
||||
- `--cert CERTFILE` - A client certificate to use when downloading the box, if
|
||||
necessary.
|
||||
|
||||
* `--clean` - If given, Vagrant will remove any old temporary files from
|
||||
- `--clean` - If given, Vagrant will remove any old temporary files from
|
||||
prior downloads of the same URL. This is useful if you do not want Vagrant
|
||||
to resume a download from a previous point, perhaps because the contents
|
||||
changed.
|
||||
|
||||
* `--force` - When present, the box will be downloaded and overwrite any
|
||||
- `--force` - When present, the box will be downloaded and overwrite any
|
||||
existing box with this name.
|
||||
|
||||
* `--insecure` - When present, SSL certificates will not be verified if the
|
||||
- `--insecure` - When present, SSL certificates will not be verified if the
|
||||
URL is an HTTPS URL.
|
||||
|
||||
* `--provider PROVIDER` - If given, Vagrant will verify the box you are
|
||||
- `--provider PROVIDER` - If given, Vagrant will verify the box you are
|
||||
adding is for the given provider. By default, Vagrant automatically
|
||||
detects the proper provider to use.
|
||||
|
||||
@ -83,27 +83,25 @@ after the initial download.
|
||||
The options below only apply if you are adding a box file directly (when
|
||||
you are not using a catalog).
|
||||
|
||||
* `--checksum VALUE` - A checksum for the box that is downloaded. If specified,
|
||||
- `--checksum VALUE` - A checksum for the box that is downloaded. If specified,
|
||||
Vagrant will compare this checksum to what is actually downloaded and will
|
||||
error if the checksums do not match. This is highly recommended since
|
||||
box files are so large. If this is specified, `--checksum-type` must
|
||||
also be specified. If you are downloading from a catalog, the checksum is
|
||||
included within the catalog entry.
|
||||
|
||||
* `--checksum-type TYPE` - The type of checksum that `--checksum` is if it
|
||||
- `--checksum-type TYPE` - The type of checksum that `--checksum` is if it
|
||||
is specified. Supported values are currently "md5", "sha1", "sha256",
|
||||
"sha384", and "sha512".
|
||||
|
||||
* `--name VALUE` - Logical name for the box. This is the value that you
|
||||
- `--name VALUE` - Logical name for the box. This is the value that you
|
||||
would put into `config.vm.box` in your Vagrantfile. When adding a box from
|
||||
a catalog, the name is included in the catalog entry and does not have
|
||||
to be specified.
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>Checksums for versioned boxes or boxes from HashiCorp's Vagrant Cloud:</strong>
|
||||
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.
|
||||
</div>
|
||||
~> **Checksums for versioned boxes or boxes from HashiCorp's Vagrant Cloud:**
|
||||
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.
|
||||
|
||||
# Box List
|
||||
|
||||
@ -131,8 +129,8 @@ can be ignored if the `--force` flag is used.
|
||||
|
||||
## Options
|
||||
|
||||
* `--force` - Check for updates for all installed boxes and ignore cache interval.
|
||||
* `--global` - Check for updates for all installed boxes, not just the
|
||||
- `--force` - Check for updates for all installed boxes and ignore cache interval.
|
||||
- `--global` - Check for updates for all installed boxes, not just the
|
||||
boxes for the current Vagrant environment.
|
||||
|
||||
# Box Prune
|
||||
@ -143,15 +141,15 @@ This command removes old versions of installed boxes. If the box is currently in
|
||||
|
||||
## Options
|
||||
|
||||
* `--provider PROVIDER` - The specific provider type for the boxes to destroy.
|
||||
- `--provider PROVIDER` - The specific provider type for the boxes to destroy.
|
||||
|
||||
* `--dry-run` - Only print the boxes that would be removed.
|
||||
- `--dry-run` - Only print the boxes that would be removed.
|
||||
|
||||
* `--name NAME` - The specific box name to check for outdated versions.
|
||||
- `--name NAME` - The specific box name to check for outdated versions.
|
||||
|
||||
* `--force` - Destroy without confirmation even when box is in use.
|
||||
- `--force` - Destroy without confirmation even when box is in use.
|
||||
|
||||
* `--keep-active-boxes` - When combined with `--force`, will keep boxes still actively in use.
|
||||
- `--keep-active-boxes` - When combined with `--force`, will keep boxes still actively in use.
|
||||
|
||||
# Box Remove
|
||||
|
||||
@ -166,15 +164,15 @@ with the `--all` flag.
|
||||
|
||||
## Options
|
||||
|
||||
* `--box-version VALUE` - Version of version constraints of the boxes to
|
||||
- `--box-version VALUE` - Version of version constraints of the boxes to
|
||||
remove. See documentation on this flag for `box add` for more details.
|
||||
|
||||
* `--all` - Remove all available versions of a box.
|
||||
- `--all` - Remove all available versions of a box.
|
||||
|
||||
* `--force` - Forces removing the box even if an active Vagrant
|
||||
- `--force` - Forces removing the box even if an active Vagrant
|
||||
environment is using it.
|
||||
|
||||
* `--provider VALUE` - The provider-specific box to remove with the given
|
||||
- `--provider VALUE` - The provider-specific box to remove with the given
|
||||
name. This is only required if a box is backed by multiple providers.
|
||||
If there is only a single provider, Vagrant will default to removing it.
|
||||
|
||||
@ -198,19 +196,19 @@ This command updates the box for the current Vagrant environment if there
|
||||
are updates available. The command can also update a specific box (outside
|
||||
of an active Vagrant environment), by specifying the `--box` flag.
|
||||
|
||||
<small><i>Note that updating the box will not update an already-running Vagrant
|
||||
-> Note that updating the box will not update an already-running Vagrant
|
||||
machine. To reflect the changes in the box, you will have to destroy and
|
||||
bring back up the Vagrant machine.</i></small>
|
||||
bring back up the Vagrant machine.
|
||||
|
||||
If you just want to check if there are updates available, use the
|
||||
`vagrant box outdated` command.
|
||||
|
||||
## Options
|
||||
|
||||
* `--box VALUE` - Name of a specific box to update. If this flag is not
|
||||
- `--box VALUE` - Name of a specific box to update. If this flag is not
|
||||
specified, Vagrant will update the boxes for the active Vagrant
|
||||
environment.
|
||||
|
||||
* `--provider VALUE` - When `--box` is present, this controls what
|
||||
- `--provider VALUE` - When `--box` is present, this controls what
|
||||
provider-specific box to update. This is not required unless the box has
|
||||
multiple providers. Without the `--box` flag, this has no effect.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant cloud - Command-Line Interface"
|
||||
sidebar_current: "cli-cloud"
|
||||
layout: docs
|
||||
page_title: vagrant cloud - Command-Line Interface
|
||||
sidebar_title: cloud
|
||||
description: |-
|
||||
The "vagrant cloud" command can be used for taking actions against
|
||||
Vagrant Cloud like searching or uploading a Vagrant Box
|
||||
@ -15,12 +15,12 @@ This is the command used to manage anything related to [Vagrant Cloud](https://v
|
||||
|
||||
The main functionality of this command is exposed via subcommands:
|
||||
|
||||
* [`auth`](#cloud-auth)
|
||||
* [`box`](#cloud-box)
|
||||
* [`provider`](#cloud-provider)
|
||||
* [`publish`](#cloud-publish)
|
||||
* [`search`](#cloud-search)
|
||||
* [`version`](#cloud-version)
|
||||
- [`auth`](#cloud-auth)
|
||||
- [`box`](#cloud-box)
|
||||
- [`provider`](#cloud-provider)
|
||||
- [`publish`](#cloud-publish)
|
||||
- [`search`](#cloud-search)
|
||||
- [`version`](#cloud-version)
|
||||
|
||||
# Cloud Auth
|
||||
|
||||
@ -29,9 +29,9 @@ The main functionality of this command is exposed via subcommands:
|
||||
The `cloud auth` command is for handling all things related to authorization with
|
||||
Vagrant Cloud.
|
||||
|
||||
* [`login`](#cloud-auth-login)
|
||||
* [`logout`](#cloud-auth-logout)
|
||||
* [`whoami`](#cloud-auth-whoami)
|
||||
- [`login`](#cloud-auth-login)
|
||||
- [`logout`](#cloud-auth-logout)
|
||||
- [`whoami`](#cloud-auth-whoami)
|
||||
|
||||
## Cloud Auth Login
|
||||
|
||||
@ -49,22 +49,22 @@ is available below.
|
||||
|
||||
### Options
|
||||
|
||||
* `--check` - This will check if you are logged in. In addition to outputting
|
||||
- `--check` - This will check if you are logged in. In addition to outputting
|
||||
whether you are logged in or not, the command exit status will be 0 if you are
|
||||
logged in, or 1 if you are not.
|
||||
|
||||
* `--logout` - This will log you out if you are logged in. If you are already
|
||||
- `--logout` - This will log you out if you are logged in. If you are already
|
||||
logged out, this command will do nothing. It is not an error to call this
|
||||
command if you are already logged out.
|
||||
|
||||
* `--token` - This will set the Vagrant Cloud 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 Vagrant Cloud access token.
|
||||
|
||||
### Examples
|
||||
|
||||
Securely authenticate to Vagrant Cloud using a username and password:
|
||||
|
||||
```text
|
||||
```shell-session
|
||||
$ vagrant cloud auth login
|
||||
# ...
|
||||
Vagrant Cloud username:
|
||||
@ -73,14 +73,14 @@ Vagrant Cloud password:
|
||||
|
||||
Check if the current user is authenticated:
|
||||
|
||||
```text
|
||||
```shell-session
|
||||
$ vagrant cloud auth login --check
|
||||
You are already logged in.
|
||||
```
|
||||
|
||||
Securely authenticate with Vagrant Cloud using a token:
|
||||
|
||||
```text
|
||||
```shell-session
|
||||
$ vagrant cloud auth login --token ABCD1234
|
||||
The token was successfully saved.
|
||||
```
|
||||
@ -93,7 +93,7 @@ This will log you out if you are logged in. If you are already
|
||||
logged out, this command will do nothing. It is not an error to call this
|
||||
command if you are already logged out.
|
||||
|
||||
## Cloud Auth Whomi
|
||||
## Cloud Auth Whoami
|
||||
|
||||
**Command: `vagrant cloud auth whoami [TOKEN]`**
|
||||
|
||||
@ -108,10 +108,10 @@ of the token stored stored on disk.
|
||||
The `cloud box` command is used to manage life cycle operations for all `box`
|
||||
entities on Vagrant Cloud.
|
||||
|
||||
* [`create`](#cloud-box-create)
|
||||
* [`delete`](#cloud-box-delete)
|
||||
* [`show`](#cloud-box-show)
|
||||
* [`update`](#cloud-box-update)
|
||||
- [`create`](#cloud-box-create)
|
||||
- [`delete`](#cloud-box-delete)
|
||||
- [`show`](#cloud-box-show)
|
||||
- [`update`](#cloud-box-update)
|
||||
|
||||
## Cloud Box Create
|
||||
|
||||
@ -121,10 +121,10 @@ The box create command is used to create a new box entry on Vagrant Cloud.
|
||||
|
||||
### Options
|
||||
|
||||
* `--description DESCRIPTION` - A full description of the box. Can be
|
||||
- `--description DESCRIPTION` - A full description of the box. Can be
|
||||
formatted with Markdown.
|
||||
* `--short-description DESCRIPTION` - A short summary of the box.
|
||||
* `--private` - Will make the new box private (Public by default)
|
||||
- `--short-description DESCRIPTION` - A short summary of the box.
|
||||
- `--private` - Will make the new box private (Public by default)
|
||||
|
||||
## Cloud Box Delete
|
||||
|
||||
@ -147,10 +147,10 @@ The box update command will update an already created box on Vagrant Cloud with
|
||||
|
||||
### Options
|
||||
|
||||
* `--description DESCRIPTION` - A full description of the box. Can be
|
||||
- `--description DESCRIPTION` - A full description of the box. Can be
|
||||
formatted with Markdown.
|
||||
* `--short-description DESCRIPTION` - A short summary of the box.
|
||||
* `--private` - Will make the new box private (Public by default)
|
||||
- `--short-description DESCRIPTION` - A short summary of the box.
|
||||
- `--private` - Will make the new box private (Public by default)
|
||||
|
||||
# Cloud Provider
|
||||
|
||||
@ -159,10 +159,10 @@ The box update command will update an already created box on Vagrant Cloud with
|
||||
The `cloud provider` command is used to manage the life cycle operations for all
|
||||
`provider` entities on Vagrant Cloud.
|
||||
|
||||
* [`create`](#cloud-provider-create)
|
||||
* [`delete`](#cloud-provider-delete)
|
||||
* [`update`](#cloud-provider-update)
|
||||
* [`upload`](#cloud-provider-upload)
|
||||
- [`create`](#cloud-provider-create)
|
||||
- [`delete`](#cloud-provider-delete)
|
||||
- [`update`](#cloud-provider-update)
|
||||
- [`upload`](#cloud-provider-upload)
|
||||
|
||||
## Cloud Provider Create
|
||||
|
||||
@ -172,7 +172,7 @@ The provider create command is used to create a new provider entry on Vagrant Cl
|
||||
The `url` argument is expected to be a remote URL that Vagrant Cloud can use
|
||||
to download the provider. If no `url` is specified, the provider entry can be updated
|
||||
later with a url or the [upload](#cloud-provider-upload) command can be used to
|
||||
upload a Vagrant [box file](/docs/boxes.html).
|
||||
upload a Vagrant [box file](/docs/boxes).
|
||||
|
||||
## Cloud Provider Delete
|
||||
|
||||
@ -192,7 +192,7 @@ Vagrant Cloud with the given options.
|
||||
|
||||
**Command: `vagrant cloud provider upload ORGANIZATION/BOX-NAME PROVIDER-NAME VERSION BOX-FILE`**
|
||||
|
||||
The provider upload command will upload a Vagrant [box file](/docs/boxes.html) to Vagrant Cloud for
|
||||
The provider upload command will upload a Vagrant [box file](/docs/boxes) to Vagrant Cloud for
|
||||
the specified version and provider.
|
||||
|
||||
# Cloud Publish
|
||||
@ -206,21 +206,21 @@ the information required before creating or updating a new box.
|
||||
|
||||
## Options
|
||||
|
||||
* `--box-version VERSION` - Version to create for the box
|
||||
* `--description DESCRIPTION` - A full description of the box. Can be
|
||||
- `--box-version VERSION` - Version to create for the box
|
||||
- `--description DESCRIPTION` - A full description of the box. Can be
|
||||
formatted with Markdown.
|
||||
* `--force` - Disables confirmation when creating or updating a box.
|
||||
* `--short-description DESCRIPTION` - A short summary of the box.
|
||||
* `--private` - Will make the new box private (Public by default)
|
||||
* `--release` - Automatically releases the box after creation (Unreleased by default)
|
||||
* `--url` - Valid remote URL to download the box file
|
||||
* `--version-description DESCRIPTION` - Description of the version that will be created.
|
||||
- `--force` - Disables confirmation when creating or updating a box.
|
||||
- `--short-description DESCRIPTION` - A short summary of the box.
|
||||
- `--private` - Will make the new box private (Public by default)
|
||||
- `--release` - Automatically releases the box after creation (Unreleased by default)
|
||||
- `--url` - Valid remote URL to download the box file
|
||||
- `--version-description DESCRIPTION` - Description of the version that will be created.
|
||||
|
||||
## Examples
|
||||
|
||||
Creating a new box on Vagrant Cloud:
|
||||
|
||||
```text
|
||||
```shell-session
|
||||
$ vagrant cloud publish briancain/supertest 1.0.0 virtualbox boxes/my/virtualbox.box -d "A really cool box to download and use" --version-description "A cool version" --release --short-description "Download me!"
|
||||
You are about to create a box on Vagrant Cloud with the following options:
|
||||
briancain/supertest (1.0.0) for virtualbox
|
||||
@ -257,15 +257,15 @@ Vagrant boxes. Various filters can be applied to the results.
|
||||
|
||||
## Options
|
||||
|
||||
* `--json` - Format search results in JSON.
|
||||
* `--page PAGE` - The page to display. Defaults to the first page of results.
|
||||
* `--short` - Shows a simple list of box names for the results.
|
||||
* `--order ORDER` - Order to display results. Can either be `desc` or `asc`.
|
||||
Defaults to `desc`.
|
||||
* `--limit LIMIT` - Max number of search results to display. Defaults to 25.
|
||||
* `--provider PROVIDER` - Filter search results to a single provider.
|
||||
* `--sort-by SORT` - The field to sort results on. Can be `created`, `downloads`
|
||||
, or `updated`. Defaults to `downloads`.
|
||||
- `--json` - Format search results in JSON.
|
||||
- `--page PAGE` - The page to display. Defaults to the first page of results.
|
||||
- `--short` - Shows a simple list of box names for the results.
|
||||
- `--order ORDER` - Order to display results. Can either be `desc` or `asc`.
|
||||
Defaults to `desc`.
|
||||
- `--limit LIMIT` - Max number of search results to display. Defaults to 25.
|
||||
- `--provider PROVIDER` - Filter search results to a single provider.
|
||||
- `--sort-by SORT` - The field to sort results on. Can be `created`, `downloads`
|
||||
, or `updated`. Defaults to `downloads`.
|
||||
|
||||
## Examples
|
||||
|
||||
@ -290,11 +290,11 @@ vagrant cloud search hashicorp --limit 5
|
||||
The `cloud version` command is used to manage life cycle operations for all `version`
|
||||
entities for a box on Vagrant Cloud.
|
||||
|
||||
* [`create`](#cloud-version-create)
|
||||
* [`delete`](#cloud-version-delete)
|
||||
* [`release`](#cloud-version-release)
|
||||
* [`revoke`](#cloud-version-revoke)
|
||||
* [`update`](#cloud-version-update)
|
||||
- [`create`](#cloud-version-create)
|
||||
- [`delete`](#cloud-version-delete)
|
||||
- [`release`](#cloud-version-release)
|
||||
- [`revoke`](#cloud-version-revoke)
|
||||
- [`update`](#cloud-version-update)
|
||||
|
||||
## Cloud Version Create
|
||||
|
||||
@ -304,7 +304,7 @@ The cloud create command creates a version entry for a box on Vagrant Cloud.
|
||||
|
||||
### Options
|
||||
|
||||
* `--description DESCRIPTION` - Description of the version that will be created.
|
||||
- `--description DESCRIPTION` - Description of the version that will be created.
|
||||
|
||||
## Cloud Version Delete
|
||||
|
||||
@ -335,4 +335,4 @@ want to revoke the version.
|
||||
|
||||
### Options
|
||||
|
||||
* `--description DESCRIPTION` - Description of the version that will be created.
|
||||
- `--description DESCRIPTION` - Description of the version that will be created.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant connect - Command-Line Interface"
|
||||
sidebar_current: "cli-connect"
|
||||
layout: docs
|
||||
page_title: vagrant connect - Command-Line Interface
|
||||
sidebar_title: connect
|
||||
description: |-
|
||||
The "vagrant connect" command compliments the "vagrant share" command to allow
|
||||
a user to remotely connect to your Vagrant environment.
|
||||
@ -12,7 +12,7 @@ description: |-
|
||||
**Command: `vagrant connect NAME`**
|
||||
|
||||
The connect command complements the
|
||||
[share command](/docs/cli/share.html) by enabling access to shared
|
||||
[share command](/docs/cli/share) by enabling access to shared
|
||||
environments. You can learn about all the details of Vagrant Share in the
|
||||
[Vagrant Share section](/docs/share/).
|
||||
|
||||
@ -21,14 +21,14 @@ is available below.
|
||||
|
||||
## Options
|
||||
|
||||
* `--disable-static-ip` - The connect command will not spin up a small
|
||||
- `--disable-static-ip` - The connect command will not spin up a small
|
||||
virtual machine to create a static IP you can access. When this flag is
|
||||
set, the only way to access the connection is to use the SOCKS proxy
|
||||
address outputted.
|
||||
|
||||
* `--static-ip IP` - Tells connect what static IP address to use for the virtual
|
||||
- `--static-ip IP` - Tells connect what static IP address to use for the virtual
|
||||
machine. By default, Vagrant connect will use an IP address that looks
|
||||
available in the 172.16.0.0/16 space.
|
||||
|
||||
* `--ssh` - Connects via SSH to an environment shared with
|
||||
- `--ssh` - Connects via SSH to an environment shared with
|
||||
`vagrant share --ssh`.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant destroy - Command-Line Interface"
|
||||
sidebar_current: "cli-destroy"
|
||||
layout: docs
|
||||
page_title: vagrant destroy - Command-Line Interface
|
||||
sidebar_title: destroy
|
||||
description: |-
|
||||
The "vagrant destroy" command is used to stop the running virtual machine and
|
||||
terminate use of all resources that were in use by that machine.
|
||||
@ -24,18 +24,15 @@ directory containing the `shutdown` command.
|
||||
|
||||
## Options
|
||||
|
||||
* `-f` or `--force` - Do not ask for confirmation before destroying.
|
||||
* `--[no-]parallel` - Destroys multiple machines in parallel if the provider
|
||||
- `-f` or `--force` - Do not ask for confirmation before destroying.
|
||||
- `--[no-]parallel` - Destroys multiple machines in parallel if the provider
|
||||
supports it. Please consult the provider documentation to see if this feature
|
||||
is supported.
|
||||
|
||||
<div class="alert alert-info">
|
||||
The `destroy` command does not remove a box that may have been installed on
|
||||
your computer during `vagrant up`. Thus, even if you run `vagrant destroy`,
|
||||
the box installed in the system will still be present on the hard drive. To
|
||||
return your computer to the state as it was before `vagrant up` command, you
|
||||
need to use `vagrant box remove`.
|
||||
-> The `destroy` command does not remove a box that may have been installed on
|
||||
your computer during `vagrant up`. Thus, even if you run `vagrant destroy`,
|
||||
the box installed in the system will still be present on the hard drive. To
|
||||
return your computer to the state as it was before `vagrant up` command, you
|
||||
need to use `vagrant box remove`.
|
||||
|
||||
For more information, read about the
|
||||
<a href="/docs/cli/box.html">`vagrant box remove`</a> command.
|
||||
</div>
|
||||
For more information, read about the [`vagrant box remove`](/docs/cli/box) command.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant global-status - Command-Line Interface"
|
||||
sidebar_current: "cli-globalstatus"
|
||||
layout: docs
|
||||
page_title: vagrant global-status - Command-Line Interface
|
||||
sidebar_title: global-status
|
||||
description: |-
|
||||
The "vagrant global-status" command is used to determine the state of all
|
||||
active Vagrant environments on the system for the currently logged in user.
|
||||
@ -27,7 +27,7 @@ used with this ID to control it. For example: `vagrant destroy a1b2c3`.
|
||||
|
||||
## Options
|
||||
|
||||
* `--prune` - Prunes invalid entries from the list. This is much more time
|
||||
- `--prune` - Prunes invalid entries from the list. This is much more time
|
||||
consuming than simply listing the entries.
|
||||
|
||||
## Environment Not Showing Up
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant halt - Command-Line Interface"
|
||||
sidebar_current: "cli-halt"
|
||||
layout: docs
|
||||
page_title: vagrant halt - Command-Line Interface
|
||||
sidebar_title: halt
|
||||
description: |-
|
||||
The "vagrant halt" command is used to shut down the virtual machine that
|
||||
Vagrant is currently managing.
|
||||
@ -25,5 +25,5 @@ directory containing the `shutdown` command.
|
||||
|
||||
## Options
|
||||
|
||||
* `-f` or `--force` - Do not attempt to gracefully shut down the machine.
|
||||
- `-f` or `--force` - Do not attempt to gracefully shut down the machine.
|
||||
This effectively pulls the power on the guest machine.
|
||||
@ -1,9 +1,8 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Command-Line Interface"
|
||||
sidebar_current: "cli"
|
||||
description: |-
|
||||
Almost all interaction with Vagrant is done via the command-line interface.
|
||||
layout: docs
|
||||
page_title: Command-Line Interface
|
||||
sidebar_title: Commands (CLI)
|
||||
description: Almost all interaction with Vagrant is done via the command-line interface.
|
||||
---
|
||||
|
||||
# Command-Line Interface
|
||||
@ -27,6 +26,6 @@ available by reading the appropriate sub-section available in the left
|
||||
navigational area of this site.
|
||||
|
||||
You may also wish to consult the
|
||||
[documentation](/docs/other/environmental-variables.html) regarding the
|
||||
[documentation](/docs/other/environmental-variables) regarding the
|
||||
environmental variables that can be used to configure and control
|
||||
Vagrant in a global way.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant init - Command-Line Interface"
|
||||
sidebar_current: "cli-init"
|
||||
layout: docs
|
||||
page_title: vagrant init - Command-Line Interface
|
||||
sidebar_title: init
|
||||
description: |-
|
||||
The "vagrant init" command is used to initialize the current directory to be
|
||||
a Vagrant environment by creating an initial Vagrantfile.
|
||||
@ -23,49 +23,49 @@ setting in the created Vagrantfile.
|
||||
|
||||
## Options
|
||||
|
||||
* `--box-version` - (Optional) The box version or box version constraint to add
|
||||
- `--box-version` - (Optional) The box version or box version constraint to add
|
||||
to the `Vagrantfile`.
|
||||
|
||||
* `--force` - If specified, this command will overwrite any existing
|
||||
- `--force` - If specified, this command will overwrite any existing
|
||||
`Vagrantfile`.
|
||||
|
||||
* `--minimal` - If specified, a minimal Vagrantfile will be created. This
|
||||
- `--minimal` - If specified, a minimal Vagrantfile will be created. This
|
||||
Vagrantfile does not contain the instructional comments that the normal
|
||||
Vagrantfile contains.
|
||||
|
||||
* `--output FILE` - This will output the Vagrantfile to the given file.
|
||||
- `--output FILE` - This will output the Vagrantfile to the given file.
|
||||
If this is "-", the Vagrantfile will be sent to stdout.
|
||||
|
||||
* `--template FILE` - Provide a custom ERB template for generating the Vagrantfile.
|
||||
- `--template FILE` - Provide a custom ERB template for generating the Vagrantfile.
|
||||
|
||||
## Examples
|
||||
|
||||
Create a base Vagrantfile:
|
||||
|
||||
```sh
|
||||
```shell-session
|
||||
$ vagrant init hashicorp/bionic64
|
||||
```
|
||||
|
||||
Create a minimal Vagrantfile (no comments or helpers):
|
||||
|
||||
```sh
|
||||
```shell-session
|
||||
$ vagrant init -m hashicorp/bionic64
|
||||
```
|
||||
|
||||
Create a new Vagrantfile, overwriting the one at the current path:
|
||||
|
||||
```sh
|
||||
```shell-session
|
||||
$ vagrant init -f hashicorp/bionic64
|
||||
```
|
||||
|
||||
Create a Vagrantfile with the specific box, from the specific box URL:
|
||||
|
||||
```sh
|
||||
```shell-session
|
||||
$ vagrant init my-company-box https://example.com/my-company.box
|
||||
```
|
||||
|
||||
Create a Vagrantfile, locking the box to a version constraint:
|
||||
|
||||
```sh
|
||||
```shell-session
|
||||
$ vagrant init --box-version '> 0.1.5' hashicorp/bionic64
|
||||
```
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant login - Command-Line Interface"
|
||||
sidebar_current: "cli-login"
|
||||
layout: docs
|
||||
page_title: vagrant login - Command-Line Interface
|
||||
sidebar_title: login
|
||||
description: |-
|
||||
The "vagrant login" command is used to authenticate Vagrant with HashiCorp's
|
||||
Vagrant Cloud service to use features like private boxes and "vagrant push".
|
||||
@ -23,26 +23,24 @@ boxes or [Vagrant Share](/docs/share/) require a login.
|
||||
The reference of available command-line flags to this command
|
||||
is available below.
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
* `--check` - This will check if you are logged in. In addition to outputting
|
||||
- `--check` - This will check if you are logged in. In addition to outputting
|
||||
whether you are logged in or not, the command will have exit status 0 if you are
|
||||
logged in, and exit status 1 if you are not.
|
||||
|
||||
* `--logout` - This will log you out if you are logged in. If you are already
|
||||
- `--logout` - This will log you out if you are logged in. If you are already
|
||||
logged out, this command will do nothing. It is not an error to call this
|
||||
command if you are already logged out.
|
||||
|
||||
* `--token` - This will set the Vagrant Cloud 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 Vagrant Cloud access token.
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
Securely authenticate to Vagrant Cloud using a username and password:
|
||||
|
||||
```text
|
||||
```shell-session
|
||||
$ vagrant login
|
||||
# ...
|
||||
Vagrant Cloud username:
|
||||
@ -51,14 +49,14 @@ Vagrant Cloud password:
|
||||
|
||||
Check if the current user is authenticated:
|
||||
|
||||
```text
|
||||
```shell-session
|
||||
$ vagrant login --check
|
||||
You are already logged in.
|
||||
```
|
||||
|
||||
Securely authenticate with Vagrant Cloud using a token:
|
||||
|
||||
```text
|
||||
```shell-session
|
||||
$ vagrant login --token ABCD1234
|
||||
The token was successfully saved.
|
||||
```
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Machine Readable Output - Command-Line Interface"
|
||||
sidebar_current: "cli-machinereadable"
|
||||
layout: docs
|
||||
page_title: Machine Readable Output - Command-Line Interface
|
||||
sidebar_title: Machine Readable Output
|
||||
description: |-
|
||||
Almost all commands in Vagrant accept a --machine-readable flag to enable
|
||||
machine-readable output mode.
|
||||
@ -15,17 +15,15 @@ is replaced with machine-friendly output.
|
||||
|
||||
This mode makes it easy to programmatically execute Vagrant and read data
|
||||
out of it. This output format is protected by our
|
||||
[backwards compatibility](/docs/installation/backwards-compatibility.html)
|
||||
[backwards compatibility](/docs/installation/backwards-compatibility)
|
||||
policy. Until Vagrant 2.0 is released, however, the machine readable output
|
||||
may change as we determine more use cases for it. But the backwards
|
||||
compatibility promise should make it safe to write client libraries to
|
||||
parse the output format.
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>Advanced topic!</strong> This is an advanced topic for use only if
|
||||
you want to programmatically execute Vagrant. If you are just getting started
|
||||
with Vagrant, you may safely skip this section.
|
||||
</div>
|
||||
~> **Advanced topic!** This is an advanced topic for use only if
|
||||
you want to programmatically execute Vagrant. If you are just getting started
|
||||
with Vagrant, you may safely skip this section.
|
||||
|
||||
## Work-In-Progress
|
||||
|
||||
@ -53,16 +51,16 @@ timestamp,target,type,data...
|
||||
|
||||
Each component is explained below:
|
||||
|
||||
* **timestamp** is a Unix timestamp in UTC of when the message was printed.
|
||||
- **timestamp** is a Unix timestamp in UTC of when the message was printed.
|
||||
|
||||
* **target** is the target of the following output. This is empty if the
|
||||
- **target** is the target of the following output. This is empty if the
|
||||
message is related to Vagrant globally. Otherwise, this is generally a machine
|
||||
name so you can relate output to a specific machine when multi-VM is in use.
|
||||
|
||||
* **type** is the type of machine-readable message being outputted. There are
|
||||
- **type** is the type of machine-readable message being outputted. There are
|
||||
a set of standard types which are covered later.
|
||||
|
||||
* **data** is zero or more comma-separated values associated with the prior
|
||||
- **data** is zero or more comma-separated values associated with the prior
|
||||
type. The exact amount and meaning of this data is type-dependent, so you
|
||||
must read the documentation associated with the type to understand fully.
|
||||
|
||||
@ -79,84 +77,14 @@ become a literal `\r`.
|
||||
This section documents all the available types that may be outputted
|
||||
with the machine-readable output.
|
||||
|
||||
<table class="table table-hover table-bordered mr-types">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="mr-type">Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td>box-name</td>
|
||||
<td>
|
||||
Name of a box installed into Vagrant.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>box-provider</td>
|
||||
<td>
|
||||
Provider for an installed box.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>cli-command</td>
|
||||
<td>
|
||||
A subcommand of <code>vagrant</code> that is available.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>error-exit</td>
|
||||
<td>
|
||||
An error occurred that caused Vagrant to exit. This contains that
|
||||
error. Contains two data elements: type of error, error message.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>provider-name</td>
|
||||
<td>
|
||||
The provider name of the target machine.
|
||||
<span class="label">targeted</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>ssh-config</td>
|
||||
<td>
|
||||
The OpenSSH compatible SSH config for a machine. This is usually
|
||||
the result of the "ssh-config" command.
|
||||
<span class="label">targeted</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>state</td>
|
||||
<td>
|
||||
The state ID of the target machine.
|
||||
<span class="label">targeted</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>state-human-long</td>
|
||||
<td>
|
||||
Human-readable description of the state of the machine. This is the
|
||||
long version, and may be a paragraph or longer.
|
||||
<span class="label">targeted</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>state-human-short</td>
|
||||
<td>
|
||||
Human-readable description of the state of the machine. This is the
|
||||
short version, limited to at most a sentence.
|
||||
<span class="label">targeted</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
| Type | Description |
|
||||
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| box-name | Name of a box installed into Vagrant. |
|
||||
| box-provider | Provider for an installed box. |
|
||||
| cli-command | A subcommand of vagrant that is available. |
|
||||
| error-exit | An error occurred that caused Vagrant to exit. This contains that error. Contains two data elements: type of error, error message. |
|
||||
| provider-name | The provider name of the target machine. `targeted` |
|
||||
| ssh-config | The OpenSSH compatible SSH config for a machine. This is usually the result of the "ssh-config" command. `targeted` |
|
||||
| state | The state ID of the target machine. `targeted` |
|
||||
| state-human-long | Human-readable description of the state of the machine. This is the long version, and may be a paragraph or longer. `targeted` |
|
||||
| state-human-short | Human-readable description of the state of the machine. This is the short version, limited to at most a sentence. `targeted` |
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "More Vagrant Commands - Command-Line Interface"
|
||||
sidebar_current: "cli-nonprimary"
|
||||
layout: docs
|
||||
page_title: More Vagrant Commands - Command-Line Interface
|
||||
sidebar_title: More Commands
|
||||
description: |-
|
||||
In addition to the commands listed in the sidebar and shown in "vagrant -h",
|
||||
Vagrant comes with some more commands that are hidden from basic help output.
|
||||
@ -27,8 +27,8 @@ non-primary subcommands. They're executed just like any other subcommand:
|
||||
The list of non-primary commands is below. Click on any command to learn
|
||||
more about it.
|
||||
|
||||
* [docker-exec](/docs/docker/commands.html)
|
||||
* [docker-logs](/docs/docker/commands.html)
|
||||
* [docker-run](/docs/docker/commands.html)
|
||||
* [rsync](/docs/cli/rsync.html)
|
||||
* [rsync-auto](/docs/cli/rsync-auto.html)
|
||||
- [docker-exec](/docs/docker/commands)
|
||||
- [docker-logs](/docs/docker/commands)
|
||||
- [docker-run](/docs/docker/commands)
|
||||
- [rsync](/docs/cli/rsync)
|
||||
- [rsync-auto](/docs/cli/rsync-auto)
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant package - Command-Line Interface"
|
||||
sidebar_current: "cli-package"
|
||||
layout: docs
|
||||
page_title: vagrant package - Command-Line Interface
|
||||
sidebar_title: package
|
||||
description: |-
|
||||
The "vagrant package" command is used to package a currently-running
|
||||
VirtualBox or Hyper-V vagrant environment into a reusable Vagrant box.
|
||||
@ -12,33 +12,30 @@ description: |-
|
||||
**Command: `vagrant package [name|id]`**
|
||||
|
||||
This packages a currently running _VirtualBox_ or _Hyper-V_ environment into a
|
||||
re-usable [box](/docs/boxes.html). This command can only be used with
|
||||
re-usable [box](/docs/boxes). This command can only be used with
|
||||
other [providers](/docs/providers/) based on the provider implementation
|
||||
and if the provider supports it.
|
||||
|
||||
## Options
|
||||
|
||||
* `--base NAME` - Instead of packaging a VirtualBox machine that Vagrant
|
||||
- `--base NAME` - Instead of packaging a VirtualBox machine that Vagrant
|
||||
manages, this will package a VirtualBox machine that VirtualBox manages.
|
||||
`NAME` should be the name or UUID of the machine from the VirtualBox GUI.
|
||||
Currently this option is only available for VirtualBox.
|
||||
|
||||
* `--output NAME` - The resulting package will be saved as `NAME`. By default,
|
||||
- `--output NAME` - The resulting package will be saved as `NAME`. By default,
|
||||
it will be saved as `package.box`.
|
||||
|
||||
* `--include x,y,z` - Additional files will be packaged with the box. These
|
||||
- `--include x,y,z` - Additional files will be packaged with the box. These
|
||||
can be used by a packaged Vagrantfile (documented below) to perform additional
|
||||
tasks.
|
||||
|
||||
* `--vagrantfile FILE` - Packages a Vagrantfile with the box, that is loaded
|
||||
- `--vagrantfile FILE` - Packages a Vagrantfile with the box, that is loaded
|
||||
as part of the [Vagrantfile load order](/docs/vagrantfile/#load-order)
|
||||
when the resulting box is used.
|
||||
|
||||
<div class="alert alert-info">
|
||||
<strong>A common misconception</strong> is that the <code>--vagrantfile</code>
|
||||
option will package a Vagrantfile that is used when <code>vagrant init</code>
|
||||
is used with this box. This is not the case. Instead, a Vagrantfile
|
||||
is loaded and read as part of the Vagrant load process when the box is
|
||||
used. For more information, read about the
|
||||
<a href="/docs/vagrantfile/#load-order">Vagrantfile load order</a>.
|
||||
</div>
|
||||
-> **A common misconception** is that the `--vagrantfile`
|
||||
option will package a Vagrantfile that is used when `vagrant init`
|
||||
is used with this box. This is not the case. Instead, a Vagrantfile
|
||||
is loaded and read as part of the Vagrant load process when the box is
|
||||
used. For more information, read about the [Vagrantfile load order](/docs/vagrantfile/#load-order).
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant plugin - Command-Line Interface"
|
||||
sidebar_current: "cli-plugin"
|
||||
layout: docs
|
||||
page_title: vagrant plugin - Command-Line Interface
|
||||
sidebar_title: plugin
|
||||
description: |-
|
||||
The "vagrant plugin" command is used to manage Vagrant plugins including
|
||||
installing, uninstalling, and license management.
|
||||
@ -16,13 +16,13 @@ This is the command used to manage [plugins](/docs/plugins/).
|
||||
The main functionality of this command is exposed via another level
|
||||
of subcommands:
|
||||
|
||||
* [`expunge`](#plugin-expunge)
|
||||
* [`install`](#plugin-install)
|
||||
* [`license`](#plugin-license)
|
||||
* [`list`](#plugin-list)
|
||||
* [`repair`](#plugin-repair)
|
||||
* [`uninstall`](#plugin-uninstall)
|
||||
* [`update`](#plugin-update)
|
||||
- [`expunge`](#plugin-expunge)
|
||||
- [`install`](#plugin-install)
|
||||
- [`license`](#plugin-license)
|
||||
- [`list`](#plugin-list)
|
||||
- [`repair`](#plugin-repair)
|
||||
- [`uninstall`](#plugin-uninstall)
|
||||
- [`update`](#plugin-update)
|
||||
|
||||
# Plugin Expunge
|
||||
|
||||
@ -37,18 +37,18 @@ an internal incompatibility. The expunge command can help make that process
|
||||
easier by attempting to automatically reinstall currently configured
|
||||
plugins:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
# Delete all plugins and reinstall
|
||||
$ vagrant plugin expunge --reinstall
|
||||
```
|
||||
|
||||
This command accepts optional command-line flags:
|
||||
|
||||
* `--force` - Do not prompt for confirmation prior to removal
|
||||
* `--global-only` - Only expunge global plugins
|
||||
* `--local` - Include plugins in local project
|
||||
* `--local-only` - Only expunge local project plugins
|
||||
* `--reinstall` - Attempt to reinstall plugins after removal
|
||||
- `--force` - Do not prompt for confirmation prior to removal
|
||||
- `--global-only` - Only expunge global plugins
|
||||
- `--local` - Include plugins in local project
|
||||
- `--local-only` - Only expunge local project plugins
|
||||
- `--reinstall` - Attempt to reinstall plugins after removal
|
||||
|
||||
# Plugin Install
|
||||
|
||||
@ -60,7 +60,7 @@ repositories, usually [RubyGems](https://rubygems.org). This command will
|
||||
also update a plugin if it is already installed, but you can also use
|
||||
`vagrant plugin update` for that.
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
# Installing a plugin from a known gem source
|
||||
$ vagrant plugin install my-plugin
|
||||
|
||||
@ -77,23 +77,23 @@ the latest version available.
|
||||
|
||||
This command accepts optional command-line flags:
|
||||
|
||||
* `--entry-point ENTRYPOINT` - By default, installed plugins are loaded
|
||||
- `--entry-point ENTRYPOINT` - By default, installed plugins are loaded
|
||||
internally by loading an initialization file of the same name as the plugin.
|
||||
Most of the time, this is correct. If the plugin you are installing has
|
||||
another entrypoint, this flag can be used to specify it.
|
||||
|
||||
* `--local` - Install plugin to the local Vagrant project only.
|
||||
- `--local` - Install plugin to the local Vagrant project only.
|
||||
|
||||
* `--plugin-clean-sources` - Clears all sources that have been defined so
|
||||
- `--plugin-clean-sources` - Clears all sources that have been defined so
|
||||
far. This is an advanced feature. The use case is primarily for corporate
|
||||
firewalls that prevent access to RubyGems.org.
|
||||
|
||||
* `--plugin-source SOURCE` - Adds a source from which to fetch a plugin. Note
|
||||
- `--plugin-source SOURCE` - Adds a source from which to fetch a plugin. Note
|
||||
that this does not only affect the single plugin being installed, by all future
|
||||
plugin as well. This is a limitation of the underlying plugin installer
|
||||
Vagrant uses.
|
||||
|
||||
* `--plugin-version VERSION` - The version of the plugin to install. By default,
|
||||
- `--plugin-version VERSION` - The version of the plugin to install. By default,
|
||||
this command will install the latest version. You can constrain the version
|
||||
using this flag. You can set it to a specific version, such as "1.2.3" or
|
||||
you can set it to a version constraint, such as "> 1.0.2". You can set it
|
||||
@ -118,7 +118,7 @@ be shown, too.
|
||||
|
||||
This command accepts optional command-line flags:
|
||||
|
||||
* `--local` - Include local project plugins.
|
||||
- `--local` - Include local project plugins.
|
||||
|
||||
# Plugin Repair
|
||||
|
||||
@ -132,7 +132,7 @@ command
|
||||
|
||||
This command accepts optional command-line flags:
|
||||
|
||||
* `--local` - Repair local project plugins.
|
||||
- `--local` - Repair local project plugins.
|
||||
|
||||
# Plugin Uninstall
|
||||
|
||||
@ -145,7 +145,7 @@ If multiple plugins are given, multiple plugins will be uninstalled.
|
||||
|
||||
This command accepts optional command-line flags:
|
||||
|
||||
* `--local` - Uninstall plugin from local project.
|
||||
- `--local` - Uninstall plugin from local project.
|
||||
|
||||
# Plugin Update
|
||||
|
||||
@ -162,4 +162,4 @@ install it.
|
||||
|
||||
This command accepts optional command-line flags:
|
||||
|
||||
* `--local` - Update plugin from local project.
|
||||
- `--local` - Update plugin from local project.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant port - Command-Line Interface"
|
||||
sidebar_current: "cli-port"
|
||||
layout: docs
|
||||
page_title: vagrant port - Command-Line Interface
|
||||
sidebar_title: port
|
||||
description: |-
|
||||
The "vagrant port" command is used to display the full list of guest ports
|
||||
mapped to the host machine ports.
|
||||
@ -14,7 +14,7 @@ description: |-
|
||||
The port command displays the full list of guest ports mapped to the host
|
||||
machine ports:
|
||||
|
||||
```
|
||||
```shell-session
|
||||
$ vagrant port
|
||||
22 (guest) => 2222 (host)
|
||||
80 (guest) => 8080 (host)
|
||||
@ -22,18 +22,20 @@ $ vagrant port
|
||||
|
||||
In a multi-machine Vagrantfile, the name of the machine must be specified:
|
||||
|
||||
```
|
||||
```shell-session
|
||||
$ vagrant port my-machine
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
* `--guest PORT` - This displays just the host port that corresponds to the
|
||||
- `--guest PORT` - This displays just the host port that corresponds to the
|
||||
given guest port. If the guest is not forwarding that port, an error is
|
||||
returned. This is useful for quick scripting, for example:
|
||||
|
||||
$ ssh -p $(vagrant port --guest 22)
|
||||
```shell-session
|
||||
$ ssh -p $(vagrant port --guest 22)
|
||||
```
|
||||
|
||||
* `--machine-readable` - This tells Vagrant to display machine-readable output
|
||||
- `--machine-readable` - This tells Vagrant to display machine-readable output
|
||||
instead of the human-friendly output. More information is available in the
|
||||
[machine-readable output](/docs/cli/machine-readable.html) documentation.
|
||||
[machine-readable output](/docs/cli/machine-readable) documentation.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant powershell - Command-Line Interface"
|
||||
sidebar_current: "cli-powershell"
|
||||
layout: docs
|
||||
page_title: vagrant powershell - Command-Line Interface
|
||||
sidebar_title: powershell
|
||||
description: |-
|
||||
The "vagrant powershell" command is used to open a powershell prompt running
|
||||
inside the guest machine.
|
||||
@ -19,5 +19,5 @@ with this command.
|
||||
|
||||
## Options
|
||||
|
||||
* `-c COMMAND` or `--command COMMAND` - This executes a single PowerShell command,
|
||||
- `-c COMMAND` or `--command COMMAND` - This executes a single PowerShell command,
|
||||
prints out the stdout and stderr, and exits.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant provision - Command-Line Interface"
|
||||
sidebar_current: "cli-provision"
|
||||
layout: docs
|
||||
page_title: vagrant provision - Command-Line Interface
|
||||
sidebar_title: provision
|
||||
description: |-
|
||||
The "vagrant provision" command is used to run any provisioners configured
|
||||
for the guest machine, such as Puppet, Chef, Ansible, Salt, or Shell.
|
||||
@ -22,7 +22,7 @@ Rinse and repeat.
|
||||
|
||||
# Options
|
||||
|
||||
* `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
- `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
example, if you have a `:shell` and `:chef_solo` provisioner and run
|
||||
`vagrant provision --provision-with shell`, only the shell provisioner will
|
||||
be run.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant rdp - Command-Line Interface"
|
||||
sidebar_current: "cli-rdp"
|
||||
layout: docs
|
||||
page_title: vagrant rdp - Command-Line Interface
|
||||
sidebar_title: rdp
|
||||
description: |-
|
||||
The "vagrant rdp" command is used to start an RDP client for a remote desktop
|
||||
session with the guest machine.
|
||||
@ -21,19 +21,18 @@ You can pass raw arguments through to your RDP client on the
|
||||
command-line by appending it after a `--`. Vagrant just passes
|
||||
these through. For example:
|
||||
|
||||
```
|
||||
```shell-session
|
||||
$ vagrant rdp -- /span
|
||||
```
|
||||
|
||||
The above command on Windows will execute `mstsc.exe /span config.rdp`,
|
||||
allowing your RDP to span multiple desktops.
|
||||
|
||||
|
||||
On Darwin hosts, such as Mac OS X, the additional arguments are added to the
|
||||
generated RDP configuration file. Since these files can contain multiple options
|
||||
with different spacing, you _must_ quote multiple arguments. For example:
|
||||
|
||||
```
|
||||
```shell-session
|
||||
$ vagrant rdp -- "screen mode id:i:0" "other config:s:value"
|
||||
```
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant reload - Command-Line Interface"
|
||||
sidebar_current: "cli-reload"
|
||||
layout: docs
|
||||
page_title: vagrant reload - Command-Line Interface
|
||||
sidebar_title: reload
|
||||
description: |-
|
||||
The "vagrant reload" command is the equivalent of running "vagrant halt"
|
||||
followed by "vagrant up".
|
||||
@ -11,8 +11,8 @@ description: |-
|
||||
|
||||
**Command: `vagrant reload [name|id]`**
|
||||
|
||||
The equivalent of running a [halt](/docs/cli/halt.html) followed by an
|
||||
[up](/docs/cli/up.html).
|
||||
The equivalent of running a [halt](/docs/cli/halt) followed by an
|
||||
[up](/docs/cli/up).
|
||||
|
||||
This command is usually required for changes made in the Vagrantfile to
|
||||
take effect. After making any modifications to the Vagrantfile, a `reload`
|
||||
@ -23,9 +23,9 @@ the provisioners to re-run by specifying the `--provision` flag.
|
||||
|
||||
# Options
|
||||
|
||||
* `--provision` - Force the provisioners to run.
|
||||
- `--provision` - Force the provisioners to run.
|
||||
|
||||
* `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
- `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
example, if you have a `:shell` and `:chef_solo` provisioner and run
|
||||
`vagrant reload --provision-with shell`, only the shell provisioner will
|
||||
be run.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant resume - Command-Line Interface"
|
||||
sidebar_current: "cli-resume"
|
||||
layout: docs
|
||||
page_title: vagrant resume - Command-Line Interface
|
||||
sidebar_title: resume
|
||||
description: |-
|
||||
The "vagrant resume" command is used to bring a machine back into the "up"
|
||||
state, perhaps if it was previously suspended via "vagrant halt" or "vagrant
|
||||
@ -13,16 +13,16 @@ description: |-
|
||||
**Command: `vagrant resume [name|id]`**
|
||||
|
||||
This resumes a Vagrant managed machine that was previously suspended,
|
||||
perhaps with the [suspend command](/docs/cli/suspend.html).
|
||||
perhaps with the [suspend command](/docs/cli/suspend).
|
||||
|
||||
The configured provisioners will not run again, by default. You can force
|
||||
the provisioners to re-run by specifying the `--provision` flag.
|
||||
|
||||
# Options
|
||||
|
||||
* `--provision` - Force the provisioners to run.
|
||||
- `--provision` - Force the provisioners to run.
|
||||
|
||||
* `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
- `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
example, if you have a `:shell` and `:chef_solo` provisioner and run
|
||||
`vagrant provision --provision-with shell`, only the shell provisioner will
|
||||
be run.
|
||||
@ -1,7 +1,6 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant rsync-auto - Command-Line Interface"
|
||||
sidebar_current: "cli-rsyncauto"
|
||||
layout: docs
|
||||
page_title: vagrant rsync-auto - Command-Line Interface
|
||||
description: |-
|
||||
The "vagrant rsync-auto" command watches all local directories of any rsync
|
||||
configured synced folders and automatically initiates an rsync transfer when
|
||||
@ -13,7 +12,7 @@ description: |-
|
||||
**Command: `vagrant rsync-auto`**
|
||||
|
||||
This command watches all local directories of any
|
||||
[rsync synced folders](/docs/synced-folders/rsync.html) and automatically
|
||||
[rsync synced folders](/docs/synced-folders/rsync) and automatically
|
||||
initiates an rsync transfer when changes are detected. This command does
|
||||
not exit until an interrupt is received.
|
||||
|
||||
@ -22,14 +21,14 @@ for filesystem changes, and does not simply poll the directory.
|
||||
|
||||
## Options
|
||||
|
||||
* `--[no-]rsync-chown` - Use rsync to modify ownership of transferred files. Enabling
|
||||
this option can result in faster completion due to a secondary process not being
|
||||
required to update ownership. By default this is disabled.
|
||||
- `--[no-]rsync-chown` - Use rsync to modify ownership of transferred files. Enabling
|
||||
this option can result in faster completion due to a secondary process not being
|
||||
required to update ownership. By default this is disabled.
|
||||
|
||||
* `--[no-]poll` - Force Vagrant to watch for changes using filesystem
|
||||
polling instead of filesystem events. This is required for some filesystems
|
||||
that do not support events. Warning: enabling this will make `rsync-auto`
|
||||
_much_ slower. By default, polling is disabled.
|
||||
- `--[no-]poll` - Force Vagrant to watch for changes using filesystem
|
||||
polling instead of filesystem events. This is required for some filesystems
|
||||
that do not support events. Warning: enabling this will make `rsync-auto`
|
||||
_much_ slower. By default, polling is disabled.
|
||||
|
||||
## Machine State Changes
|
||||
|
||||
@ -42,7 +41,7 @@ To ensure that the command works properly, you should start `rsync-auto`
|
||||
only when the machine is running, and shut it down before any machine
|
||||
state changes.
|
||||
|
||||
You can always force a resync with the [rsync](/docs/cli/rsync.html) command.
|
||||
You can always force a resync with the [rsync](/docs/cli/rsync) command.
|
||||
|
||||
## Vagrantfile Changes
|
||||
|
||||
22
website/pages/docs/cli/rsync.mdx
Normal file
22
website/pages/docs/cli/rsync.mdx
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: vagrant rsync - Command-Line Interface
|
||||
description: The "vagrant rsync" command forces a re-sync of any rsync synced folders.
|
||||
---
|
||||
|
||||
# Rsync
|
||||
|
||||
**Command: `vagrant rsync`**
|
||||
|
||||
This command forces a re-sync of any
|
||||
[rsync synced folders](/docs/synced-folders/rsync).
|
||||
|
||||
Note that if you change any settings within the rsync synced folders such
|
||||
as exclude paths, you will need to `vagrant reload` before this command will
|
||||
pick up those changes.
|
||||
|
||||
## Options
|
||||
|
||||
- `--[no-]rsync-chown` - Use rsync to modify ownership of transferred files. Enabling
|
||||
this option can result in faster completion due to a secondary process not being
|
||||
required to update ownership. By default this is disabled.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant share - Command-Line Interface"
|
||||
sidebar_current: "cli-share"
|
||||
layout: docs
|
||||
page_title: vagrant share - Command-Line Interface
|
||||
sidebar_title: share
|
||||
description: |-
|
||||
The "vagrant share" command initializes a new Vagrant share session, which
|
||||
allows you to share your virtual machine with the public Internet.
|
||||
@ -23,27 +23,27 @@ is available below.
|
||||
|
||||
## Options
|
||||
|
||||
* `--disable-http` - Disables the creation of a publicly accessible
|
||||
- `--disable-http` - Disables the creation of a publicly accessible
|
||||
HTTP endpoint to your Vagrant environment. With this set, the only way
|
||||
to access your share is with `vagrant connect`.
|
||||
|
||||
* `--http PORT` - The port of the HTTP server running in the Vagrant
|
||||
- `--http PORT` - The port of the HTTP server running in the Vagrant
|
||||
environment. By default, Vagrant will attempt to find this for you.
|
||||
This has no effect if `--disable-http` is set.
|
||||
|
||||
* `--https PORT` - The port of an HTTPS server running in the Vagrant
|
||||
- `--https PORT` - The port of an HTTPS server running in the Vagrant
|
||||
environment. By default, Vagrant will attempt to find this for you.
|
||||
This has no effect if `--disable-http` is set.
|
||||
|
||||
* `--ssh` - Enables SSH sharing (more information below). By default, this
|
||||
- `--ssh` - Enables SSH sharing (more information below). By default, this
|
||||
is not enabled.
|
||||
|
||||
* `--ssh-no-password` - Disables the encryption of the SSH keypair created
|
||||
- `--ssh-no-password` - Disables the encryption of the SSH keypair created
|
||||
when SSH sharing is enabled.
|
||||
|
||||
* `--ssh-port PORT` - The port of the SSH server running in the Vagrant
|
||||
- `--ssh-port PORT` - The port of the SSH server running in the Vagrant
|
||||
environment. By default, Vagrant will attempt to find this for you.
|
||||
|
||||
* `--ssh-once` - Allows SSH access only once. After the first attempt to
|
||||
- `--ssh-once` - Allows SSH access only once. After the first attempt to
|
||||
connect via SSH to the Vagrant environment, the generated keypair is
|
||||
destroyed.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant snapshot - Command-Line Interface"
|
||||
sidebar_current: "cli-snapshot"
|
||||
layout: docs
|
||||
page_title: vagrant snapshot - Command-Line Interface
|
||||
sidebar_title: snapshot
|
||||
description: |-
|
||||
The "vagrant snapshot" command is used to manage snapshots of the guest
|
||||
machine.
|
||||
@ -21,12 +21,12 @@ Vagrant will give you an error message.
|
||||
|
||||
The main functionality of this command is exposed via even more subcommands:
|
||||
|
||||
* [`push`](#snapshot-push)
|
||||
* [`pop`](#snapshot-pop)
|
||||
* [`save`](#snapshot-save)
|
||||
* [`restore`](#snapshot-restore)
|
||||
* [`list`](#snapshot-list)
|
||||
* [`delete`](#snapshot-delete)
|
||||
- [`push`](#snapshot-push)
|
||||
- [`pop`](#snapshot-pop)
|
||||
- [`save`](#snapshot-save)
|
||||
- [`restore`](#snapshot-restore)
|
||||
- [`list`](#snapshot-list)
|
||||
- [`delete`](#snapshot-delete)
|
||||
|
||||
# Snapshot Push
|
||||
|
||||
@ -39,7 +39,7 @@ to specify a name. When you call the inverse `vagrant snapshot pop`, it will
|
||||
restore the pushed state.
|
||||
|
||||
~> **Warning:** If you are using `push` and `pop`, avoid using `save`
|
||||
and `restore` which are unsafe to mix.
|
||||
and `restore` which are unsafe to mix.
|
||||
|
||||
# Snapshot Pop
|
||||
|
||||
@ -50,13 +50,13 @@ the pushed state.
|
||||
|
||||
## Options
|
||||
|
||||
* `--[no-]provision` - Force the provisioners to run (or prevent them
|
||||
from doing so).
|
||||
- `--[no-]provision` - Force the provisioners to run (or prevent them
|
||||
from doing so).
|
||||
|
||||
* `--no-delete` - Prevents deletion of the snapshot after restoring
|
||||
(so that you can restore to the same point again later).
|
||||
- `--no-delete` - Prevents deletion of the snapshot after restoring
|
||||
(so that you can restore to the same point again later).
|
||||
|
||||
* `--no-start` - Prevents the guest from being started after restore
|
||||
- `--no-start` - Prevents the guest from being started after restore
|
||||
|
||||
# Snapshot Save
|
||||
|
||||
@ -71,10 +71,10 @@ This command saves a new named snapshot. If this command is used, the
|
||||
|
||||
This command restores the named snapshot.
|
||||
|
||||
* `--[no-]provision` - Force the provisioners to run (or prevent them
|
||||
from doing so).
|
||||
- `--[no-]provision` - Force the provisioners to run (or prevent them
|
||||
from doing so).
|
||||
|
||||
* `--no-start` - Prevents the guest from being started after restore
|
||||
- `--no-start` - Prevents the guest from being started after restore
|
||||
|
||||
# Snapshot List
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant ssh - Command-Line Interface"
|
||||
sidebar_current: "cli-ssh"
|
||||
layout: docs
|
||||
page_title: vagrant ssh - Command-Line Interface
|
||||
sidebar_title: ssh
|
||||
description: |-
|
||||
The "vagrant ssh" command is used to establish an SSH session into a running
|
||||
virtual machine to give you shell access.
|
||||
@ -17,7 +17,7 @@ On a simple vagrant project, the instance created will be named default.
|
||||
|
||||
Vagrant will ssh into this instance without the instance name:
|
||||
|
||||
```bash
|
||||
```shell-session
|
||||
$ vagrant ssh
|
||||
|
||||
Welcome to your Vagrant-built virtual machine.
|
||||
@ -28,7 +28,7 @@ Connection to 127.0.0.1 closed.
|
||||
|
||||
Or you could use the name:
|
||||
|
||||
```bash
|
||||
```shell-session
|
||||
$ vagrant ssh default
|
||||
|
||||
|
||||
@ -42,8 +42,8 @@ $
|
||||
On multi-machine setups, you can login to each vm using the name as displayed
|
||||
on `vagrant status`
|
||||
|
||||
```bash
|
||||
$ vagrant status
|
||||
```shell-session
|
||||
$ vagrant status
|
||||
Current machine states:
|
||||
|
||||
node1 running (virtualbox)
|
||||
@ -69,7 +69,7 @@ $
|
||||
On a system with machines running from different projects, you could use the id
|
||||
as listed in `vagrant global-status`
|
||||
|
||||
```bash
|
||||
```shell-session
|
||||
$ vagrant global-status
|
||||
id name provider state directory
|
||||
-----------------------------------------------------------------------
|
||||
@ -97,10 +97,10 @@ any arbitrary commands to do things such as reverse tunneling down into the
|
||||
|
||||
## Options
|
||||
|
||||
* `-c COMMAND` or `--command COMMAND` - This executes a single SSH command, prints
|
||||
- `-c COMMAND` or `--command COMMAND` - This executes a single SSH command, prints
|
||||
out the stdout and stderr, and exits.
|
||||
|
||||
* `-p` or `--plain` - This does an SSH without authentication, leaving
|
||||
- `-p` or `--plain` - This does an SSH without authentication, leaving
|
||||
authentication up to the user.
|
||||
|
||||
## SSH client usage
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant ssh-config - Command-Line Interface"
|
||||
sidebar_current: "cli-ssh_config"
|
||||
layout: docs
|
||||
page_title: vagrant ssh-config - Command-Line Interface
|
||||
sidebar_title: ssh-config
|
||||
description: |-
|
||||
The "vagrant ssh-config" command is used to output a valid SSH configuration
|
||||
file capable of SSHing into the guest machine directly.
|
||||
@ -17,4 +17,4 @@ using `vagrant ssh`).
|
||||
|
||||
## Options
|
||||
|
||||
* `--host NAME` - Name of the host for the outputted configuration.
|
||||
- `--host NAME` - Name of the host for the outputted configuration.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant status - Command-Line Interface"
|
||||
sidebar_current: "cli-status"
|
||||
layout: docs
|
||||
page_title: vagrant status - Command-Line Interface
|
||||
sidebar_title: status
|
||||
description: |-
|
||||
The "vagrant status" command is used to tell you the status of the virtual
|
||||
machines in the current Vagrant environment.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant suspend - Command-Line Interface"
|
||||
sidebar_current: "cli-suspend"
|
||||
layout: docs
|
||||
page_title: vagrant suspend - Command-Line Interface
|
||||
sidebar_title: suspend
|
||||
description: |-
|
||||
The "vagrant suspend" command is used to suspend the guest machine Vagrant is
|
||||
currently managing.
|
||||
@ -12,10 +12,10 @@ description: |-
|
||||
**Command: `vagrant suspend [name|id]`**
|
||||
|
||||
This suspends the guest machine Vagrant is managing, rather than fully
|
||||
[shutting it down](/docs/cli/halt.html) or [destroying it](/docs/cli/destroy.html).
|
||||
[shutting it down](/docs/cli/halt) or [destroying it](/docs/cli/destroy).
|
||||
|
||||
A suspend effectively saves the _exact point-in-time state_ of the machine,
|
||||
so that when you [resume](/docs/cli/resume.html) it later, it begins running
|
||||
so that when you [resume](/docs/cli/resume) it later, it begins running
|
||||
immediately from that point, rather than doing a full boot.
|
||||
|
||||
This generally requires extra disk space to store all the contents of the
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant up - Command-Line Interface"
|
||||
sidebar_current: "cli-up"
|
||||
layout: docs
|
||||
page_title: vagrant up - Command-Line Interface
|
||||
sidebar_title: up
|
||||
description: |-
|
||||
The "vagrant up" command is used to create, configuration, and provision a
|
||||
guest machine according to your Vagrantfile.
|
||||
@ -20,29 +20,29 @@ on a day-to-day basis.
|
||||
|
||||
## Options
|
||||
|
||||
* `name` - Name of machine defined in [Vagrantfile](/docs/vagrantfile/)
|
||||
- `name` - Name of machine defined in [Vagrantfile](/docs/vagrantfile/)
|
||||
|
||||
* `id` - Machine id found with `vagrant global-status`. Using `id` allows
|
||||
- `id` - Machine id found with `vagrant global-status`. Using `id` allows
|
||||
you to call `vagrant up id` from any directory.
|
||||
|
||||
* `--[no-]destroy-on-error` - Destroy the newly created machine if a fatal,
|
||||
- `--[no-]destroy-on-error` - Destroy the newly created machine if a fatal,
|
||||
unexpected error occurs. This will only happen on the first `vagrant up`.
|
||||
By default this is set.
|
||||
|
||||
* `--[no-]install-provider` - If the requested provider is not installed,
|
||||
- `--[no-]install-provider` - If the requested provider is not installed,
|
||||
Vagrant will attempt to automatically install it if it can. By default this
|
||||
is enabled.
|
||||
|
||||
* `--[no-]parallel` - Bring multiple machines up in parallel if the provider
|
||||
- `--[no-]parallel` - Bring multiple machines up in parallel if the provider
|
||||
supports it. Please consult the provider documentation to see if this feature
|
||||
is supported.
|
||||
|
||||
* `--provider x` - Bring the machine up with the given
|
||||
- `--provider x` - Bring the machine up with the given
|
||||
[provider](/docs/providers/). By default this is "virtualbox".
|
||||
|
||||
* `--[no-]provision` - Force, or prevent, the provisioners to run.
|
||||
- `--[no-]provision` - Force, or prevent, the provisioners to run.
|
||||
|
||||
* `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
- `--provision-with x,y,z` - This will only run the given provisioners. For
|
||||
example, if you have a `:shell` and `:chef_solo` provisioner and run
|
||||
`vagrant provision --provision-with shell`, only the shell provisioner will
|
||||
be run.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant upload - Command-Line Interface"
|
||||
sidebar_current: "cli-upload"
|
||||
layout: docs
|
||||
page_title: vagrant upload - Command-Line Interface
|
||||
sidebar_title: upload
|
||||
description: |-
|
||||
The "vagrant upload" command is used to upload files from the host
|
||||
to a guest machine.
|
||||
@ -16,15 +16,15 @@ machine.
|
||||
|
||||
## Options
|
||||
|
||||
* `destination` - Path on the guest machine to upload file or directory.
|
||||
- `destination` - Path on the guest machine to upload file or directory.
|
||||
|
||||
* `source` - Path to file or directory on host to upload to guest machine.
|
||||
- `source` - Path to file or directory on host to upload to guest machine.
|
||||
|
||||
* `--compress` - Compress the file or directory before uploading to guest machine.
|
||||
- `--compress` - Compress the file or directory before uploading to guest machine.
|
||||
|
||||
* `--compression-type type` - Type of compression to use when compressing
|
||||
- `--compression-type type` - Type of compression to use when compressing
|
||||
file or directory for upload. Defaults to `zip` for Windows guests and
|
||||
`tgz` for non-Windows guests. Valid values: `tgz`, `zip`.
|
||||
|
||||
* `--temporary` - Create a temporary location on the guest machine and upload
|
||||
- `--temporary` - Create a temporary location on the guest machine and upload
|
||||
files to that location.
|
||||
23
website/pages/docs/cli/validate.mdx
Normal file
23
website/pages/docs/cli/validate.mdx
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: vagrant validate - Command-Line Interface
|
||||
sidebar_title: validate
|
||||
description: The "vagrant validate" command is used to validate your Vagrantfile.
|
||||
---
|
||||
|
||||
# Validate
|
||||
|
||||
**Command: `vagrant validate`**
|
||||
|
||||
This command validates your [Vagrantfile](/docs/vagrantfile/).
|
||||
|
||||
## Options
|
||||
|
||||
- `--ignore-provider` - Ignores provider config options.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-session
|
||||
$ vagrant validate
|
||||
Vagrantfile validated successfully.
|
||||
```
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant version - Command-Line Interface"
|
||||
sidebar_current: "cli-version"
|
||||
layout: docs
|
||||
page_title: vagrant version - Command-Line Interface
|
||||
sidebar_title: version
|
||||
description: |-
|
||||
The "vagrant version" command is used to output the version of Vagrant
|
||||
currently installed on the system.
|
||||
@ -1,7 +1,6 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant winrm - Command-Line Interface"
|
||||
sidebar_current: "cli-winrm"
|
||||
layout: docs
|
||||
page_title: vagrant winrm - Command-Line Interface
|
||||
description: |-
|
||||
The "vagrant winrm" command is used execute commands on the remote
|
||||
machine via WinRM
|
||||
@ -14,13 +13,13 @@ description: |-
|
||||
Executes the provided command(s) on the guest machine using the
|
||||
WinRM communicator. Commands are provided with the `--command`
|
||||
option and multiple `--command` flags may be provided for
|
||||
executing multiple commands. This command requires the guest
|
||||
executing multiple commands. This command requires the guest
|
||||
machine to be configured with the WinRM communicator.
|
||||
|
||||
## Options
|
||||
|
||||
* `--command COMMAND` - Command to execute.
|
||||
- `--command COMMAND` - Command to execute.
|
||||
|
||||
* `--elevated` - Run command(s) with elevated credentials.
|
||||
- `--elevated` - Run command(s) with elevated credentials.
|
||||
|
||||
* `--shell (cmd|powershell)` - Shell to execute commands. Defaults to `powershell`.
|
||||
- `--shell (cmd|powershell)` - Shell to execute commands. Defaults to `powershell`.
|
||||
@ -1,7 +1,6 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "vagrant winrm-config - Command-Line Interface"
|
||||
sidebar_current: "cli-winrm_config"
|
||||
layout: docs
|
||||
page_title: vagrant winrm-config - Command-Line Interface
|
||||
description: |-
|
||||
The "vagrant winrm-config" command is used to output the WinRM configuration
|
||||
used to connect to the guest machine.
|
||||
@ -17,4 +16,4 @@ use for the guest machine.
|
||||
|
||||
## Options
|
||||
|
||||
* `--host NAME` - Name of the host for the outputted configuration.
|
||||
- `--host NAME` - Name of the host for the outputted configuration.
|
||||
@ -1,9 +1,8 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Vagrant Disks Configuration"
|
||||
sidebar_current: "disks-configuration"
|
||||
description: |-
|
||||
Documentation of various configuration options for Vagrant Disks
|
||||
layout: docs
|
||||
page_title: Vagrant Disks Configuration
|
||||
sidebar_title: Configuration
|
||||
description: Documentation of various configuration options for Vagrant Disks
|
||||
---
|
||||
|
||||
# Configuration
|
||||
@ -12,39 +11,40 @@ Vagrant Disks has several options that allow users to define and attach disks to
|
||||
|
||||
## Disk Options
|
||||
|
||||
* `disk_ext` (string) - Optional argument that defines what kind of file
|
||||
extension a disk should have. Defaults to `"vdi"` if unspecified. For a list of
|
||||
supported disk extensions, please check the specific provider being used.
|
||||
* `file` (string) - Optional argument that defines a path on disk pointing to
|
||||
the location of a disk file that already exists.
|
||||
* `name` (string) - Required option to give the disk a name. This name will be
|
||||
used as the filename when creating the disk.
|
||||
* `primary` (boolean) - Optional argument that configures a given disk to be the
|
||||
"primary" disk to manage on the guest. There can only be one `primary` disk per guest.
|
||||
Defaults to `false` if not specified.
|
||||
* `provider_config` (hash) - Additional provider specific options for managing a given disk. Please refer to
|
||||
the provider specific documentation to see any available provider_config options.
|
||||
- `disk_ext` (string) - Optional argument that defines what kind of file
|
||||
extension a disk should have. Defaults to `"vdi"` if unspecified. For a list of
|
||||
supported disk extensions, please check the specific provider being used.
|
||||
- `file` (string) - Optional argument that defines a path on disk pointing to
|
||||
the location of a disk file that already exists.
|
||||
- `name` (string) - Required option to give the disk a name. This name will be
|
||||
used as the filename when creating the disk.
|
||||
- `primary` (boolean) - Optional argument that configures a given disk to be the
|
||||
"primary" disk to manage on the guest. There can only be one `primary` disk per guest.
|
||||
Defaults to `false` if not specified.
|
||||
- `provider_config` (hash) - Additional provider specific options for managing a given disk. Please refer to
|
||||
the provider specific documentation to see any available provider_config options.
|
||||
|
||||
Generally, the disk option accepts two kinds of ways to define a provider config:
|
||||
Generally, the disk option accepts two kinds of ways to define a provider config:
|
||||
|
||||
+ `providername__diskoption: value`
|
||||
- The provider name followed by a double underscore, and then the provider specific option for that disk
|
||||
+ `{providername: {diskoption: value}, otherprovidername: {diskoption: value}`
|
||||
- A hash where the top level key(s) are one or more providers, and each provider keys values are a hash of options and their values.
|
||||
* `size` (String) - The size of the disk to create. For example, `"10GB"`.
|
||||
- `providername__diskoption: value`
|
||||
- The provider name followed by a double underscore, and then the provider specific option for that disk
|
||||
- `{providername: {diskoption: value}, otherprovidername: {diskoption: value}`
|
||||
- A hash where the top level key(s) are one or more providers, and each provider keys values are a hash of options and their values.
|
||||
|
||||
**Note:** More specific examples of these can be found under the provider
|
||||
specific disk page. The `provider_config` option will depend on the provider
|
||||
you are using. Please read the provider specific documentation for disk
|
||||
management to learn about what options are available to use.
|
||||
- `size` (String) - The size of the disk to create. For example, `"10GB"`.
|
||||
|
||||
**Note:** More specific examples of these can be found under the provider
|
||||
specific disk page. The `provider_config` option will depend on the provider
|
||||
you are using. Please read the provider specific documentation for disk
|
||||
management to learn about what options are available to use.
|
||||
|
||||
## Disk Types
|
||||
|
||||
The disk config currently accepts three kinds of disk types:
|
||||
|
||||
* `disk` (symbol)
|
||||
* `dvd` (symbol)
|
||||
* `floppy` (symbol)
|
||||
- `disk` (symbol)
|
||||
- `dvd` (symbol)
|
||||
- `floppy` (symbol)
|
||||
|
||||
**NOTE:** These types depend on the provider used, and may not yet be functional. Please
|
||||
refer to the provider specific implementation for more details for what is supported.
|
||||
@ -60,19 +60,17 @@ config.vm.disk :floppy, name: "cool_files"
|
||||
|
||||
If you are a vagrant plugin author who maintains a provider for Vagrant, this short guide will hopefully give some information on how to use the internal disk config object.
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning!</strong> This guide is still being written as we develop this
|
||||
new feature for Vagrant. Is something missing, or could this be improved? Please
|
||||
let us know on GitHub by opening an issue or open a pull request directly.
|
||||
</div>
|
||||
~> **Warning!** This guide is still being written as we develop this
|
||||
new feature for Vagrant. Is something missing, or could this be improved? Please
|
||||
let us know on GitHub by opening an issue or open a pull request directly.
|
||||
|
||||
All providers must implement the capability `configure_disks`, and `cleanup_disks`.
|
||||
These methods are responsible for the following:
|
||||
|
||||
- `configure_disks` - Reads in a Vagrant config for defined disks from a Vagrantfile,
|
||||
and creates and attaches the disks based on the given config
|
||||
and creates and attaches the disks based on the given config
|
||||
- `cleanup_disks` - Compares the current Vagrant config for defined disks and detaches
|
||||
any disks that are no longer valid for a guest.
|
||||
any disks that are no longer valid for a guest.
|
||||
|
||||
These methods are called in the builtin Vagrant actions _Disk_ and _CleanupDisks_.
|
||||
If the provider does not support these capabilities, they will be skipped over and no
|
||||
26
website/pages/docs/disks/index.mdx
Normal file
26
website/pages/docs/disks/index.mdx
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Vagrant Disks
|
||||
sidebar_title: Disks
|
||||
description: Introduction to Vagrant Disks
|
||||
---
|
||||
|
||||
# Vagrant Disks
|
||||
|
||||
~> **Warning!** This feature is experimental and may break or
|
||||
change in between releases. Use at your own risk. It currently is not officially
|
||||
supported or functional. Please refer to the providier specific disk documentation
|
||||
for more information on how to use and enable this feature.
|
||||
|
||||
Vagrant Disks is a feature that allows users to define what mediums should be attached
|
||||
to their guests, as well as allowing users to resize their primary disk.
|
||||
|
||||
For examples on how to achieve this, among other use cases, please refer to the [usage](/docs/disks/usage)
|
||||
guide for more information!
|
||||
|
||||
For more information about what options are available for configuring disks, see the
|
||||
[configuration section](/docs/disks/configuration).
|
||||
|
||||
## Supported Providers
|
||||
|
||||
Currently, only VirtualBox is supported. Please refer to the [VirtualBox documentation](/docs/disks/virtualbox) for more information on using disks with the VirtualBox provider!
|
||||
@ -1,31 +1,28 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Vagrant Disk Usage"
|
||||
sidebar_current: "disks-usage"
|
||||
description: |-
|
||||
Various Vagrant Disk examples
|
||||
layout: docs
|
||||
page_title: Vagrant Disk Usage
|
||||
sidebar_title: Usage
|
||||
description: Various Vagrant Disk examples
|
||||
---
|
||||
|
||||
# Basic Usage
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning!</strong> This feature is experimental and may break or
|
||||
change in between releases. Use at your own risk. It currently is not officially
|
||||
supported or functional.
|
||||
~> **Warning!** This feature is experimental and may break or
|
||||
change in between releases. Use at your own risk. It currently is not officially
|
||||
supported or functional.
|
||||
|
||||
This feature currently reqiures the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
|
||||
This feature currently reqiures the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
|
||||
|
||||
```
|
||||
VAGRANT_EXPERIMENTAL="disks"
|
||||
```
|
||||
```
|
||||
VAGRANT_EXPERIMENTAL="disks"
|
||||
```
|
||||
|
||||
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
|
||||
information about this flag visit the [Experimental docs page](/docs/experimental/)
|
||||
for more info. Without this flag enabled, any disks defined will not be configured.
|
||||
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
|
||||
information about this flag visit the [Experimental docs page](/docs/experimental/)
|
||||
for more info. Without this flag enabled, any disks defined will not be configured.
|
||||
|
||||
Also note that the examples below use the VirtualBox provider, which is the current
|
||||
supported providier for this feature.
|
||||
</div>
|
||||
Also note that the examples below use the VirtualBox provider, which is the current
|
||||
supported providier for this feature.
|
||||
|
||||
Below are some very simple examples of how to use Vagrant Disks with the VirtualBox provider.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Common Issues - Disks VirtualBox Provider"
|
||||
sidebar_current: "disks-providers-virtualbox-issues"
|
||||
layout: docs
|
||||
page_title: Common Issues - Disks VirtualBox Provider
|
||||
sidebar_title: Common Issues
|
||||
description: |-
|
||||
This page lists some common issues people run into with Vagrant and VirtualBox
|
||||
as well as solutions for those issues.
|
||||
40
website/pages/docs/disks/virtualbox/index.mdx
Normal file
40
website/pages/docs/disks/virtualbox/index.mdx
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Disks for VirtualBox Provider
|
||||
sidebar_title: VirtualBox
|
||||
description: |-
|
||||
Vagrant comes with support out of the box for VirtualBox, a free,
|
||||
cross-platform consumer virtualization product.
|
||||
---
|
||||
|
||||
# VirtualBox
|
||||
|
||||
~> **Warning!** This feature is experimental and may break or
|
||||
change in between releases. Use at your own risk. It currently is not officially
|
||||
supported or functional.
|
||||
|
||||
This feature currently reqiures the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
|
||||
|
||||
```
|
||||
VAGRANT_EXPERIMENTAL="disks"
|
||||
```
|
||||
|
||||
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
|
||||
information about this flag visit the [Experimental docs page](/docs/experimental/)
|
||||
for more info. Without this flag enabled, any disks defined will not be configured.
|
||||
|
||||
**Vagrant currently only supports VirtualBox version 5.x and newer for configuring and
|
||||
attaching disks.**
|
||||
|
||||
Because of how VirtualBox handles disk management, a Vagrant guest _must_ be powered
|
||||
off for any changes to be applied to a guest. If you make a configuration change
|
||||
with a guests disk, you will need to `vagrant reload` the guest for any changes
|
||||
to be applied.
|
||||
|
||||
When new disks are defined to be attached to a guest, Vagrant will create and attach
|
||||
these disks to a guests SATA Controller. It should be noted that up to 30 disks
|
||||
can be attached to the SATA Controller.
|
||||
|
||||
For more information on how to use VirtualBox to configure disks for a guest, refer
|
||||
to the [general usage](/docs/disks/usage) and [configuration](/docs/disks/configuration)
|
||||
guide for more information.
|
||||
32
website/pages/docs/disks/virtualbox/usage.mdx
Normal file
32
website/pages/docs/disks/virtualbox/usage.mdx
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Usage - Disks VirtualBox Provider
|
||||
sidebar_title: Usage
|
||||
description: |-
|
||||
The Vagrant VirtualBox provider is used just like any other provider. Please
|
||||
read the general basic usage page for providers.
|
||||
---
|
||||
|
||||
# Usage
|
||||
|
||||
~> **Warning!** This feature is experimental and may break or
|
||||
change in between releases. Use at your own risk. It currently is not officially
|
||||
supported or functional.
|
||||
|
||||
This feature currently reqiures the experimental flag to be used. To explicitly enable this feature, you can set the experimental flag to:
|
||||
|
||||
```
|
||||
VAGRANT_EXPERIMENTAL="disks"
|
||||
```
|
||||
|
||||
Please note that `VAGRANT_EXPERIMENTAL` is an environment variable. For more
|
||||
information about this flag visit the [Experimental docs page](/docs/experimental/)
|
||||
for more info. Without this flag enabled, any disks defined will not be configured.
|
||||
|
||||
For examples of how to use the disk feature with VirtualBox, please refer to the
|
||||
[general disk usage guide](/docs/disks/usage) for more examples.
|
||||
|
||||
## provider_config options
|
||||
|
||||
Currently, there are no additional options supported for the `provider_config` option.
|
||||
This page will be updated with any valid options as they become supported.
|
||||
@ -1,9 +1,8 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Vagrant Experimental Feature Flag"
|
||||
sidebar_current: "experimental"
|
||||
description: |-
|
||||
Introduction to Vagrants Experimental Feature Flag
|
||||
layout: docs
|
||||
page_title: Vagrant Experimental Feature Flag
|
||||
sidebar_title: Experimental
|
||||
description: Introduction to Vagrants Experimental Feature Flag
|
||||
---
|
||||
|
||||
# Experimental Feature Flag
|
||||
@ -35,28 +34,26 @@ export VAGRANT_EXPERIMENTAL="feature_one,feature_two"
|
||||
|
||||
## Valid experimental features
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>Advanced topic!</strong> This is an advanced topic for use only if
|
||||
you want to use new Vagrant features. If you are just getting
|
||||
started with Vagrant, you may safely skip this section.
|
||||
</div>
|
||||
~> **Advanced topic!** This is an advanced topic for use only if
|
||||
you want to use new Vagrant features. If you are just getting
|
||||
started with Vagrant, you may safely skip this section.
|
||||
|
||||
This is a list of all the valid experimental features that Vagrant recognizes:
|
||||
|
||||
### `typed_triggers`
|
||||
|
||||
Enabling this feature allows triggers to recognize and execute `:type` triggers.
|
||||
More information about how these should be used can be found on the [trigger documentation page](/docs/triggers/configuration.html#trigger-types)
|
||||
More information about how these should be used can be found on the [trigger documentation page](/docs/triggers/configuration#trigger-types)
|
||||
|
||||
### `disks`
|
||||
|
||||
Enabling this feature will allow Vagrant to manage and configure virtual hard disks
|
||||
for certain providers. More information about supported providers and how to
|
||||
configure disks can be found on the [disk documentation page](/docs/disks/index.html)
|
||||
configure disks can be found on the [disk documentation page](/docs/disks)
|
||||
|
||||
### `dependency_provisioners`
|
||||
|
||||
Enabling this feature allows all provisioners to specify `before` and `after`
|
||||
options. These options allow provisioners to be configured to run before or after
|
||||
any given "root" provisioner. more information about these options can be found
|
||||
on the [base provisioner documentation page](/docs/provisioning/basic_usage.html)
|
||||
on the [base provisioner documentation page](/docs/provisioning/basic_usage)
|
||||
@ -1,12 +1,12 @@
|
||||
---
|
||||
layout: "docs"
|
||||
sidebar_current: "overview"
|
||||
page_title: "Documentation"
|
||||
layout: docs
|
||||
page_title: Documentation
|
||||
sidebar_title: Overview
|
||||
description: |-
|
||||
Welcome to the documentation for Vagrant - the command line utility for
|
||||
managing the lifecycle of virtual machines. This website aims to document
|
||||
every feature of Vagrant from top-to-bottom, covering as much detail as
|
||||
possible.
|
||||
possible.
|
||||
---
|
||||
|
||||
# Vagrant Documentation
|
||||
@ -15,10 +15,10 @@ Welcome to the documentation for Vagrant - the command line utility for managing
|
||||
the lifecycle of virtual machines. This website aims to document every feature
|
||||
of Vagrant from top-to-bottom, covering as much detail as possible. If you are
|
||||
just getting started with Vagrant, it is highly recommended that you start with
|
||||
the [getting started guide](/intro/getting-started/index.html) first, and then
|
||||
the [getting started guide](/intro/getting-started) first, and then
|
||||
return to this page.
|
||||
|
||||
The navigation will take you through each component of Vagrant. Click on a
|
||||
navigation item to get started, or read more about
|
||||
[why developers, designers, and operators choose Vagrant](/intro/index.html)
|
||||
[why developers, designers, and operators choose Vagrant](/intro)
|
||||
for their needs.
|
||||
@ -1,9 +1,8 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Backwards Compatibility"
|
||||
sidebar_current: "installation-backwards-compatibility"
|
||||
description: |-
|
||||
Vagrant makes a very strict backwards-compatibility promise.
|
||||
layout: docs
|
||||
page_title: Backwards Compatibility
|
||||
sidebar_title: Backwards Compatibility
|
||||
description: Vagrant makes a very strict backwards-compatibility promise.
|
||||
---
|
||||
|
||||
# Backwards Compatibility
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Installing Vagrant"
|
||||
sidebar_current: "installation"
|
||||
layout: docs
|
||||
page_title: Installing Vagrant
|
||||
sidebar_title: Installation
|
||||
description: |-
|
||||
Installing Vagrant is extremely easy. Head over to the Vagrant downloads page
|
||||
and get the appropriate installer or package for your platform. Install the
|
||||
@ -11,7 +11,7 @@ description: |-
|
||||
# Installing Vagrant
|
||||
|
||||
Installing Vagrant is extremely easy. Head over to the
|
||||
[Vagrant downloads page](/downloads.html) and get the appropriate installer or
|
||||
[Vagrant downloads page](/downloads) and get the appropriate installer or
|
||||
package for your platform. Install the package using standard procedures for
|
||||
your operating system.
|
||||
|
||||
@ -20,22 +20,18 @@ so that it is available in terminals. If it is not found, please try
|
||||
logging out and logging back in to your system (this is particularly
|
||||
necessary sometimes for Windows).
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>Looking for the gem install?</strong> Vagrant 1.0.x had the option to
|
||||
be installed as a <a href="https://en.wikipedia.org/wiki/RubyGems">RubyGem</a>.
|
||||
This installation method is no longer supported. If you have an old version
|
||||
of Vagrant installed via Rubygems, please remove it prior to installing newer
|
||||
versions of Vagrant.
|
||||
</div>
|
||||
~> **Looking for the gem install?** Vagrant 1.0.x had the option to
|
||||
be installed as a [RubyGem](https://en.wikipedia.org/wiki/RubyGems).
|
||||
This installation method is no longer supported. If you have an old version
|
||||
of Vagrant installed via Rubygems, please remove it prior to installing newer
|
||||
versions of Vagrant.
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>Beware of system package managers!</strong> Some operating system
|
||||
distributions include a vagrant package in their upstream package repos.
|
||||
Please do not install Vagrant in this manner. Typically these packages are
|
||||
missing dependencies or include very outdated versions of Vagrant. If you
|
||||
install via your system's package manager, it is very likely that you will
|
||||
experience issues. Please use the official installers on the downloads page.
|
||||
</div>
|
||||
~> **Beware of system package managers!** Some operating system
|
||||
distributions include a vagrant package in their upstream package repos.
|
||||
Please do not install Vagrant in this manner. Typically these packages are
|
||||
missing dependencies or include very outdated versions of Vagrant. If you
|
||||
install via your system's package manager, it is very likely that you will
|
||||
experience issues. Please use the official installers on the downloads page.
|
||||
|
||||
## Running Multiple Hypervisors
|
||||
|
||||
@ -44,14 +40,16 @@ if more than one hypervisor is in use. If you are lucky, you might see the follo
|
||||
error message come up when trying to bring up a virtual machine with Vagrant and
|
||||
VirtualBox:
|
||||
|
||||
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
|
||||
```text
|
||||
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
|
||||
|
||||
Command: ["startvm", <ID of the VM>, "--type", "headless"]
|
||||
Command: ["startvm", <ID of the VM>, "--type", "headless"]
|
||||
|
||||
Stderr: VBoxManage: error: VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE).
|
||||
VBoxManage: error: VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot
|
||||
(VERR_VMX_IN_VMX_ROOT_MODE)
|
||||
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
|
||||
Stderr: VBoxManage: error: VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE).
|
||||
VBoxManage: error: VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot
|
||||
(VERR_VMX_IN_VMX_ROOT_MODE)
|
||||
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
|
||||
```
|
||||
|
||||
Other operating systems like Windows will blue screen if you attempt to bring up
|
||||
a VirtualBox VM with Hyper-V enabled. Below are a couple of ways to ensure you
|
||||
@ -64,16 +62,20 @@ We must blacklist these in order for VirtualBox to run correctly.
|
||||
|
||||
First find out the name of the hypervisor:
|
||||
|
||||
$ lsmod | grep kvm
|
||||
kvm_intel 204800 6
|
||||
kvm 593920 1 kvm_intel
|
||||
irqbypass 16384 1 kvm
|
||||
```shell-session
|
||||
$ lsmod | grep kvm
|
||||
kvm_intel 204800 6
|
||||
kvm 593920 1 kvm_intel
|
||||
irqbypass 16384 1 kvm
|
||||
```
|
||||
|
||||
The one we're interested in is `kvm_intel`. You might have another.
|
||||
|
||||
Blacklist the hypervisor (run the following as root):
|
||||
|
||||
# echo 'blacklist kvm-intel' >> /etc/modprobe.d/blacklist.conf
|
||||
```shell-session
|
||||
$ echo 'blacklist kvm-intel' >> /etc/modprobe.d/blacklist.conf
|
||||
```
|
||||
|
||||
Restart your machine and try running vagrant again.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Installing Vagrant from Source"
|
||||
sidebar_current: "installation-source"
|
||||
layout: docs
|
||||
page_title: Installing Vagrant from Source
|
||||
sidebar_title: From Source
|
||||
description: |-
|
||||
Installing Vagrant from source is an advanced topic and is only recommended
|
||||
when using the official installer is not an option. This page details the
|
||||
@ -15,6 +15,7 @@ when using the official installer is not an option. This page details the
|
||||
steps and prerequisites for installing Vagrant from source.
|
||||
|
||||
## Install Ruby
|
||||
|
||||
You must have a modern Ruby (>= 2.2) in order to develop and build Vagrant. The
|
||||
specific Ruby version is documented in the Vagrant's `gemspec`. Please refer to
|
||||
the `vagrant.gemspec` in the repository on GitHub, as it will contain the most
|
||||
@ -26,22 +27,22 @@ However, beware of the following pitfalls:
|
||||
using Vagrant from source, they will not work from the package based Vagrant installation.
|
||||
|
||||
## Clone Vagrant
|
||||
|
||||
Clone Vagrant's repository from GitHub into the directory where you keep code on your machine:
|
||||
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ git clone https://github.com/hashicorp/vagrant.git
|
||||
```
|
||||
|
||||
Next, `cd` into that path. All commands will be run from this path:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ cd /path/to/your/vagrant/clone
|
||||
```
|
||||
|
||||
Run the `bundle` command with a required version* to install the requirements:
|
||||
Run the `bundle` command with a required version\* to install the requirements:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ bundle install
|
||||
```
|
||||
|
||||
@ -49,18 +50,19 @@ You can now run Vagrant by running `bundle exec vagrant` from inside that
|
||||
directory.
|
||||
|
||||
## Use Locally
|
||||
|
||||
In order to use your locally-installed version of Vagrant in other projects, you will need to create a binstub and add it to your path.
|
||||
|
||||
First, run the following command from the Vagrant repo:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ bundle --binstubs exec
|
||||
```
|
||||
|
||||
This will generate files in `exec/`, including `vagrant`. You can now specify
|
||||
the full path to the `exec/vagrant` anywhere on your operating system:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ /path/to/vagrant/exec/vagrant init -m hashicorp/bionic64
|
||||
```
|
||||
|
||||
@ -70,7 +72,7 @@ supported. It's true. It's not. You should listen to those warnings.
|
||||
If you do not want to specify the full path to Vagrant (i.e. you just want to
|
||||
run `vagrant`), you can create a symbolic link to your exec:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ ln -sf /path/to/vagrant/exec/vagrant /usr/local/bin/vagrant
|
||||
```
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Uninstalling Vagrant"
|
||||
sidebar_current: "installation-uninstallation"
|
||||
layout: docs
|
||||
page_title: Uninstalling Vagrant
|
||||
sidebar_title: Uninstallation
|
||||
description: |-
|
||||
Uninstalling Vagrant is easy and straightforward. You can either uninstall
|
||||
the Vagrant binary, the user data, or both. The sections below cover how to
|
||||
@ -44,7 +44,7 @@ rm -f /usr/bin/vagrant
|
||||
|
||||
## Removing User Data
|
||||
|
||||
Removing the user data will remove all [boxes](/docs/boxes.html),
|
||||
Removing the user data will remove all [boxes](/docs/boxes),
|
||||
[plugins](/docs/plugins/), license files, and any stored state that may be used
|
||||
by Vagrant. Removing the user data effectively makes Vagrant think it
|
||||
is a fresh install.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Upgrading from Vagrant 1.0"
|
||||
sidebar_current: "installation-1-0-upgrading"
|
||||
layout: docs
|
||||
page_title: Upgrading from Vagrant 1.0
|
||||
sidebar_title: Upgrading from 1.0.x
|
||||
description: |-
|
||||
The upgrade process from 1.0.x to 1.x is straightforward. Vagrant is
|
||||
backwards compatible with Vagrant 1.0.x, so you can simply reinstall Vagrant
|
||||
@ -12,12 +12,12 @@ description: |-
|
||||
# Upgrading From Vagrant 1.0.x
|
||||
|
||||
The upgrade process from 1.0.x to 1.x is straightforward. Vagrant is quite
|
||||
[backwards compatible](/docs/installation/backwards-compatibility.html)
|
||||
[backwards compatible](/docs/installation/backwards-compatibility)
|
||||
with Vagrant 1.0.x, so you can simply reinstall Vagrant
|
||||
over your previous installation by downloading the latest package and
|
||||
installing it using standard procedures for your operating system.
|
||||
|
||||
As the [backwards compatibility](/docs/installation/backwards-compatibility.html)
|
||||
As the [backwards compatibility](/docs/installation/backwards-compatibility)
|
||||
page says, **Vagrant 1.0.x plugins will not work with Vagrant 1.1+**. Many
|
||||
of these plugins have been updated to work with newer versions of Vagrant,
|
||||
so you can look to see if they've been updated. If not however, you will have
|
||||
@ -26,8 +26,6 @@ to remove them before upgrading.
|
||||
It is recommended you remove _all_ plugins before upgrading, and then slowly
|
||||
add back the plugins. This usually makes for a smoother upgrade process.
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>If your version of Vagrant was installed via Rubygems</strong>, you
|
||||
must uninstall the old version prior to installing the package for the
|
||||
new version of Vagrant. The Rubygems installation is no longer supported.
|
||||
</div>
|
||||
~> **If your version of Vagrant was installed via Rubygems**, you
|
||||
must uninstall the old version prior to installing the package for the
|
||||
new version of Vagrant. The Rubygems installation is no longer supported.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Upgrading Vagrant"
|
||||
sidebar_current: "installation-upgrading"
|
||||
layout: docs
|
||||
page_title: Upgrading Vagrant
|
||||
sidebar_title: Upgrading
|
||||
description: |-
|
||||
If you are upgrading from Vagrant 1.0.x, please read the specific page
|
||||
dedicated to that. This page covers upgrading Vagrant in general during the
|
||||
@ -11,12 +11,12 @@ description: |-
|
||||
# Upgrading Vagrant
|
||||
|
||||
If you are upgrading from Vagrant 1.0.x, please read the
|
||||
[specific page dedicated to that](/docs/installation/upgrading-from-1-0.html).
|
||||
[specific page dedicated to that](/docs/installation/upgrading-from-1-0).
|
||||
This page covers upgrading Vagrant in general during the 1.x series.
|
||||
|
||||
Vagrant upgrades during the 1.x release series are straightforward:
|
||||
|
||||
1. [Download](/downloads.html) the new package
|
||||
1. [Download](/downloads) the new package
|
||||
2. Install it over the existing package
|
||||
|
||||
The installers will properly overwrite and remove old files. It is recommended
|
||||
@ -24,12 +24,9 @@ that no other Vagrant processes are running during the upgrade process.
|
||||
|
||||
Note that Vagrantfile stability for the new Vagrantfile syntax is not
|
||||
promised until 2.0 final. So while Vagrantfiles made for 1.0.x will
|
||||
[continue to work](/docs/installation/backwards-compatibility.html),
|
||||
[continue to work](/docs/installation/backwards-compatibility),
|
||||
newer Vagrantfiles may have backwards incompatible changes until 2.0 final.
|
||||
|
||||
<div class="alert alert-info alert-block">
|
||||
<strong>Run into troubles upgrading?</strong> Please
|
||||
<a href="https://github.com/hashicorp/vagrant/issues" class="alert-link">report an issue</a>
|
||||
if you run into problems upgrading. Upgrades are meant to be a smooth
|
||||
process and we consider it a bug if it was not.
|
||||
</div>
|
||||
-> **Run into troubles upgrading?** Please [report an issue](https://github.com/hashicorp/vagrant/issues)
|
||||
if you run into problems upgrading. Upgrades are meant to be a smooth
|
||||
process and we consider it a bug if it was not.
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: "docs"
|
||||
page_title: "Multi-Machine"
|
||||
sidebar_current: "multimachine"
|
||||
layout: docs
|
||||
page_title: Multi-Machine
|
||||
sidebar_title: Multi-Machine
|
||||
description: |-
|
||||
Vagrant is able to define and control multiple guest machines per
|
||||
Vagrantfile. This is known as a "multi-machine" environment.
|
||||
@ -16,11 +16,11 @@ These machines are generally able to work together or are somehow associated
|
||||
with each other. Here are some use-cases people are using multi-machine
|
||||
environments for today:
|
||||
|
||||
* Accurately modeling a multi-server production topology, such as separating
|
||||
- Accurately modeling a multi-server production topology, such as separating
|
||||
a web and database server.
|
||||
* Modeling a distributed system and how they interact with each other.
|
||||
* Testing an interface, such as an API to a service component.
|
||||
* Disaster-case testing: machines dying, network partitions, slow networks,
|
||||
- Modeling a distributed system and how they interact with each other.
|
||||
- Testing an interface, such as an API to a service component.
|
||||
- Disaster-case testing: machines dying, network partitions, slow networks,
|
||||
inconsistent world views, etc.
|
||||
|
||||
Historically, running complex environments such as these was done by
|
||||
@ -88,7 +88,7 @@ that "B" is last. That is because the ordering is outside-in, in
|
||||
the order of the file.
|
||||
|
||||
If you want to apply a slightly different configuration to multiple machines,
|
||||
see [this tip](/docs/vagrantfile/tips.html#loop-over-vm-definitions).
|
||||
see [this tip](/docs/vagrantfile/tips#loop-over-vm-definitions).
|
||||
|
||||
## Controlling Multiple Machines
|
||||
|
||||
@ -117,7 +117,7 @@ slashes, it assumes you are using a regular expression.
|
||||
|
||||
In order to facilitate communication within machines in a multi-machine setup,
|
||||
the various [networking](/docs/networking/) options should be used.
|
||||
In particular, the [private network](/docs/networking/private_network.html) can
|
||||
In particular, the [private network](/docs/networking/private_network) can
|
||||
be used to make a private network between multiple machines and the host.
|
||||
|
||||
## Specifying a Primary Machine
|
||||
@ -148,6 +148,6 @@ config.vm.define "db_follower", autostart: false
|
||||
```
|
||||
|
||||
When running `vagrant up` with the settings above, Vagrant will automatically
|
||||
start the "web" and "db" machines, but will not start the "db\_follower" machine.
|
||||
You can manually force the "db\_follower" machine to start by running
|
||||
start the "web" and "db" machines, but will not start the "db_follower" machine.
|
||||
You can manually force the "db_follower" machine to start by running
|
||||
`vagrant up db_follower`.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user