From 6eead7c860076123a305b249d338fac6bd5b5f8c Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Fri, 27 Mar 2015 15:28:08 -0400 Subject: [PATCH] Add logentries reporting to the ephemeral builders. --- buildman/manager/executor.py | 1 + buildman/templates/cloudconfig.yaml | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/buildman/manager/executor.py b/buildman/manager/executor.py index b548420f5..b6a293fc0 100644 --- a/buildman/manager/executor.py +++ b/buildman/manager/executor.py @@ -69,6 +69,7 @@ class BuilderExecutor(object): manager_hostname=manager_hostname, coreos_channel=coreos_channel, worker_tag=self.executor_config['WORKER_TAG'], + logentries_token=self.executor_config.get('LOGENTRIES_TOKEN', None), ) diff --git a/buildman/templates/cloudconfig.yaml b/buildman/templates/cloudconfig.yaml index 51bb2f090..29f7ccc5a 100644 --- a/buildman/templates/cloudconfig.yaml +++ b/buildman/templates/cloudconfig.yaml @@ -12,6 +12,9 @@ write_files: REALM={{ realm }} TOKEN={{ token }} SERVER=wss://{{ manager_hostname }} + {% if logentries_token -%} + LOGENTRIES_TOKEN={{ logentries_token }} + {%- endif %} coreos: update: @@ -29,3 +32,10 @@ coreos: flattened=True, restart_policy='no' ) | indent(4) }} + {% if logentries_token -%} + {{ dockersystemd('builder-logs', + 'quay.io/kelseyhightower/journal-2-logentries', + extra_args='--env-file /root/overrides.list -v /run/journald.sock:/run/journald.sock', + after_units=['quay-builder'] + ) | indent(4) }} + {%- endif %}