From 35314e77ee3aa288a07e6792236a9f398225bc67 Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Tue, 7 Feb 2017 10:47:44 +0000 Subject: [PATCH] Move fluentd td.repo to base for consistency Additional repos for centos such as elasticsearch, ceph etc. are all set up in the base image, fluentd should follow this both for consistency and to make it easier for operators to remove/override. Change-Id: If2ee20232d72ccf6b1c4be06c2fb3d1fa219e9cc --- docker/base/Dockerfile.j2 | 12 ++++++++---- docker/base/sources.list.debian | 3 +++ docker/base/sources.list.ubuntu | 3 +++ docker/{fluentd => base}/td.repo | 0 docker/fluentd/Dockerfile.j2 | 8 -------- 5 files changed, 14 insertions(+), 12 deletions(-) rename docker/{fluentd => base}/td.repo (100%) diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index b7816197bb..ed1aa9f27f 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -43,13 +43,13 @@ RUN CURRENT_DISTRO_RELEASE=$(awk '{match($0, /[0-9]+/,version)}END{print version && sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/yum.conf #### BEGIN REPO ENABLEMENT -# Turns on Elasticsearch repos {% set base_yum_repo_files = [ 'elasticsearch.repo', + 'grafana.repo', + 'influxdb.repo', 'kibana.yum.repo', 'MariaDB.repo', - 'influxdb.repo', - 'grafana.repo', + 'td.repo', 'zookeeper.repo' ] %} {%- for repo_file in base_yum_repo_files | customizable('yum_repo_files') %} @@ -66,7 +66,8 @@ COPY {{ repo_file }} /etc/yum.repos.d/{{ repo_file }} 'https://packages.elastic.co/GPG-KEY-elasticsearch', 'https://repos.influxdata.com/influxdb.key', 'https://packagecloud.io/gpg.key', - 'https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana' + 'https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana', + 'https://packages.treasuredata.com/GPG-KEY-td-agent' ] %} {%- for key in base_yum_repo_keys | customizable('yum_repo_keys') %} @@ -253,6 +254,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences {# 46095ACC8548582C1A2699A9D27D666CD88E42B4 -- Elasticsearch (Elasticsearch Signing Key) #} {# 4D1BB29D63D98E422B2113B19334A25F8507EFA5 -- Percona MySQL Development Team (Packaging key) #} {# 58118E89F3A912897C070ADBF76221572C52609D -- Docker Release Tool (releasedocker) #} + {# 901F9177AB97ACBE -- Treasure Data, Inc (Treasure Agent Official Signing key) #} {% set base_apt_keys = [ '05CE15085FC09D18E99EFB22684A14CF2582E0C5', '177F4010FE56CA3336300305F1656F24C74CD1D8', @@ -261,6 +263,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences '46095ACC8548582C1A2699A9D27D666CD88E42B4', '4D1BB29D63D98E422B2113B19334A25F8507EFA5', '58118E89F3A912897C070ADBF76221572C52609D', + '901F9177AB97ACBE', ] %} {% elif base_distro == 'debian' %} {% set base_apt_keys = [ @@ -269,6 +272,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences 'D27D666CD88E42B4', '05CE15085FC09D18E99EFB22684A14CF2582E0C5', '418A7F2FB0E1E6E7EABF6FE8C2E73424D59097AB', + '901F9177AB97ACBE', ] %} {% set base_apt_packages = base_apt_packages + ['sudo',] diff --git a/docker/base/sources.list.debian b/docker/base/sources.list.debian index 248c6a06af..f1195c9431 100644 --- a/docker/base/sources.list.debian +++ b/docker/base/sources.list.debian @@ -30,3 +30,6 @@ deb https://repos.influxdata.com/debian jessie stable # Grafana repo deb https://packagecloud.io/grafana/stable/debian/ jessie main + +# Fluentd repo +deb http://packages.treasuredata.com/2/debian/jessie/ jessie contrib diff --git a/docker/base/sources.list.ubuntu b/docker/base/sources.list.ubuntu index 22a1d78c9c..990ffc9572 100644 --- a/docker/base/sources.list.ubuntu +++ b/docker/base/sources.list.ubuntu @@ -30,3 +30,6 @@ deb https://repos.influxdata.com/ubuntu xenial stable # Grafana repo deb https://packagecloud.io/grafana/stable/debian/ jessie main + +# Fluentd repo +deb http://packages.treasuredata.com/2/ubuntu/xenial/ xenial contrib diff --git a/docker/fluentd/td.repo b/docker/base/td.repo similarity index 100% rename from docker/fluentd/td.repo rename to docker/base/td.repo diff --git a/docker/fluentd/Dockerfile.j2 b/docker/fluentd/Dockerfile.j2 index 405e10c5fc..01416ae484 100644 --- a/docker/fluentd/Dockerfile.j2 +++ b/docker/fluentd/Dockerfile.j2 @@ -9,10 +9,6 @@ MAINTAINER {{ maintainer }} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} -RUN rpm --import https://packages.treasuredata.com/GPG-KEY-td-agent - -COPY td.repo /etc/yum.repos.d/td.repo - {% set fluentd_packages = [ 'td-agent', 'gcc-c++', @@ -21,10 +17,6 @@ COPY td.repo /etc/yum.repos.d/td.repo {% elif base_distro in ['ubuntu', 'debian'] %} -RUN curl https://packages.treasuredata.com/GPG-KEY-td-agent | apt-key add - \ - && echo "deb http://packages.treasuredata.com/2/ubuntu/xenial/ xenial contrib" > /etc/apt/sources.list.d/treasure-data.list \ - && apt-get update - {% set fluentd_packages = [ 'td-agent', 'make',