From 9abc40e2d7e7359a3edb1534c33b02e3a40853cf Mon Sep 17 00:00:00 2001 From: adam-w-mitchell Date: Wed, 26 Aug 2020 16:19:41 -0700 Subject: [PATCH] feat(sdk): Adding vault configuration default env variable This allows setting VAULT_LOCAL_CONFIG variable from the compose file. This was useful in https://github.com/edgexfoundry/edgex-examples/pull/7 to allow edgex to run in docker swarm because 'mlock' needed to be disabled in the configuration. Signed-off-by: adam-w-mitchell --- cmd/security-secrets-setup/start_vault.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/security-secrets-setup/start_vault.sh b/cmd/security-secrets-setup/start_vault.sh index 1aa2414df5..6ffdc761b3 100755 --- a/cmd/security-secrets-setup/start_vault.sh +++ b/cmd/security-secrets-setup/start_vault.sh @@ -21,7 +21,7 @@ set -e VAULT_TLS_PATH=${VAULT_TLS_PATH:-/tmp/edgex/secrets/edgex-vault} -VAULT_LOCAL_CONFIG=' +DEFAULT_VAULT_LOCAL_CONFIG=' listener "tcp" { address = "edgex-vault:8200" tls_disable = "0" @@ -43,6 +43,8 @@ listener "tcp" { max_lease_ttl = "720h" ' +VAULT_LOCAL_CONFIG=${VAULT_LOCAL_CONFIG:-$DEFAULT_VAULT_LOCAL_CONFIG} + echo "VAULT_LOCAL_CONFIG:" ${VAULT_LOCAL_CONFIG} export VAULT_TLS_PATH VAULT_LOCAL_CONFIG