All Projects → sjourdan → Docker Vault

sjourdan / Docker Vault

Docker Container for Hashicorp's Vault

Projects that are alternatives of or similar to Docker Vault

vim-hcl
Syntax highlighting for HashiCorp Configuration Language (HCL)
Stars: ✭ 83 (+38.33%)
Mutual labels:  consul, vault, hcl
Vaultron
🤖 Vault clusters Terraformed onto Docker for great fun and learning!
Stars: ✭ 96 (+60%)
Mutual labels:  hcl, consul, vault
Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (+5%)
Mutual labels:  hcl, consul, vault
100 Days Of Go
100 days of Go learning
Stars: ✭ 24 (-60%)
Mutual labels:  consul, vault
hcat
Hashicorp Configuration and Templating library (hcat, pronounced hashicat)
Stars: ✭ 89 (+48.33%)
Mutual labels:  consul, vault
vault-consul-swarm
Deploy Vault and Consul with Docker Swarm
Stars: ✭ 20 (-66.67%)
Mutual labels:  consul, vault
go-fsimpl
Go io/fs.FS filesystem implementations for various URL schemes
Stars: ✭ 225 (+275%)
Mutual labels:  consul, vault
docker vault
Docker + Consul + Vault
Stars: ✭ 34 (-43.33%)
Mutual labels:  consul, vault
super-duper-vault-train
🚄▼▼▼▼▼▼
Stars: ✭ 19 (-68.33%)
Mutual labels:  consul, vault
Vault On Gke
Run @HashiCorp Vault on Google Kubernetes Engine (GKE) with Terraform
Stars: ✭ 453 (+655%)
Mutual labels:  hcl, vault
Consul Template
Template rendering, notifier, and supervisor for @hashicorp Consul and Vault data.
Stars: ✭ 4,371 (+7185%)
Mutual labels:  consul, vault
Consul
Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
Stars: ✭ 23,723 (+39438.33%)
Mutual labels:  consul, vault
offensive-infrastructure
Offensive Infrastructure with Modern Technologies
Stars: ✭ 88 (+46.67%)
Mutual labels:  consul, vault
vault-consul-monitoring
Sample project to explore monitoring Vault and Consul with telegraf/influxdb/grafana
Stars: ✭ 52 (-13.33%)
Mutual labels:  consul, vault
vault-load-testing
Automated load tests for Vault and Consul using the locust.io Python framework
Stars: ✭ 44 (-26.67%)
Mutual labels:  consul, vault
nomad-box
Nomad Box - Simple Terraform-powered setup to Azure of clustered Consul, Nomad and Traefik Load Balancer that runs Docker/GoLang/Java workloads. NOTE: Only suitable in dev environments at the moment until I learn more Terraform, Consul, Nomad, Vault :P
Stars: ✭ 18 (-70%)
Mutual labels:  consul, vault
vault-consul-docker
HashiCorp Vault with Consul backend in Docker
Stars: ✭ 20 (-66.67%)
Mutual labels:  consul, vault
Fabio
Consul Load-Balancing made simple
Stars: ✭ 6,834 (+11290%)
Mutual labels:  consul, vault
hookpick
A tool to manage some operational concepts of Hashicorp Vault
Stars: ✭ 83 (+38.33%)
Mutual labels:  consul, vault
vagrant-vault-consul-docker-monitoring
No description or website provided.
Stars: ✭ 20 (-66.67%)
Mutual labels:  consul, vault

Docker Vault

Circle CI

This Docker Vault container is using Alpine Linux minimal image and Hashicorp's Vault.

Vault uses TCP/8200 by default, so we'll keep that. The demo configuration is listening on all interfaces (not just localhost), and using demo.consul.io as per the getting started docs.

Configuration examples are stored under config/ in the git working directory.

The automated latest build is always available at sjourdan/vault:

docker pull sjourdan/vault

Vault Server

Dev mode

Start vault server in a dev mode:

docker run -d \
      -p 8200:8200 \
      --hostname vault \
      --name vault sjourdan/vault

Using the Demo Consul Backend

Start with a demo Consul backend using demo.consul.io:

docker run -d \
      -p 8200:8200 \
      --hostname vault \
      --name vault \
      --volume $PWD/config:/config \
      sjourdan/vault server -config=/config/demo.hcl

Using your own Consul backend

Consul

For this purpose you can use Progrium's Consul Docker box container, it's working great. If you have a running Consul container named consul you can skip the step bellow:

# Starting consul container with web ui on port 8500
docker run -p 8400:8400 -p 8500:8500 -p 8600:53/udp --hostname consul --name consul progrium/consul -server -bootstrap -ui-dir /ui

When your consul service is started and accessible via links or DNS as consul, you can just start vault server using the following command:

docker run -d \
      -p 8200:8200 \
      --hostname vault \
      --name vault \
      --link consul:consul \
      --volume $PWD/config:/config \
      sjourdan/vault server -config=/config/consul.hcl

Using Vault

To initialize Vault, on your workstation with vault installed, first we need to export vault ip address. If you bootstrapped containers on your machine you can use docker inspect -f '{{ .NetworkSettings.IPAddress }}' vault command to get the vault container internal ip address.

# The address must start with protocol specifier!
export VAULT_ADDR='http://a.b.c.d:8200'

And refer to vault documentation on how to initialize and unseal data store. In case if you are evaluating in dev mode of vault server, the empty initialized and unsealed inmem vault data store will be automatically created.

You can simply export the root token printed on vault server startup as export VAULT_TOKEN=PASTE_YOUR_TOKEN_HERE.

To use a vault client from a container you can create a wrapper function like below:

vault () { docker run -it --rm -e VAULT_ADDR --entrypoint=/bin/sh sjourdan/vault -c "vault auth $VAULT_TOKEN &>/dev/null; vault $*" }

The above invocation method of course could directly path-through $VAULT_TOKEN using docker -e option, however we don't want to re-define this environment variable, so we emulate auth session and only after pass arguments to vault.

Also you can use alias, but this overrides $VAULT_TOKEN and is not recommend, since it affects vault client default usage scenario.

alias vault="docker run --rm -e VAULT_ADDR -e VAULT_TOKEN sjourdan/vault"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].