Skip to content

Commit

Permalink
backport of commit 66fa760
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanfrappier committed Sep 18, 2024
1 parent 1dd31a5 commit 3bd6518
Show file tree
Hide file tree
Showing 7 changed files with 724 additions and 94 deletions.
92 changes: 0 additions & 92 deletions website/content/docs/install.mdx

This file was deleted.

95 changes: 95 additions & 0 deletions website/content/docs/install/build-from-code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
layout: docs
page_title: Build Vault from code
description: >-
Build Vault locally from source code.
---

# Build Vault from code

Clone the official Vault repo and build a Vault binary from source code for your
system.

<Tip title="Assumptions">

- You have [Go](https://golang.org) installed and the `GOPATH` environment
variable configured.
- You have [`git`](https://www.git-scm.com/) installed.

</Tip>

<Tabs>

<Tab heading="Linux shell" group="nix">

1. Create a `hashicorp` source directory under your `GOPATH` and change to the
new directory:

```shell-session
$ mkdir -p ${GOPATH}/src/hashicorp && cd $_
```

1. Clone the Vault repository from GitHub:
```shell-session
$ git clone https://github.com/hashicorp/vault.git
```

1. Change to the cloned Vault directory:
```shell-session
$ cd vault
```

1. Bootstrap the Go project to download and compile the libraries and tools
needed to compile Vault:
```shell-session
$ make bootstrap
```

1. Use `make` to build Vault for your current system:
```shell-session
$ make dev
```

You can copy the compiled binary from `${GOPATH}/src/hashicorp/vault/bin/`.

</Tab>

<Tab heading="Powershell" group="ps">

1. Create a `hashicorp` source directory under your `GOPATH` and change to the
new directory:

```powershell
New-Item -ItemType Directory -Force -Path "${env:GOPATH}/src/hashicorp" | Set-Location
```

1. Clone the Vault repository from GitHub:

```powershell
git clone https://github.com/hashicorp/vault.git
```

1. Change to the cloned Vault directory:

```powershell
Set-Location vault
```

1. Use the included `make` tool to bootstrap the Go project to download and
compile the libraries and tools needed to compile Vault:

```powershell
.\make bootstrap
```

1. Use the included `make` tool to build Vault for your current system:

```powershell
.\make dev
```

You can copy the compiled binary from `${env:GOPATH}/src/hashicorp/vault/bin/`.

</Tab>

</Tabs>
35 changes: 35 additions & 0 deletions website/content/docs/install/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: docs
page_title: Install Vault
description: |-
Download a precompiled binary, compile from source, or use a package manager.
---

# Install Vault

## Install options

<Tip title="Use Helm for Kubernetes">

If you plan to run Vault on Kubernetes, we recommend
[installing with Helm](/vault/docs/platform/k8s/helm).

</Tip>

1. [Install official Vault packages](/vault/install) with supported package
managers for macOS, Ubuntu/Debian, CentIS/RHEL, Amazon Linux, and Homebrew.
1. [Download a precompiled binary](/vault/install) or
[build Vault from code](/vault/docs/install/build-from-code) and
[install the binary manually](/vault/docs/install/install-binary).

@include 'versions.mdx'

## Related tutorials

The following tutorials provide additional guidance for installing Vault and
production cluster deployment:

- [Get started: Install Vault](/vault/tutorials/getting-started/getting-started-install)
- [Day One Preparation](/vault/tutorials/day-one-raft)
- [Recommended Patterns](/vault/tutorials/recommended-patterns)
- [Start the server in dev mode]: /vault/tutorials/getting-started/getting-started-dev-server
Loading

0 comments on commit 3bd6518

Please sign in to comment.