From ddd55bc77ca0195ba9e0576df6df39702abe5614 Mon Sep 17 00:00:00 2001 From: thejsj Date: Mon, 30 Jan 2017 16:42:17 -0800 Subject: [PATCH 1/6] Add VAULT_HOSTNAME and VAULT_PORT --- consul-resources/templates/template-config.hcl.ctmpl | 2 +- init.sh | 12 ++++++++++++ lib/vault.sh | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl index c9560f5..3c38f6f 100644 --- a/consul-resources/templates/template-config.hcl.ctmpl +++ b/consul-resources/templates/template-config.hcl.ctmpl @@ -1,7 +1,7 @@ consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" vault { - address = "http://{{ env "CONSUL_HOSTNAME" }}:8200" + address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" token = "{{ env "VAULT_TOKEN" }}" renew = false } diff --git a/init.sh b/init.sh index 6f19416..442fad5 100644 --- a/init.sh +++ b/init.sh @@ -19,6 +19,18 @@ else export CONSUL_HOSTNAME fi +if [ -z "${VAULT_PORT+x}" ]; then + export VAULT_PORT=8200 +else + export VAULT_PORT +fi + +if [ -z "${VAULT_HOSTNAME+x}" ]; then + export VAULT_HOSTNAME=CONSUL_HOSTNAME +else + export VAULT_HOSTNAME +fi + export DOCKER_NETWORK=172.17.0.0/16 source "${DOCK_INIT_BASE}/lib/consul.sh" diff --git a/lib/vault.sh b/lib/vault.sh index dbe23c3..74aff74 100644 --- a/lib/vault.sh +++ b/lib/vault.sh @@ -16,7 +16,7 @@ vault::create_s3_policy() { "Dock-Init: Cannot create policy template for ${bucket}" \ "Attempting to create s3 policy template. ${OUTPUT}" - export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" + export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" log::info "Attempting to create s3 policy template for bucket ${bucket}" local policy_template="${DOCK_INIT_BASE}/vault-resources/s3.policy" @@ -35,7 +35,7 @@ vault::set_s3_keys() { "Dock-Init: Cannot create policy template" \ "Attempting to create s3 policy template. ${OUTPUT}" - export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" + export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" log::info "Attempting get s3 creds" # Key Value # lease_id aws/creds/deploy/7cb8df71-782f-3de1-79dd-251778e49f58 From df615a425a7f39f4535cea68370b8b3c819b279c Mon Sep 17 00:00:00 2001 From: thejsj Date: Mon, 30 Jan 2017 17:44:25 -0800 Subject: [PATCH 2/6] Fix ENV --- 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch | 72 +++++++++++++++++++ .../templates/template-config.hcl.ctmpl | 2 +- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch diff --git a/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch b/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch new file mode 100644 index 0000000..6f08a1b --- /dev/null +++ b/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch @@ -0,0 +1,72 @@ +From ddd55bc77ca0195ba9e0576df6df39702abe5614 Mon Sep 17 00:00:00 2001 +From: thejsj +Date: Mon, 30 Jan 2017 16:42:17 -0800 +Subject: [PATCH] Add VAULT_HOSTNAME and VAULT_PORT + +--- + consul-resources/templates/template-config.hcl.ctmpl | 2 +- + init.sh | 12 ++++++++++++ + lib/vault.sh | 4 ++-- + 3 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl +index c9560f5..3c38f6f 100644 +--- a/consul-resources/templates/template-config.hcl.ctmpl ++++ b/consul-resources/templates/template-config.hcl.ctmpl +@@ -1,7 +1,7 @@ + consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" + + vault { +- address = "http://{{ env "CONSUL_HOSTNAME" }}:8200" ++ address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" + token = "{{ env "VAULT_TOKEN" }}" + renew = false + } +diff --git a/init.sh b/init.sh +index 6f19416..442fad5 100644 +--- a/init.sh ++++ b/init.sh +@@ -19,6 +19,18 @@ else + export CONSUL_HOSTNAME + fi + ++if [ -z "${VAULT_PORT+x}" ]; then ++ export VAULT_PORT=8200 ++else ++ export VAULT_PORT ++fi ++ ++if [ -z "${VAULT_HOSTNAME+x}" ]; then ++ export VAULT_HOSTNAME=CONSUL_HOSTNAME ++else ++ export VAULT_HOSTNAME ++fi ++ + export DOCKER_NETWORK=172.17.0.0/16 + + source "${DOCK_INIT_BASE}/lib/consul.sh" +diff --git a/lib/vault.sh b/lib/vault.sh +index dbe23c3..74aff74 100644 +--- a/lib/vault.sh ++++ b/lib/vault.sh +@@ -16,7 +16,7 @@ vault::create_s3_policy() { + "Dock-Init: Cannot create policy template for ${bucket}" \ + "Attempting to create s3 policy template. ${OUTPUT}" + +- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" ++ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" + log::info "Attempting to create s3 policy template for bucket ${bucket}" + + local policy_template="${DOCK_INIT_BASE}/vault-resources/s3.policy" +@@ -35,7 +35,7 @@ vault::set_s3_keys() { + "Dock-Init: Cannot create policy template" \ + "Attempting to create s3 policy template. ${OUTPUT}" + +- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" ++ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" + log::info "Attempting get s3 creds" + # Key Value + # lease_id aws/creds/deploy/7cb8df71-782f-3de1-79dd-251778e49f58 +-- +2.9.0 + diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl index 3c38f6f..a6c5818 100644 --- a/consul-resources/templates/template-config.hcl.ctmpl +++ b/consul-resources/templates/template-config.hcl.ctmpl @@ -1,7 +1,7 @@ consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" vault { - address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" + address = "http://{{ env "VAULT_HOSTNAME" }}:{{ env "VAULT_PORT" }}" token = "{{ env "VAULT_TOKEN" }}" renew = false } From 018ba78e2e576b44a1a5d8f4be4c58ce1948c193 Mon Sep 17 00:00:00 2001 From: thejsj Date: Mon, 30 Jan 2017 18:04:28 -0800 Subject: [PATCH 3/6] Fix VAULT_HOSTNAME --- 0001-Fix-ENV.patch | 105 +++++++++++++++++++++++++++++++++++++++++++++ init.sh | 2 +- 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-ENV.patch diff --git a/0001-Fix-ENV.patch b/0001-Fix-ENV.patch new file mode 100644 index 0000000..5a34af6 --- /dev/null +++ b/0001-Fix-ENV.patch @@ -0,0 +1,105 @@ +From df615a425a7f39f4535cea68370b8b3c819b279c Mon Sep 17 00:00:00 2001 +From: thejsj +Date: Mon, 30 Jan 2017 17:44:25 -0800 +Subject: [PATCH] Fix ENV + +--- + 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch | 72 ++++++++++++++++++++++ + .../templates/template-config.hcl.ctmpl | 2 +- + 2 files changed, 73 insertions(+), 1 deletion(-) + create mode 100644 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch + +diff --git a/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch b/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch +new file mode 100644 +index 0000000..6f08a1b +--- /dev/null ++++ b/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch +@@ -0,0 +1,72 @@ ++From ddd55bc77ca0195ba9e0576df6df39702abe5614 Mon Sep 17 00:00:00 2001 ++From: thejsj ++Date: Mon, 30 Jan 2017 16:42:17 -0800 ++Subject: [PATCH] Add VAULT_HOSTNAME and VAULT_PORT ++ ++--- ++ consul-resources/templates/template-config.hcl.ctmpl | 2 +- ++ init.sh | 12 ++++++++++++ ++ lib/vault.sh | 4 ++-- ++ 3 files changed, 15 insertions(+), 3 deletions(-) ++ ++diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl ++index c9560f5..3c38f6f 100644 ++--- a/consul-resources/templates/template-config.hcl.ctmpl +++++ b/consul-resources/templates/template-config.hcl.ctmpl ++@@ -1,7 +1,7 @@ ++ consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" ++ ++ vault { ++- address = "http://{{ env "CONSUL_HOSTNAME" }}:8200" +++ address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" ++ token = "{{ env "VAULT_TOKEN" }}" ++ renew = false ++ } ++diff --git a/init.sh b/init.sh ++index 6f19416..442fad5 100644 ++--- a/init.sh +++++ b/init.sh ++@@ -19,6 +19,18 @@ else ++ export CONSUL_HOSTNAME ++ fi ++ +++if [ -z "${VAULT_PORT+x}" ]; then +++ export VAULT_PORT=8200 +++else +++ export VAULT_PORT +++fi +++ +++if [ -z "${VAULT_HOSTNAME+x}" ]; then +++ export VAULT_HOSTNAME=CONSUL_HOSTNAME +++else +++ export VAULT_HOSTNAME +++fi +++ ++ export DOCKER_NETWORK=172.17.0.0/16 ++ ++ source "${DOCK_INIT_BASE}/lib/consul.sh" ++diff --git a/lib/vault.sh b/lib/vault.sh ++index dbe23c3..74aff74 100644 ++--- a/lib/vault.sh +++++ b/lib/vault.sh ++@@ -16,7 +16,7 @@ vault::create_s3_policy() { ++ "Dock-Init: Cannot create policy template for ${bucket}" \ ++ "Attempting to create s3 policy template. ${OUTPUT}" ++ ++- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" +++ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" ++ log::info "Attempting to create s3 policy template for bucket ${bucket}" ++ ++ local policy_template="${DOCK_INIT_BASE}/vault-resources/s3.policy" ++@@ -35,7 +35,7 @@ vault::set_s3_keys() { ++ "Dock-Init: Cannot create policy template" \ ++ "Attempting to create s3 policy template. ${OUTPUT}" ++ ++- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" +++ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" ++ log::info "Attempting get s3 creds" ++ # Key Value ++ # lease_id aws/creds/deploy/7cb8df71-782f-3de1-79dd-251778e49f58 ++-- ++2.9.0 ++ +diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl +index 3c38f6f..a6c5818 100644 +--- a/consul-resources/templates/template-config.hcl.ctmpl ++++ b/consul-resources/templates/template-config.hcl.ctmpl +@@ -1,7 +1,7 @@ + consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" + + vault { +- address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" ++ address = "http://{{ env "VAULT_HOSTNAME" }}:{{ env "VAULT_PORT" }}" + token = "{{ env "VAULT_TOKEN" }}" + renew = false + } +-- +2.9.0 + diff --git a/init.sh b/init.sh index 442fad5..e4018cb 100644 --- a/init.sh +++ b/init.sh @@ -26,7 +26,7 @@ else fi if [ -z "${VAULT_HOSTNAME+x}" ]; then - export VAULT_HOSTNAME=CONSUL_HOSTNAME + export VAULT_HOSTNAME=$CONSUL_HOSTNAME else export VAULT_HOSTNAME fi From 961c886bf0cbe406ad370d04db4b7cab6e13311c Mon Sep 17 00:00:00 2001 From: thejsj Date: Mon, 30 Jan 2017 18:19:16 -0800 Subject: [PATCH 4/6] Remove patch files --- 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch | 72 ------------- 0001-Fix-ENV.patch | 105 ------------------- 2 files changed, 177 deletions(-) delete mode 100644 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch delete mode 100644 0001-Fix-ENV.patch diff --git a/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch b/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch deleted file mode 100644 index 6f08a1b..0000000 --- a/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch +++ /dev/null @@ -1,72 +0,0 @@ -From ddd55bc77ca0195ba9e0576df6df39702abe5614 Mon Sep 17 00:00:00 2001 -From: thejsj -Date: Mon, 30 Jan 2017 16:42:17 -0800 -Subject: [PATCH] Add VAULT_HOSTNAME and VAULT_PORT - ---- - consul-resources/templates/template-config.hcl.ctmpl | 2 +- - init.sh | 12 ++++++++++++ - lib/vault.sh | 4 ++-- - 3 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl -index c9560f5..3c38f6f 100644 ---- a/consul-resources/templates/template-config.hcl.ctmpl -+++ b/consul-resources/templates/template-config.hcl.ctmpl -@@ -1,7 +1,7 @@ - consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" - - vault { -- address = "http://{{ env "CONSUL_HOSTNAME" }}:8200" -+ address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" - token = "{{ env "VAULT_TOKEN" }}" - renew = false - } -diff --git a/init.sh b/init.sh -index 6f19416..442fad5 100644 ---- a/init.sh -+++ b/init.sh -@@ -19,6 +19,18 @@ else - export CONSUL_HOSTNAME - fi - -+if [ -z "${VAULT_PORT+x}" ]; then -+ export VAULT_PORT=8200 -+else -+ export VAULT_PORT -+fi -+ -+if [ -z "${VAULT_HOSTNAME+x}" ]; then -+ export VAULT_HOSTNAME=CONSUL_HOSTNAME -+else -+ export VAULT_HOSTNAME -+fi -+ - export DOCKER_NETWORK=172.17.0.0/16 - - source "${DOCK_INIT_BASE}/lib/consul.sh" -diff --git a/lib/vault.sh b/lib/vault.sh -index dbe23c3..74aff74 100644 ---- a/lib/vault.sh -+++ b/lib/vault.sh -@@ -16,7 +16,7 @@ vault::create_s3_policy() { - "Dock-Init: Cannot create policy template for ${bucket}" \ - "Attempting to create s3 policy template. ${OUTPUT}" - -- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" -+ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" - log::info "Attempting to create s3 policy template for bucket ${bucket}" - - local policy_template="${DOCK_INIT_BASE}/vault-resources/s3.policy" -@@ -35,7 +35,7 @@ vault::set_s3_keys() { - "Dock-Init: Cannot create policy template" \ - "Attempting to create s3 policy template. ${OUTPUT}" - -- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" -+ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" - log::info "Attempting get s3 creds" - # Key Value - # lease_id aws/creds/deploy/7cb8df71-782f-3de1-79dd-251778e49f58 --- -2.9.0 - diff --git a/0001-Fix-ENV.patch b/0001-Fix-ENV.patch deleted file mode 100644 index 5a34af6..0000000 --- a/0001-Fix-ENV.patch +++ /dev/null @@ -1,105 +0,0 @@ -From df615a425a7f39f4535cea68370b8b3c819b279c Mon Sep 17 00:00:00 2001 -From: thejsj -Date: Mon, 30 Jan 2017 17:44:25 -0800 -Subject: [PATCH] Fix ENV - ---- - 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch | 72 ++++++++++++++++++++++ - .../templates/template-config.hcl.ctmpl | 2 +- - 2 files changed, 73 insertions(+), 1 deletion(-) - create mode 100644 0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch - -diff --git a/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch b/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch -new file mode 100644 -index 0000000..6f08a1b ---- /dev/null -+++ b/0001-Add-VAULT_HOSTNAME-and-VAULT_PORT.patch -@@ -0,0 +1,72 @@ -+From ddd55bc77ca0195ba9e0576df6df39702abe5614 Mon Sep 17 00:00:00 2001 -+From: thejsj -+Date: Mon, 30 Jan 2017 16:42:17 -0800 -+Subject: [PATCH] Add VAULT_HOSTNAME and VAULT_PORT -+ -+--- -+ consul-resources/templates/template-config.hcl.ctmpl | 2 +- -+ init.sh | 12 ++++++++++++ -+ lib/vault.sh | 4 ++-- -+ 3 files changed, 15 insertions(+), 3 deletions(-) -+ -+diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl -+index c9560f5..3c38f6f 100644 -+--- a/consul-resources/templates/template-config.hcl.ctmpl -++++ b/consul-resources/templates/template-config.hcl.ctmpl -+@@ -1,7 +1,7 @@ -+ consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" -+ -+ vault { -+- address = "http://{{ env "CONSUL_HOSTNAME" }}:8200" -++ address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" -+ token = "{{ env "VAULT_TOKEN" }}" -+ renew = false -+ } -+diff --git a/init.sh b/init.sh -+index 6f19416..442fad5 100644 -+--- a/init.sh -++++ b/init.sh -+@@ -19,6 +19,18 @@ else -+ export CONSUL_HOSTNAME -+ fi -+ -++if [ -z "${VAULT_PORT+x}" ]; then -++ export VAULT_PORT=8200 -++else -++ export VAULT_PORT -++fi -++ -++if [ -z "${VAULT_HOSTNAME+x}" ]; then -++ export VAULT_HOSTNAME=CONSUL_HOSTNAME -++else -++ export VAULT_HOSTNAME -++fi -++ -+ export DOCKER_NETWORK=172.17.0.0/16 -+ -+ source "${DOCK_INIT_BASE}/lib/consul.sh" -+diff --git a/lib/vault.sh b/lib/vault.sh -+index dbe23c3..74aff74 100644 -+--- a/lib/vault.sh -++++ b/lib/vault.sh -+@@ -16,7 +16,7 @@ vault::create_s3_policy() { -+ "Dock-Init: Cannot create policy template for ${bucket}" \ -+ "Attempting to create s3 policy template. ${OUTPUT}" -+ -+- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" -++ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" -+ log::info "Attempting to create s3 policy template for bucket ${bucket}" -+ -+ local policy_template="${DOCK_INIT_BASE}/vault-resources/s3.policy" -+@@ -35,7 +35,7 @@ vault::set_s3_keys() { -+ "Dock-Init: Cannot create policy template" \ -+ "Attempting to create s3 policy template. ${OUTPUT}" -+ -+- export VAULT_ADDR="http://${CONSUL_HOSTNAME}:8200" -++ export VAULT_ADDR="http://${VAULT_HOSTNAME}:${VAULT_PORT}" -+ log::info "Attempting get s3 creds" -+ # Key Value -+ # lease_id aws/creds/deploy/7cb8df71-782f-3de1-79dd-251778e49f58 -+-- -+2.9.0 -+ -diff --git a/consul-resources/templates/template-config.hcl.ctmpl b/consul-resources/templates/template-config.hcl.ctmpl -index 3c38f6f..a6c5818 100644 ---- a/consul-resources/templates/template-config.hcl.ctmpl -+++ b/consul-resources/templates/template-config.hcl.ctmpl -@@ -1,7 +1,7 @@ - consul = "{{ env "CONSUL_HOSTNAME" }}:{{ env "CONSUL_PORT" }}" - - vault { -- address = "http://{{ env "VAULT_HOSTNAME" }}:{{ VAULT_PORT }}" -+ address = "http://{{ env "VAULT_HOSTNAME" }}:{{ env "VAULT_PORT" }}" - token = "{{ env "VAULT_TOKEN" }}" - renew = false - } --- -2.9.0 - From 4690cf9f95bba38816cf01a41de49bac39681f9b Mon Sep 17 00:00:00 2001 From: thejsj Date: Wed, 1 Feb 2017 13:19:06 -0800 Subject: [PATCH 5/6] Never use the default host --- init.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index e4018cb..a24e506 100644 --- a/init.sh +++ b/init.sh @@ -14,7 +14,8 @@ else fi if [ -z "${CONSUL_HOSTNAME+x}" ]; then - export CONSUL_HOSTNAME=10.4.5.144 + log::fatal "CONSUL_HOSTNAME is not defined" + exit 1 else export CONSUL_HOSTNAME fi From fb8b020b48a104b1ca9f5459fc60e14f1b94dc65 Mon Sep 17 00:00:00 2001 From: thejsj Date: Wed, 1 Feb 2017 13:19:52 -0800 Subject: [PATCH 6/6] Move up the log dependency --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index a24e506..2f40a3a 100644 --- a/init.sh +++ b/init.sh @@ -6,6 +6,7 @@ export DOCK_INIT_BASE=/opt/runnable/dock-init export HOST_IP=$(hostname -i) +source "${DOCK_INIT_BASE}/lib/util/log.sh" if [ -z "${CONSUL_PORT+x}" ]; then export CONSUL_PORT=8500 @@ -39,7 +40,6 @@ source "${DOCK_INIT_BASE}/lib/aws.sh" source "${DOCK_INIT_BASE}/lib/dock.sh" source "${DOCK_INIT_BASE}/lib/container.sh" source "${DOCK_INIT_BASE}/lib/iptables.sh" -source "${DOCK_INIT_BASE}/lib/util/log.sh" # Initializes the dock main() {