Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
361b6c7
Add run Vault on zCX page
yhyakuna Dec 8, 2025
9444b42
Merge branch 'main' into deploy-vault-zcx-cluster
yhyakuna Dec 8, 2025
7382f04
Add enterprise badge
yhyakuna Dec 8, 2025
b78ebd6
Merge branch 'main' into deploy-vault-zcx-cluster
yhyakuna Dec 9, 2025
b3623ac
Merge branch 'main' into deploy-vault-zcx-cluster
yhyakuna Dec 9, 2025
2af9a0b
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
b1c0329
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
f6d1a63
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
7d57464
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
f062358
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
bbbf1bb
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
d7e6508
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
857f625
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
0d782ba
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
09eb851
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
c34e4b6
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
a672121
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
76d5099
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
e7c49be
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
d2df18e
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
3f4ea0d
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
29356b2
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
6af32f9
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
c0aa10d
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
d05af67
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
0086f3c
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
5b6cd25
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
a7973e1
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
551c157
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
0ea8546
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
7c0e8ea
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
5eb183b
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
25e8216
Update content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
yhyakuna Dec 10, 2025
7de16f2
Apply suggestion from @schavis
schavis Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
363 changes: 363 additions & 0 deletions content/vault/v1.21.x/content/docs/deploy/run-as-zcx-cluster.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,363 @@
---
layout: docs
page_title: Run Vault on IBM z/OS Container Extensions
description: >-
Step-by-step guide to deploying a secure 3-node Vault cluster inside IBM zCX using HAProxy and TLS.
---

# Run Vault on IBM z/OS Container Extensions (zCX)

Deploy a fully secured 3-node HashiCorp Vault Enterprise cluster on IBM z/OS
Container Extensions (zCX) with:

- Three independent zCX instances running Vault on unique IP addressed.
- A Layer-4 HAProxy load balancer to distribute traffic.
- End-to-end TLS encryption to ensure secure communication throughout the cluster.

![Vault zCX cluster deployment](/img/run-as-zcx-cluster.png)

## Before you start

- **Read about [sealing and unsealing](/vault/docs/concepts/seal) Vault**. You
cannot test your deployment without unsealing Vault.

- **Install the [Docker CLI](https://www.docker.com/products/cli/)**. You must
be able to interact with Docker containers as part of the deploy process.

- **Check your permissions**. You must have permission to:
- Deploy and update Docker containers.
- Run `vault operator` commands.
- Configure and deploy your load balancer.

- **You must have your encryption certificates**. To secure communication in the
cluster between Vault clients, HAProxy, and other nodes you must have the
following certificates:
- **`vault.pem`** - the TLS certificate that secures communication between nodes
- **`vault.key`** - the private encryption key used by Vault
- **`ca.pem`** - the certificate authority (CA) used to validate mutual TLS
between nodes
## Step 1: Get the Vault Enterprise image from Docker

1. Use the Docker CLI to pull official Vault Enterprise container images on all three zCX nodes:

```shell-session
$ docker pull hashicorp/vault-enterprise
```

1. Verify image integrity.

```shell-session
$ docker images | grep vault-enterprise
```

## Step 2: Create a persistent volume on each node

Create Docker volumes for configuration and data persistence on each node.

1. Create volume for Vault data storage including an internal storage backend and space for audit logs:

```shell-session
$ docker volume create vault-data
```

1. Create a separate volume for Vault configuration files:

```shell-session
$ docker volume create vault-config
```

1. Verify volume creation for both volumes:

```shell-session
$ docker volume ls | grep vault
```

You now have two explicit volume mount points for Vault:

Volume name | Mount path | Stores
-------------- | ----------------- | ------
`vault-data` | `/vault/data` | Internal storage snapshots, encrypted storage backend
`vault-config` | `/vault/config.d` | Vault configuration files

## Step 3: Create your Vault configuration files

Create individual Vault configuration files for the leader node and follower
nodes with node-specific parameters.


1. Create a configuration file, `vault-leader.hcl` for Vault leader nodes. For
example, the following configuration file exposes Vault on port 8200 for API
and UI traffic and sets `tls_disable` to `0` to force TLS communication
within the cluster:

```hcl
ui = true
disable_mlock = true

# --- Listener Configuration ---
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 0
tls_cert_file = "/vault/vault.pem"
tls_key_file = "/vault/vault.key"
tls_client_ca_file = "/vault/ca.pem"
}

# --- Raft Storage (Leader Node) ---
storage "raft" {
path = "/vault/data"
node_id = "<LEADER_NODE_ID>" # e.g., "node1"

# No retry_join block needed for leader
}

# --- Cluster Networking ---
api_addr = "https://<LEADER_IP>:8200"
cluster_addr = "https://<LEADER_IP>:8201"
```



1. Create a configuration file, `vault-follower.hcl` for Vault follower nodes.
For example, the following configuration file exposes Vault on port 8200 for
API and UI traffic, sets `tls_disable` to `0` to force TLS communication
within the cluster, and sets the leader information so that followers know
how to join the cluster:

```hcl
ui = true
disable_mlock = true

# --- Listener Configuration ---
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 0
tls_cert_file = "/vault/vault.pem"
tls_key_file = "/vault/vault.key"
tls_client_ca_file = "/vault/ca.pem"
}

# --- Raft Storage (Follower Node) ---
storage "raft" {
path = "/vault/data"
node_id = "<FOLLOWER_NODE_ID>" # e.g., "node2" or "node3"

retry_join {
leader_api_addr = "https://<LEADER_IP>:8200"
leader_ca_cert_file = "/vault/ca.pem"
}
}

# --- Cluster Networking ---
api_addr = "https://<FOLLOWER_IP>:8200"
cluster_addr = "https://<FOLLOWER_IP>:8201"
```

## Step 4: Push the configuration files and certificates

1. Use the Docker CLI to access the `vault-config` volume:

```shell-session
$ docker run --rm -it -v vault-config:/vault alpine sh
```

1. Add the leader configuration files to the volume:

```shell-session
$ TBD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to replace the TBDs with actual commands

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ @Shobhit-IBM What command should go here?

```

1. Add the follower configuration files to the volume:

```shell-session
$ TBD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing actual command

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ @Shobhit-IBM What command should go here?

```

1. Use the Docker CLI to access the `vault-data` volume:

```shell-session
$ docker run --rm -it -v vault-data:/vault alpine sh
```

1. 2. Add the certificate files to the volume:
```shell-session
$ TBD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing actual command

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ @Shobhit-IBM What command should go here?

```
## Step 5: Deploy the Vault container

Deploy the Vault container on each zCX node.

1. Set and export the Vault license environment variable, `VAULT_LICENSE` to
your Enterprise license token.

```shell-session
$ export VAULT_LICENSE="02MV4UU43BK5HGYYTOJZWFQMTMNNEWU33JJVVGC..."
```

1. Deploying the Vault Enterprise container on zCX.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Deploying the Vault Enterprise container on zCX.
1. Use Docker to deploy the Vault Enterprise container on zCX:


```shell-session
$ docker run -d \
--name vault-zcx \
--cap-add IPC_LOCK \
-p 8200:8200 \
-p 8201:8201 \
-v vault-config:/vault/config.d \
-v vault-data:/vault/data \
-e VAULT_LICENSE="$VAULT_LICENSE" \
hashicorp/vault-enterprise:1.19.12-ent \
server -config=/vault/config.d/
```

1. Check the deployment by verifying the container status:

```shell-session
$ docker ps | grep vault-zcx
```

1. Check the container log.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Check the container log.
1. Once Docker reports that the container is running, verify <TBD> by checking the container log:

What are they verifying by checking the log? What's the purpose of this step?


```shell-session
$ docker logs vault-zcx
```

## Step 6: Initialize and unseal the leader node

<Note>

Perform the initialization only on the leader node.

</Note>
Comment on lines +226 to +230
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Note>
Perform the initialization only on the leader node.
</Note>

Already called out explicitly in the suggested heading edit


1. Use Docker to call the Vault CLI so you can initialize the leader node and
save the unseal keys to a JSON file, `vault-init.json`:

```shell-session
$ docker exec -it vault-zcx vault operator init \
-format=json > /secure/location/vault-init.json
Comment on lines +236 to +237
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ docker exec -it vault-zcx vault operator init \
-format=json > /secure/location/vault-init.json
$ docker exec -it vault-zcx \
vault operator init \
-format=json > /secure/location/vault-init.json

Break the example code across lines to make it easy to tell what part is the Docker CLI and what part is the Vault CLI

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is /secure/location? Is that a path on the container? A path to a cloud location? Whenever we provide placeholders that may not be immediately obvious, we should provide an accompanying explicit example or not if the path is local to something

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be path in the container where user want to store unseal key and root token for later use

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should clarify that in the doc. These steps bounce between things we run locally and things we run in the container. We need to make sure we're clarifying where each command runs. Part of that is making sure it's clear when a path is a local path or container path

```

By default, `vault operator init` generates five unseal keys and configures
Vault to require three keys as the unseal threshold.

1. Extract unseal keys and root token.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Extract unseal keys and root token.
1. Extract unseal keys and root token from `vault-init.json`:


```shell-session
$ cat /secure/location/vault-init.json
```

1. Unseal Vault on all nodes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Unseal Vault on all nodes.
1. Use three of the keys to unseal Vault on all nodes:


Vault requires a certain threshold of shares to reconstruct the unseal key. Unseal Vault with 3 different unseal keys (repeat on each node).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Vault requires a certain threshold of shares to reconstruct the unseal key. Unseal Vault with 3 different unseal keys (repeat on each node).

How-to guides should focus on explaining how to do something, not how the things works. I recommend adding an item to "Before you start" that notes you must be familiar with how unsealing works in Vault.


```shell-session
$ docker exec -it vault-zcx vault operator unseal <UNSEAL_KEY_1>
$ docker exec -it vault-zcx vault operator unseal <UNSEAL_KEY_2>
$ docker exec -it vault-zcx vault operator unseal <UNSEAL_KEY_3>
Comment on lines +255 to +256
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ docker exec -it vault-zcx vault operator unseal <UNSEAL_KEY_2>
$ docker exec -it vault-zcx vault operator unseal <UNSEAL_KEY_3>

Limit one command per code block

```

1. Remember to unseal with same key that you got from leader. Check the seal status.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Remember to unseal with same key that you got from leader. Check the seal status.
1. Check the status of Vault:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've explicitly framed this step as actions performed against the leader. I'm not sure what "Remember to unseal with same key that you got from leader. " means?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To join a Raft peer, the follower vault instance must be unsealed using the same unseal keys generated during the leader’s vault operator init. All Raft nodes must share these unseal keys to decrypt the cluster’s storage and communicate securely.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, but we've already provided explicit instructions to unseal Vault and generate keys on the leader node. Calling out "remember to use the leader keys" doesn't really make sense in this context. The only keys they have for this step are the leader keys they just generated. Calling it out explicitly here could create confusion since it implies there might be some other keys they should have access to at this point.


```shell-session
$ vault status
```

## Step 7: Configure HAProxy load balancer

In a Vault cluster, the load balancer plays a critical role in directing traffic to the active leader
while maintaining full security. This example uses an HAProxy Layer-4 (TCP) load balancer,
but you can use other load balancers as well depending on your environment and requirements.

- End-to-end TLS encryption: L4 simply forwards TCP connections, so Vault’s TLS traffic remains fully encrypted without terminating SSL at the load balancer.

- Simpler configuration: No need to manage certificates on HAProxy or re-encrypt traffic.

- Leader-aware routing: Vault handles leader redirects natively, so the load balancer doesn’t need to interpret HTTP or Vault protocols.

- Better performance: Forwarding raw TCP reduces overhead, giving lower latency and higher throughput.
Comment on lines +267 to +277
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In a Vault cluster, the load balancer plays a critical role in directing traffic to the active leader
while maintaining full security. This example uses an HAProxy Layer-4 (TCP) load balancer,
but you can use other load balancers as well depending on your environment and requirements.
- End-to-end TLS encryption: L4 simply forwards TCP connections, so Vault’s TLS traffic remains fully encrypted without terminating SSL at the load balancer.
- Simpler configuration: No need to manage certificates on HAProxy or re-encrypt traffic.
- Leader-aware routing: Vault handles leader redirects natively, so the load balancer doesn’t need to interpret HTTP or Vault protocols.
- Better performance: Forwarding raw TCP reduces overhead, giving lower latency and higher throughput.
In a Vault cluster, the load balancer plays a critical role in directing traffic
to the active leader while maintaining full security. We recommend using an
HAProxy Layer-4 (TCP) load balancer, which forwards TCP connections and keeps
Vault TLS traffic fully encrypted without terminating SSL at the load balancer.

It's okay to make a specific recommendation and provide a brief reason why we make that recommendation but how-to guides are not the appropriate place for detailed discussions about the benefits of a particular solution. That kind of information belongs in overviews and/or best practice guides.


### Configuration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Configuration
1. Create a basic configuration file, `haproxy.cfg` with the settings for your
load balancer. For example, the following configuration file
<describe what the configuration file does>:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configures TLS termination in Load balancer for external clients, defines health checks for vault cluster running, and enables Layer-4 TCP forwarding to Vault Raft peers using a round-robin distribution strategy.


```plaintext
global
maxconn 4096
log stdout format raw local0

defaults
mode tcp # TCP mode for Layer-4 forwarding
timeout connect 5s
timeout client 1m
timeout server 1m
log global

# --- Stats Page (HTTPS) ---
frontend stats
bind *:8404 ssl crt /usr/local/etc/haproxy/haproxy.pem
mode http
stats enable
stats uri /stats
stats refresh 10s
stats admin if TRUE

# --- Vault API Frontend (TLS Passthrough) ---
frontend vault_api
bind *:8200 # Listen on Vault API port
mode tcp # Layer-4 forwarding to preserve TLS
default_backend vault_nodes

# --- Vault Nodes Backend ---
backend vault_nodes
mode tcp
balance roundrobin # Simple load distribution among nodes
option tcp-check # Health check at TCP level
server node1 <NODE1_IP>:8200 check
server node2 <NODE2_IP>:8200 check
server node3 <NODE3_IP>:8200 check
```

1. Copy config to volume.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Copy config to volume.
1. Copy the `haproxy.cfg` file to ???.

To which volume? So far we've only told folks to create volumes for Vault data and Vault config files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ @Shobhit-IBM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this command docker cp haproxy.cfg haproxy-tmp:/usr/local/etc/haproxy/haproxy.cfg and instead of this we can use

docker run --name haproxy-tmp -v haproxy-config:/usr/local/etc/haproxy alpine sh -c "sleep 1" \
  && docker cp haproxy.cfg haproxy-tmp:/usr/local/etc/haproxy/haproxy.cfg \
  && docker rm -f haproxy-tmp

this will create a volume named haproxy-config and copies load balancer configuration into docker volume that is later being used during deployment


```shell-session
$ docker cp haproxy.cfg haproxy-tmp:/usr/local/etc/haproxy/haproxy.cfg
```

1. Deploy HAProxy load-balancer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Deploy HAProxy load-balancer.
1. Use the Docker CLI to deploy your HAProxy load-balancer:


```shell-session
$ docker run -d \
--name vault-lb \
-p 8300:8200 \
-p 8404:8404 \
-v haproxy-config:/usr/local/etc/haproxy \
ibmz-hc-registry.ngrok.dev/haproxy:3.2
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also set the VAULT_PROXY_ADDR to the load balancer URL and port for easier API calls later?

For example;

Suggested change
1. Set and export the `VAULT_PROXY_ADDR` environment variable in your local
terminal to the load balancer URL and port:
```shell-session
$ export VAULT_PROXY_ADDR="https://<load_balancer_id>:<port>"
```

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ @Shobhit-IBM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

## Verify cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Verify cluster
## Step 8: Verify your Vault deployment


1. List all the leader and follower nodes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. List all the leader and follower nodes.
1. Use the Vault CLI to list the current leader and follower nodes:


```shell-session
$ vault operator raft list-peers
```

1. Test container health on browser using HAProxy endpoint.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Test container health on browser using HAProxy endpoint.
1. Test the container health by opening the HAProxy load-balancing endpoint,
`https://<load_balancer_ip>:<port>/stats` in your browser.


```plaintext
https://<LOAD_BALANCER_IP>:<PORT>/stats
```
Comment on lines +345 to +347
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```plaintext
https://<LOAD_BALANCER_IP>:<PORT>/stats
```

If we're just providing an example string, there's no need to make it a code block


1. Test secure Vault connection and view Raft configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Test secure Vault connection and view Raft configuration.
1. Test client calls to Vault by verifying the configuration details for the
leader node:


```shell-session
$ curl \
--cacert <CA_CERT_FILE> \
--header "X-Vault-Token: <VAULT_TOKEN>" \
https://<LOAD_BALANCER_IP>:<PORT>/v1/sys/storage/raft/configuration \
| jq .
```
Comment on lines +351 to +357
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```shell-session
$ curl \
--cacert <CA_CERT_FILE> \
--header "X-Vault-Token: <VAULT_TOKEN>" \
https://<LOAD_BALANCER_IP>:<PORT>/v1/sys/storage/raft/configuration \
| jq .
```
<Tabs>
<Tab heading="CLI" group="cli">
```shell-session
$ vault read \
-ca-cert "/path/to/vault.pem" \
-format json \
/sys/storage/raft/configuration \
| jq
```
</Tab>
<Tab heading="API" group="api">
```shell-session
$ curl \
--request POST \
--header "X-Vault-Token: ${VAULT_TOKEN}" \
--namespace "X-Vault-Namespace: ${VAULT_NAMESPACE}" \
--cacert <CA_CERT_FILE> \
${VAULT_PROXY_ADDR}/v1/sys/storage/raft/configuration \
| jq .
```
</Tab>
</Tabs>

We generally want new content to provide examples using both the CLI and the API so folks have example code regardless of which method they prefer


## Additional resources

- [Vault configuration parameters](/vault/docs/configuration)
- [CLI command - `operator init`](/vault/docs/commands/operator/init)
- [CLI command - `operator unseal`](/vault/docs/commands/operator/unseal)
9 changes: 9 additions & 0 deletions content/vault/v1.21.x/data/docs-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,15 @@
"title": "Run as a service",
"path": "deploy/run-as-service"
},
{
"title": "Run on IBM zCX",
"badge": {
"text": "ENT",
"type": "filled",
"color": "neutral"
},
"path": "deploy/run-as-zcx-cluster"
},
{
"title": "Run on AWS",
"routes": [
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading