hashipi

Raspberry Pi Test Cluster for HashiCorp Vault, Nomad and Consul
git clone https://git.in0rdr.ch/hashipi.git
Log | Files | Refs | README

commit 3640ce2dfe7b285f3528f2671a4dfdcf25a31937
parent 9cb5094a55a6f039804fe03f0bd61b24a33f5321
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Thu, 20 Jul 2023 11:24:41 +0200

fix(consul): missing tls stanza for agent

Diffstat:
Mconsul.sh | 42+++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/consul.sh b/consul.sh @@ -54,27 +54,6 @@ bind_addr = "{{GetPrivateInterfaces | exclude \"type\" \"IPv6\" | include \"name performance { raft_multiplier = 5 } -EOF - -systemctl enable consul - -# Configure .bashrc -cat << EOF >> .bashrc - -complete -C /usr/bin/consul consul - -export CONSUL_HTTP_ADDR="https://127.0.0.1:8501" -export CONSUL_CACERT="/opt/consul/tls/consul-agent-ca.pem" -export CONSUL_CLIENT_CERT="/opt/consul/tls/dc1-cli-consul.pem" -export CONSUL_CLIENT_KEY="/opt/consul/tls/dc1-cli-consul-key.pem" -EOF - -if [[ "$CONSUL_SERVER" = true ]]; then -cat << EOF > /etc/consul.d/server.hcl -server { - enabled = true - bootstrap_expect = 3 -} ui_config { enabled = true @@ -97,4 +76,25 @@ tls { } } EOF + +systemctl enable consul + +# Configure .bashrc +cat << EOF >> .bashrc + +complete -C /usr/bin/consul consul + +export CONSUL_HTTP_ADDR="https://127.0.0.1:8501" +export CONSUL_CACERT="/opt/consul/tls/consul-agent-ca.pem" +export CONSUL_CLIENT_CERT="/opt/consul/tls/dc1-cli-consul.pem" +export CONSUL_CLIENT_KEY="/opt/consul/tls/dc1-cli-consul-key.pem" +EOF + +if [[ "$CONSUL_SERVER" = true ]]; then +cat << EOF > /etc/consul.d/server.hcl +server { + enabled = true + bootstrap_expect = 3 +} +EOF fi # endif CONSUL_SERVER