From 0774493af85a8c3d403b98c369252394b942e11c Mon Sep 17 00:00:00 2001
From: Tim Schoof <tim.schoof@desy.de>
Date: Fri, 6 Mar 2020 18:03:33 +0100
Subject: [PATCH] Install fluent-bit and enable raw_exec driver

---
 deploy/nomad_consul_docker/Dockerfile    | 11 ++++++++---
 deploy/nomad_consul_docker/nomad.hcl.tpl |  6 ++++++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/deploy/nomad_consul_docker/Dockerfile b/deploy/nomad_consul_docker/Dockerfile
index e5b1ae786..dd939b596 100644
--- a/deploy/nomad_consul_docker/Dockerfile
+++ b/deploy/nomad_consul_docker/Dockerfile
@@ -9,14 +9,19 @@ RUN apt-get update && apt-get install -y supervisor apt-transport-https \
         software-properties-common dnsutils
 
 
-RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
+RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
+    curl -fsSL https://packages.fluentbit.io/fluentbit.key | apt-key add -
 
 RUN add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
-   stable"
+   stable" && \
+   add-apt-repository \
+   "deb [arch=amd64] https://packages.fluentbit.io/ubuntu/$(lsb_release -cs) \
+   $(lsb_release -cs) \
+   main"
 
-RUN apt-get update && apt-get install -y docker-ce-cli wget unzip iproute2 vim
+RUN apt-get update && apt-get install -y docker-ce-cli wget unzip iproute2 vim td-agent-bit
 
 
 ENV CONSUL_VERSION=1.6.0
diff --git a/deploy/nomad_consul_docker/nomad.hcl.tpl b/deploy/nomad_consul_docker/nomad.hcl.tpl
index 56cf2b426..1d67eb3f6 100644
--- a/deploy/nomad_consul_docker/nomad.hcl.tpl
+++ b/deploy/nomad_consul_docker/nomad.hcl.tpl
@@ -39,6 +39,12 @@ plugin "docker" {
   }
 }
 
+plugin "raw_exec" {
+  config {
+    enabled = true
+  }
+}
+
 telemetry {
   publish_allocation_metrics = $use_telemetry
   publish_node_metrics       = $use_telemetry
-- 
GitLab