Skip to content

Commit

Permalink
Update for Vault v1.1.4 and Consul v1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
brianshumate committed Jul 26, 2019
1 parent c5630d7 commit 29fadf1
Show file tree
Hide file tree
Showing 47 changed files with 163 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ examples/agent/vaultron-agent-example
custom/consul*
custom/vault*
data/migration
influxdb.conf
influxdb_data
consulc0
consulc1
consulc2
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## NEXT

- Vault v1.1.4
- Consul v1.5.3
- API_ADDR set in config template instead of environment variable
- Add vault_server_log_format and matching TF_VAR for choosing log format

## v3.0.1

- Consul v1.5.2
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Install the following on the system where you will form Vaultron:

- [Docker CE for Linux](https://docs.docker.com/v17.12/install/#server) **or**
- [Docker Desktop for macOS](https://www.docker.com/products/docker-desktop)
- Tested with version 2.0.0.3 (31259)
- [Consul](https://www.consul.io/)
- [OSS consul binaries](https://releases.hashicorp.com/consul/1.5.2/)
- [Terraform](https://www.terraform.io/) (version 0.12.0+ required)
Expand Down Expand Up @@ -323,9 +324,16 @@ Vault datacenter name

- Default: `1`


#### TF_VAR_vault_server_log_format (Vault v0.10.0+)

A valid Vault server log format: _standard_ or _json_

- Default: `standard`

#### TF_VAR_vault_server_log_level

A valid Vault log level: _trace_, _debug_, _info_, _warning_, or _error_
A valid Vault server log level: _trace_, _debug_, _info_, _warning_, or _error_

- Default: `debug`

Expand Down Expand Up @@ -706,7 +714,7 @@ or this:
[e] Vaultron cannot form! Check terraform plan output.
```

This means that Vaultron had problems durring the `terraform plan` or `terraform apply` steps. You can run those commands manually and inspect their output to troubleshoot the issue.
This means that Vaultron had problems during the `terraform plan` or `terraform apply` steps. You can run those commands manually and inspect their output to troubleshoot the issue.

Other red and equally frightening errors could occur, and these are usually accompanied by an explanation from Terraform regarding the nature of the problem.

Expand Down
20 changes: 5 additions & 15 deletions black_lion/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ variable "vault_cluster_name" {
variable "disable_clustering" {
}

variable "vault_server_log_format" {
}

variable "vault_server_log_level" {
}

Expand All @@ -57,7 +60,6 @@ variable "vault_custom_config_template" {
variable "statsd_ip" {
}

// variable "vault_server_tls_disable" {}
variable "vaultron_telemetry_count" {
}

Expand Down Expand Up @@ -136,13 +138,7 @@ resource "docker_container" "vault_oss_server" {
name = "vaultron-${format("vault%d", count.index)}"
image = docker_image.vault.latest

env = ["SKIP_CHOWN"]

#env = [
# "VAULT_API_ADDR=https://${format("10.10.42.20%d", count.index)}:8200",
# "VAULT_REDIRECT_ADDR=https://${format("10.10.42.20%d", count.index)}:8200",
# "VAULT_CLUSTER_ADDR=https://${format("10.10.42.20%d", count.index)}:8201"
#]
env = ["SKIP_CHOWN", "VAULT_LOG_FORMAT=${var.vault_server_log_format}"]

command = ["vault", "server", "-log-level=${var.vault_server_log_level}", "-config=/vault/config"]
hostname = format("vaults%d", count.index)
Expand Down Expand Up @@ -274,13 +270,7 @@ resource "docker_container" "vault_custom_server" {
name = "vaultron-${format("vault%d", count.index)}"
image = docker_image.vault.latest

env = ["SKIP_CHOWN"]

#env = [
# "VAULT_API_ADDR=https://${format("10.10.42.20%d", count.index)}:8200",
# "VAULT_REDIRECT_ADDR=https://${format("10.10.42.20%d", count.index)}:8200",
# "VAULT_CLUSTER_ADDR=https://${format("10.10.42.20%d", count.index)}:8201"
#]
env = ["SKIP_CHOWN", "VAULT_LOG_FORMAT=${var.vault_server_log_format}"]

command = ["/vault/custom/vault", "server", "-log-level=${var.vault_server_log_level}", "-config=/vault/config"]
hostname = format("vaults%d", count.index)
Expand Down
4 changes: 2 additions & 2 deletions black_lion/templates/custom/vault_config_custom.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

api_addr = "${api_addr}"
cluster_addr = "${cluster_addr}"
cluster_name = "${cluster_name}"
# cluster_name = "${cluster_name}"
ui = true

listener "tcp" {
Expand Down Expand Up @@ -39,7 +39,7 @@ max_lease_ttl = "50000h" # 2083 days
plugin_directory = "/vault/plugins"

# -----------------------------------------------------------------------
# Enable Prometheus metrics by default
# Enable Prometheus metrics by default (eventually)
# -----------------------------------------------------------------------

# telemetry {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.10.0.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.10.0

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.10.1.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.10.1

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.10.2.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.10.2

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.10.3.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.10.3

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.10.4.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.10.4

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.11.0.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.11.0

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.11.1.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.11.1

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.11.2.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Enable reloadable log level
log_level = "${log_level}"

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.11.3.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Enable reloadable log level
log_level = "${log_level}"

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.11.4.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Enable reloadable log level
log_level = "${log_level}"

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.11.5.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Enable reloadable log level
log_level = "${log_level}"

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
ui = true

Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.6.1.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.6.1

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.6.2.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.6.2

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.6.3.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.6.3

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.6.4.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.6.4

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.6.5.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.6.5

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.7.0.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.7.0

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.7.2.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.7.2

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.7.3.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.7.3

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.8.0.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.8.0

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.8.1.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.8.1

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.8.2.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.8.2

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.8.3.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.8.3

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.9.0.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.9.0

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.9.1.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.9.1

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.9.2.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.9.2

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.9.3.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.9.3

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.9.4.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.9.4

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.9.5.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.9.5

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_0.9.6.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vault OSS v0.9.6

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"

listener "tcp" {
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.0.0.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.0.1.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.0.2.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.0.3.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.1.0.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.1.1.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.1.2.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
1 change: 1 addition & 0 deletions black_lion/templates/oss/vault_config_1.1.3.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
log_level = "${log_level}"
Expand Down
Loading

0 comments on commit 29fadf1

Please sign in to comment.