Page MenuHomeDevCentral

D3372.diff
No OneTemporary

D3372.diff

diff --git a/_modules/paas_docker.py b/_modules/paas_docker.py
--- a/_modules/paas_docker.py
+++ b/_modules/paas_docker.py
@@ -91,6 +91,20 @@
]
+# -------------------------------------------------------------
+# Docker configuration
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
+def build_daemon_config():
+ network = __salt__["node.resolve_network"]()
+
+ config = __pillar__.get("docker_daemon", {})
+ config["metrics-addr"] = network["private_ipv4_address"] + ":9323"
+
+ return config
+
+
# -------------------------------------------------------------
# Nginx
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/roles/paas-docker/docker/config.sls b/roles/paas-docker/docker/config.sls
--- a/roles/paas-docker/docker/config.sls
+++ b/roles/paas-docker/docker/config.sls
@@ -12,9 +12,8 @@
# Configure Docker engine
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% set daemon = pillar['docker_daemon'] %}
+{% set daemon = salt["paas_docker.build_daemon_config"]() %}
-{% if daemon %}
{{ dirs.etc }}/docker/daemon.json:
file.managed:
- source: salt://roles/paas-docker/docker/files/daemon.json.jinja
@@ -22,4 +21,3 @@
- mode: 644
- context:
daemon: {{ daemon }}
-{% endif %}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 17:59 (21 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2306663
Default Alt Text
D3372.diff (1 KB)

Event Timeline