mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-28 14:11:10 +01:00
Update replication guide and add to sidebar
This commit is contained in:
parent
01157459f8
commit
d349fdf7fa
@ -14,5 +14,9 @@ guidance to do them safely.
|
||||
|
||||
The following guides are available:
|
||||
|
||||
* [Generate Root](/docs/guides/generate-root.html) - This guide covers how to
|
||||
generate new root tokens using unseal keys.
|
||||
* [Generate a Root Token](/docs/guides/generate-root.html) - This guide covers
|
||||
how to generate new root tokens using unseal keys.
|
||||
|
||||
* [Setting Up and Managing Replication](/docs/guides/replication.html) - This
|
||||
guide covers how to set up and manage Vault Replication, a part of Vault
|
||||
Enterprise.
|
||||
|
||||
@ -25,7 +25,11 @@ both](https://www.vaultproject.io/docs/http/sys-replication.html).
|
||||
|
||||
### Activating the Primary
|
||||
|
||||
To activate the primary, run `vault write -f sys/replication/primary/enable`.
|
||||
To activate the primary, run:
|
||||
|
||||
|
||||
$ vault write -f sys/replication/primary/enable
|
||||
|
||||
|
||||
There is currently one optional argument: `primary_cluster_addr`. This can be
|
||||
used to override the cluster address that the primary advertises to the
|
||||
@ -34,18 +38,24 @@ members of a single cluster and primary/secondary clusters.
|
||||
|
||||
### Fetching a Secondary Token
|
||||
|
||||
To fetch a secondary bootstrap token, run `vault write
|
||||
sys/replication/primary/secondary-token id=<id>`.
|
||||
To fetch a secondary bootstrap token, run:
|
||||
|
||||
The value for ID is opaque to Vault and can be any identifying value you want;
|
||||
|
||||
$ vault write sys/replication/primary/secondary-token id=<id>
|
||||
|
||||
|
||||
The value for `id` is opaque to Vault and can be any identifying value you want;
|
||||
this can be used later to revoke the secondary and will be listed when you read
|
||||
replication status on the primary. You will get back a normal wrapped response,
|
||||
except that the token will be a JWT instead of UUID-formatted random bytes.
|
||||
|
||||
### Activating a Secondary
|
||||
|
||||
To activate a secondary, run `vault write sys/replication/secondary/enable
|
||||
token=<token>`.
|
||||
To activate a secondary using the fetched token, run:
|
||||
|
||||
|
||||
$ vault write sys/replication/secondary/enable token=<token>
|
||||
|
||||
|
||||
You must provide the full token value. Be very careful when running this
|
||||
command, as it will destroy all data currently stored in the secondary.
|
||||
|
||||
118
website/source/docs/http/sys-replication-common.html.md
Normal file
118
website/source/docs/http/sys-replication-common.html.md
Normal file
@ -0,0 +1,118 @@
|
||||
---
|
||||
layout: "http"
|
||||
page_title: "HTTP API: /sys/replication"
|
||||
sidebar_current: "docs-http-replication-common"
|
||||
description: |-
|
||||
The '/sys/replication' endpoint focuses on managing general operations in Vault Enterprise replication sets
|
||||
---
|
||||
|
||||
# /sys/replication/recover
|
||||
|
||||
## POST
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
Attempts recovery if replication is in an adverse state. For example: an
|
||||
error has caused replication to stop syncing.
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>POST</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/sys/replication/recover`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
None
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
A `200` response code and a warning.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
# /sys/replication/reindex
|
||||
|
||||
## POST
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
Requires ‘sudo’ capability. Reindex the local data storage. This can cause
|
||||
a very long delay depending on the number and size of objects in the data
|
||||
store.
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>POST</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/sys/replication/reindex`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
None
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
A `200` response code and a warning.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
# /sys/replication/status
|
||||
|
||||
## GET
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
Unauthenticated. Print information about the status of replication (mode,
|
||||
sync progress, etc).
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/sys/replication/status`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
None
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
The printed status of the replication environment. As an example, for a
|
||||
primary, it will look something like:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"mode": "primary",
|
||||
"cluster_id": "d4095d41-3aee-8791-c421-9bc7f88f7c3e",
|
||||
"known_secondaries": [],
|
||||
"last_wal": 0,
|
||||
"merkle_root": "c3260c4c682ff2d6eb3c8bfd877134b3cec022d1",
|
||||
"request_id": "009ea98c-06cd-6dc3-74f2-c4904b22e535",
|
||||
"lease_id": "",
|
||||
"renewable": false,
|
||||
"lease_duration": 0,
|
||||
"data": {
|
||||
"cluster_id": "d4095d41-3aee-8791-c421-9bc7f88f7c3e",
|
||||
"known_secondaries": [],
|
||||
"last_wal": 0,
|
||||
"merkle_root": "c3260c4c682ff2d6eb3c8bfd877134b3cec022d1",
|
||||
"mode": "primary"
|
||||
},
|
||||
"wrap_info": null,
|
||||
"warnings": null,
|
||||
"auth": null
|
||||
}
|
||||
```
|
||||
</dd>
|
||||
</dl>
|
||||
@ -118,7 +118,7 @@
|
||||
<a href="/docs/http/sys-revoke-force.html">/sys/revoke-force</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-wrapping") %>>
|
||||
<a href="#">Response Wrapping</a>
|
||||
@ -136,9 +136,9 @@
|
||||
<a href="/docs/http/sys-wrapping-wrap.html">/sys/wrapping/wrap</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-ha") %>>
|
||||
<li<%= sidebar_current("docs-http-ha") %>>
|
||||
<a href="#">High Availability</a>
|
||||
<ul class="nav nav-visible">
|
||||
<li<%= sidebar_current("docs-http-ha-leader") %>>
|
||||
@ -148,39 +148,54 @@
|
||||
<a href="/docs/http/sys-step-down.html">/sys/step-down</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-rotate") %>>
|
||||
<li<%= sidebar_current("docs-http-replication") %>>
|
||||
<a href="#">Replication</a>
|
||||
<ul class="nav nav-visible">
|
||||
<li<%= sidebar_current("docs-http-replication-common") %>>
|
||||
<a href="/docs/http/sys-replication-common.html">/sys/replication (common)</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-replication-primary") %>>
|
||||
<a href="/docs/http/sys-replication-primary.html">/sys/replication/primary</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-replication-secondary") %>>
|
||||
<a href="/docs/http/sys-replication-secondary.html">/sys/replication/secondary</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-rotate") %>>
|
||||
<a href="#">Key Rotation</a>
|
||||
<ul class="nav nav-visible">
|
||||
<li<%= sidebar_current("docs-http-rotate-key-status") %>>
|
||||
<a href="/docs/http/sys-key-status.html">/sys/key-status</a>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-rotate-rekey") %>>
|
||||
<a href="/docs/http/sys-rekey.html">/sys/rekey/</a>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-rotate-rotate") %>>
|
||||
<a href="/docs/http/sys-rotate.html">/sys/rotate</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-debug") %>>
|
||||
<li<%= sidebar_current("docs-http-debug") %>>
|
||||
<a href="#">Debug</a>
|
||||
<ul class="nav nav-visible">
|
||||
<li<%= sidebar_current("docs-http-debug-raw") %>>
|
||||
<a href="/docs/http/sys-raw.html">/sys/raw</a>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-debug-health") %>>
|
||||
<a href="/docs/http/sys-health.html">/sys/health</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
|
||||
<li<%= sidebar_current("docs-http-secret") %>>
|
||||
<a href="/docs/secrets/index.html">Secret Backends</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user