Skip to content

Commit

Permalink
Merge pull request #12940 from hashicorp/kc.docs-install-updates
Browse files Browse the repository at this point in the history
Docs Install Pages
  • Loading branch information
kaitlincart authored Jan 25, 2023
2 parents 1f2ad2f + b217b01 commit 2f5b5f0
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 64 deletions.
57 changes: 30 additions & 27 deletions website/content/docs/installation/source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,81 @@
layout: docs
page_title: Installing Vagrant 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
steps and prerequisites for installing Vagrant from source.
Vagrant installations from source is an advanced operation. It is only recommended
if you cannot use the official installer.
---

# Installing Vagrant from Source
# Install Vagrant from source

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
steps and prerequisites for installing Vagrant from source.
Vagrant installations from source is an advanced operation. We only recommended
if you cannot use the official installer. This page details the prerequisites and three
steps to install Vagrant from source.

1. Install Ruby
1. Clone Vagrant
1. Configure locally

## 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
up-to-date requirement. This guide will not discuss how to install and manage Ruby.
However, beware of the following pitfalls:
To develop and build Vagrant, you must install a specific version of Ruby. The
specific Ruby version that you will need is documented
in `vagrant.gemspec`, located in the repository on GitHub.
It contains the most up-to-date requirements.


- Do **NOT** use the system Ruby - use a Ruby version manager like rvm or chruby
- Vagrant plugins are configured based on current environment. If plugins are installed
using Vagrant from source, they will not work from the package based Vagrant installation.
You will also need to be aware of plugin compatibility between Vagrant source installations and package based installations. Since Vagrant plugins are configured based on the current environment, plugins installed with Vagrant from source will not work with the package based Vagrant installation.

## Clone Vagrant

Clone Vagrant's repository from GitHub into the directory where you keep code on your machine:
Clone Vagrant's repository from GitHub into the directory where you keep code on your machine.

```shell-session
$ git clone https://github.com/hashicorp/vagrant.git
```

Next, `cd` into that path. All commands will be run from this path:
Next, `cd` into that path. You must initiate all commands from this directory.

```shell-session
$ cd /path/to/your/vagrant/clone
```

Run the `bundle` command with a required version\* to install the requirements:
Use the `bundle` command with a required version\* to install the requirements.

```shell-session
$ bundle install
```

You can now run Vagrant by running `bundle exec vagrant` from inside that
directory.
You can now start Vagrant with the `bundle` command.

```shell-session
$ bundle exec vagrant
```

## Use Locally
## Configure 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:
First, use the `bundle` command from your Vagrant directory.

```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:
the full path to the `exec/vagrant` anywhere on your operating system.

```shell-session
$ /path/to/vagrant/exec/vagrant init -m hashicorp/bionic64
```

Note that you _will_ receive warnings that running Vagrant like this is not
supported. It's true. It's not. You should listen to those warnings.
-> **Tip:** Warning messages are expected when you use a local Vagrant from source installation, since it is not supported or recommended.

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:
run `vagrant`), you can create a symbolic link to your exec.

```shell-session
$ ln -sf /path/to/vagrant/exec/vagrant /usr/local/bin/vagrant
```

When you want to switch back to the official Vagrant version, simply
When you want to switch back to the official Vagrant version,
remove the symlink.
58 changes: 31 additions & 27 deletions website/content/docs/installation/uninstallation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,57 @@ description: |-
do this on every platform.
---

# Uninstalling Vagrant
# Uninstall Vagrant

Uninstalling Vagrant is easy and straightforward. You can either uninstall
the Vagrant binary, the user data, or both. The sections below cover how to
do this on every platform.
To uninstall Vagrant, you can either uninstall
the Vagrant binary, the user data, or both. The two sections below detail how to
uninstall Vagrant on any platform.

## Removing the Vagrant Program
## Remove the Vagrant program

Removing the Vagrant program will remove the `vagrant` binary and all
dependencies from your machine. After uninstalling the program, you can
always [reinstall](/vagrant/docs/installation/) again using standard
methods. Uninstalling Vagrant will _not_ remove user data. The section below this
one gives more detailed instructions on how to remove that directory from your
system.
When you remove the Vagrant program, it will remove the `vagrant` binary and all
dependencies from your machine. It will _not_ remove user data. The next section provides more details on how to remove that directory from your system.

On **Windows**
### Windows machines

> Uninstall using the add/remove programs section of the control panel
Uninstall using the **Add/Remove Programs** section of the control panel.

On **Mac OS X**:
### Mac OS X machines

```sh
As a super user, force remove the directory and remove it from your path with `pkgutil`.\

```shell-session
sudo rm -rf /opt/vagrant /usr/local/bin/vagrant
sudo pkgutil --forget com.vagrant.vagrant
```

On **Linux**:
### Linux machines

As a super user, force remove the Vagrant directories.

```sh
```shell-session
rm -rf /opt/vagrant
rm -f /usr/bin/vagrant
```

## Removing User Data
## Remove user data

Removing the user data will remove all [boxes](/vagrant/docs/boxes),
[plugins](/vagrant/docs/plugins/), license files, and any stored state that may be used
The removal of user data will remove all [boxes](/vagrant/docs/boxes),
[plugins](/vagrant/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.

On all platforms, this directory is located in the root of your home directory,
and is named `vagrant.d`. Simply remove the `~/.vagrant.d` directory to delete the user data. If on
Windows, this directory is located at `C:\Users\YourUsername\.vagrant.d`, where
On Linux and Mac OS platforms, the user data directory location is in the root of your home directory under `vagrant.d`. Remove the `~/.vagrant.d` directory to delete all the user data. On
Windows, this directory is, `C:\Users\YourUsername\.vagrant.d`, where
`YourUsername` is the username of your local user.

When debugging, the Vagrant support team may ask you to remove this
directory. Before removing this directory, please make a backup.
If the Vagrant support team asks you to remove this
directory to debug, you should make a backup.

When you use Vagrant again, Vagrant will automatically regenerate any data necessary to operate.

## Reinstall Vagrant

Running Vagrant will automatically regenerate any data necessary to run,
so it is safe to remove the user data at any time.
If you decide to reinstall Vagrant, you can
follow the [installation docs](/vagrant/docs/installation) again for any standard
method.
20 changes: 10 additions & 10 deletions website/content/docs/installation/upgrading-from-1-0.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
layout: docs
page_title: Upgrading from Vagrant 1.0
page_title: Upgrade from Vagrant 1.0
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
over your previous installation by downloading the latest package and
installing it using standard procedures for your operating system.
The upgrade process from 1.0.x to 1.x is straightforward, Vagrant is
backwards compatible with Vagrant 1.0.x. To reinstall Vagrant
over your previous installation, download the latest package and
install it with standard procedures for your operating system.
---

# Upgrading From Vagrant 1.0.x
# Upgrade from Vagrant 1.0.x

The upgrade process from 1.0.x to 1.x is straightforward. Vagrant is quite
[backwards compatible](/vagrant/docs/installation/backwards-compatibility)
Expand All @@ -19,11 +19,11 @@ installing it using standard procedures for your operating system.
As the [backwards compatibility](/vagrant/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
to remove them before upgrading.
so you will need to verify if they've been updated. If not however, you will have
to remove them before the upgrade.

It is recommended you remove _all_ plugins before upgrading, and then slowly
add back the plugins. This usually makes for a smoother upgrade process.
We recommend that you remove _all_ plugins before the upgrade and then slowly
add them back. This usually makes for a smoother upgrade process.

~> **If your version of Vagrant was installed via Rubygems**, you
must uninstall the old version prior to installing the package for the
Expand Down

0 comments on commit 2f5b5f0

Please sign in to comment.