-
Notifications
You must be signed in to change notification settings - Fork 116
[VAULT] Add run Vault on zCX page #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
361b6c7
9444b42
7382f04
b78ebd6
b3623ac
2af9a0b
b1c0329
f6d1a63
7d57464
f062358
bbbf1bb
d7e6508
857f625
0d782ba
09eb851
c34e4b6
a672121
76d5099
e7c49be
d2df18e
3f4ea0d
29356b2
6af32f9
c0aa10d
d05af67
0086f3c
5b6cd25
a7973e1
551c157
0ea8546
7c0e8ea
5eb183b
25e8216
7de16f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 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" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
yhyakuna marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to replace the TBDs with actual commands
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing actual command
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing actual command
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```shell-session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $ cat /secure/location/vault-init.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Unseal Vault on all nodes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Limit one command per code block |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Remember to unseal with same key that you got from leader. Check the seal status. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
To which volume? So far we've only told folks to create volumes for Vault data and Vault config files.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ☝️ @Shobhit-IBM
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove this command 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we also set the For example;
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ☝️ @Shobhit-IBM
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Verify cluster | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. List all the leader and follower nodes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```shell-session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $ vault operator raft list-peers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Test container health on browser using HAProxy endpoint. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```plaintext | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| https://<LOAD_BALANCER_IP>:<PORT>/stats | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+345
to
+347
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+351
to
+357
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
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) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.