Skip to content

nicklhw/vault-replication-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vault Enterprise Replication Demo with Docker Compose

THIS REPO IS NOT FOR PRODUCTION USE, HASHICORP PROVIDES NO WARRANTY OR SUPPORT FOR THIS REPO.

Stands up four 3-nodes Vault Enterprise clusters to demo replication.

Vault Enterprise Replication Architecture

Quick Start

  1. Obtain a Vault Enterprise license, export the content of the license file as an environment variable call VAULT_LICENSE
export VAULT_LICENSE=$(cat ~/Downloads/vault.hclic)
  1. Install Docker Compose, it should come with Docker Desktop on Mac.
  2. Run gen_certs.sh under the tls folder to create self-signed certs for the Vault clusters.
  3. Run make all to start the docker containers.
  4. Run make ui to open the browser UI for all four Vault clusters.
  5. Run make tf-apply to create the KV and PKI mounts using Terraform.
  6. Run make promote-dr-c2 to promote vault_c2 as DR primary. The promotion script pauses the containers for vault_c1 and updates haproxy configuration to point to vault_c2 as the primary cluster, remember to roll back these changes if you want to rebuild the environment from scratch.
  7. Run make rep-status to view replication status of all clusters.
  8. Run make demote-primary-c1 to unpause vault_c1 containers and demote the vault_c1 cluster to a DR secondary to vault_c2.
  9. Run make failback-c1 to failback vault_c1 as DR primary and demote vault_c2 as DR secondary.
  10. Run make clean to tear down the environment.

Resources

About

Vault enterprise replication demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published