Skip to content

Commit

Permalink
Vault 1.5.3 and more
Browse files Browse the repository at this point in the history
  • Loading branch information
brianshumate committed Aug 31, 2020
1 parent b2c87eb commit 141218d
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 42 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 3.5.4

- Vault 1.5.3
- Fix form script
- Remove deprecated use_vault_oss configuration
- Update documentation

## 3.5.3

- Upgrade for Terraform 0.13 compatibility
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ _Diagram of a Vaultron cluster with Consul storage flavor_
- [TF_VAR_docker_host](#tf_var_docker_host)
- [TF_VAR_vault_flavor (Vault v1.4.0-)](#tf_var_vault_flavor-vault-v140)
- [TF_VAR_datacenter_name](#tf_var_datacenter_name)
- [TF_VAR_use_vault_oss](#tf_var_use_vault_oss)
- [TF_VAR_vault_server_log_format (Vault v0.10.0-)](#tf_var_vault_server_log_format-vault-v0100)
- [TF_VAR_vault_server_log_level](#tf_var_vault_server_log_level)
- [TF_VAR_consul_log_level](#tf_var_consul_log_level)
Expand Down Expand Up @@ -566,15 +565,6 @@ Vault datacenter name
- Acceptable values:
- _alphanumeric string_

#### TF_VAR_use_vault_oss

`1` to use OSS Vault binaries from releases.hashicorp.com or `0` when using custom binaries

- Default: `1`
- Acceptable values:
- `0`
- `1`

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

A valid Vault server log format
Expand Down
3 changes: 0 additions & 3 deletions black_lion/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ variable "datacenter_name" {
variable "vault_version" {
}

variable "use_vault_oss" {
}

variable "vault_ent_id" {
}

Expand Down
2 changes: 1 addition & 1 deletion black_lion/templates/oss/vault_config_1.5.1.hcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Vault OSS v1.5.0
# Vault OSS v1.5.1

# -----------------------------------------------------------------------
# Global configuration
Expand Down
2 changes: 1 addition & 1 deletion black_lion/templates/oss/vault_config_1.5.2.hcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Vault OSS v1.5.0
# Vault OSS v1.5.2

# -----------------------------------------------------------------------
# Global configuration
Expand Down
32 changes: 32 additions & 0 deletions black_lion/templates/oss/vault_config_1.5.3.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Vault OSS v1.5.3

# -----------------------------------------------------------------------
# Global configuration
# -----------------------------------------------------------------------

api_addr = "${api_addr}"
cluster_name = "${cluster_name}"
cluster_address = "${cluster_address}"
disable_mlock = "${disable_mlock}"
log_level = "${log_level}"
ui = true
plugin_directory = "/vault/plugins"

# -----------------------------------------------------------------------
# Listener configuration
# -----------------------------------------------------------------------

listener "tcp" {
address = "${address}"
tls_cert_file = "/etc/ssl/certs/vault-server.crt"
tls_key_file = "/etc/ssl/vault-server.key"
}

# -----------------------------------------------------------------------
# Enable Prometheus metrics by default
# -----------------------------------------------------------------------

telemetry {
prometheus_retention_time = "30s"
disable_hostname = false
}
8 changes: 1 addition & 7 deletions flavors/consul/vaultron.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {

# Set TF_VAR_vault_version to override this
variable "vault_version" {
default = "1.5.2"
default = "1.5.3"
}

# Set TF_VAR_consul_version to override this
Expand Down Expand Up @@ -64,11 +64,6 @@ variable "vault_flavor" {
default = "consul"
}

# Set TF_VAR_use_vault_oss to override this
variable "use_vault_oss" {
default = "1"
}

# Set TF_VAR_vault_ent_id to override this
variable "vault_ent_id" {
default = "vault:latest"
Expand Down Expand Up @@ -260,7 +255,6 @@ module "vaultron" {
consul_server_ips = module.consul_cluster.consul_oss_server_ips
consul_client_ips = module.consul_cluster.consul_client_ips
disable_clustering = var.disable_clustering
use_vault_oss = var.use_vault_oss
vault_cluster_name = var.vault_cluster_name
vault_custom_config_template = var.vault_custom_config_template
vault_custom_instance_count = var.vault_custom_instance_count
Expand Down
8 changes: 1 addition & 7 deletions flavors/raft/vaultron.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {

# Set TF_VAR_vault_version to override this
variable "vault_version" {
default = "1.5.2"
default = "1.5.3"
}

# -----------------------------------------------------------------------
Expand Down Expand Up @@ -59,11 +59,6 @@ variable "vault_flavor" {
default = "raft"
}

# Set TF_VAR_use_vault_oss to override this
variable "use_vault_oss" {
default = "1"
}

# Set TF_VAR_vault_ent_id to override this
variable "vault_ent_id" {
default = "vault:latest"
Expand Down Expand Up @@ -173,7 +168,6 @@ module "telemetry" {
module "vaultron" {
source = "../../black_lion"
datacenter_name = var.datacenter_name
use_vault_oss = var.use_vault_oss
vault_cluster_name = var.vault_cluster_name
vault_custom_config_template = var.vault_custom_config_template
vault_custom_instance_count = var.vault_custom_instance_count
Expand Down
22 changes: 11 additions & 11 deletions form
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ check_instance_count() {
# | Raft | 5 | 0 |
# |--------|-------------------|--------------------|
#

case "$TF_VAR_vault_flavor" in
consul)
export TF_VAR_consul_oss_instance_count=3
Expand All @@ -67,11 +68,14 @@ check_instance_count() {
export TF_VAR_consul_oss_instance_count=0
if [ -n "$TF_VAR_vault_custom_instance_count" ]
then
export TF_VAR_vault_custom_instance_count=5 \
TF_VAR_vault_oss_instance_count=0
else
export TF_VAR_vault_custom_instance_count=0 \
if [ "$TF_VAR_vault_custom_instance_count" = "0" ]
then
export TF_VAR_vault_custom_instance_count=0 \
TF_VAR_vault_oss_instance_count=5
else
export TF_VAR_vault_custom_instance_count=5 \
TF_VAR_vault_oss_instance_count=0
fi
fi
;;
*)
Expand Down Expand Up @@ -215,18 +219,14 @@ check_raft_version() {
then
if [ "$TF_VAR_vault_oss_instance_count" != 5 ]
then
msg alert "Cannot form Vaultron Integrated Storage flavor with incorrect instance count."
msg info "Please 'export TF_VAR_vault_oss_instance_count=5' and try again."
exit 1
export TF_VAR_vault_oss_instance_count=5
fi
fi
if [ "$TF_VAR_vault_oss_instance_count" = 0 ]
then
if [ "$TF_VAR_vault_custom_instance_count" != 5 ]
then
msg alert "Cannot form Vaultron Integrated Storage flavor with incorrect instance count."
msg info "Please 'export TF_VAR_vault_custom_instance_count=5' and try again."
exit 1
export TF_VAR_vault_custom_instance_count=5
fi
fi
fi
Expand All @@ -241,7 +241,7 @@ check_flavor
check_instance_count $TF_VAR_vault_flavor
check_raft_version
check_telemetry
if [ "$(check_katakoda)" = "0" ]
if [ "$(check_katacoda)" = "0" ]
then
check_docker
fi
Expand Down
2 changes: 1 addition & 1 deletion skydome
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fi
# -----------------------------------------------------------------------
# Check for signs of execution in a Katakoda environment
# -----------------------------------------------------------------------
check_katakoda() {
check_katacoda() {
if [ "$(hostname)" = "host01" ]
then
if [ "$(hostname)" = "host01" ]
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.3
3.5.4

0 comments on commit 141218d

Please sign in to comment.