From 2e7eea594c6806d565b3b36d4d73448d1c3a5706 Mon Sep 17 00:00:00 2001 From: Mik Vyatskov Date: Wed, 1 Mar 2017 01:47:01 +0100 Subject: [PATCH] Remove fluentd-gcp image sources --- .../fluentd-gcp/fluentd-gcp-image/Dockerfile | 58 ------------------- .../fluentd-gcp/fluentd-gcp-image/Gemfile | 9 --- .../fluentd-gcp/fluentd-gcp-image/Makefile | 36 ------------ .../fluentd-gcp/fluentd-gcp-image/README.md | 23 +------- .../fluentd-gcp/fluentd-gcp-image/fluent.conf | 8 --- .../fluentd-gcp/fluentd-gcp-image/run.sh | 29 ---------- 6 files changed, 2 insertions(+), 161 deletions(-) delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-image/Gemfile delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf delete mode 100755 cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile deleted file mode 100644 index 7b1ae18bd44..00000000000 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This Dockerfile will build an image that is configured -# to use Fluentd to collect all Docker container log files -# and then cause them to be ingested using the Google Cloud -# Logging API. This configuration assumes that the host performning -# the collection is a VM that has been created with a logging.write -# scope and that the Logging API has been enabled for the project -# in the Google Developer Console. - -FROM gcr.io/google-containers/debian-base-amd64:0.1 - -COPY Gemfile /Gemfile - -# 1. Install & configure dependencies. -# 2. Install fluentd via ruby. -# 3. Remove build dependencies. -# 4. Cleanup leftover caches & files. -RUN BUILD_DEPS="make gcc g++ libc-dev ruby-dev" \ - && clean-install $BUILD_DEPS \ - ca-certificates \ - libjemalloc1 \ - liblz4-1 \ - ruby \ - && echo 'gem: --no-document' >> /etc/gemrc \ - && gem install --file Gemfile \ - && apt-get purge -y --auto-remove \ - -o APT::AutoRemove::RecommendsImportant=false \ - $BUILD_DEPS \ - && rm -rf /tmp/* \ - /var/lib/apt/lists/* \ - /usr/lib/ruby/gems/*/cache/*.gem \ - /var/log/* \ - /var/tmp/* - -# Copy the Fluentd configuration file for logging Docker container logs. -COPY fluent.conf /etc/fluent/fluent.conf -COPY run.sh /run.sh - -# Expose prometheus metrics. -EXPOSE 80 - -ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 - -# Start Fluentd to pick up our config that watches Docker container logs. -CMD /run.sh $FLUENTD_ARGS diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Gemfile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Gemfile deleted file mode 100644 index ddf668493b9..00000000000 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source 'https://rubygems.org' - -gem 'fluentd', '~>0.12.32' -gem 'fluent-plugin-record-reformer', '~>0.8.3' -gem 'fluent-plugin-systemd', '~>0.0.7' -gem 'fluent-plugin-google-cloud', '~>0.5.6' -gem 'fluent-plugin-detect-exceptions', '~>0.0.5' -gem 'fluent-plugin-prometheus', '~>0.2.1' -gem 'oj', '~>2.18.1' diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile deleted file mode 100644 index a2f72515457..00000000000 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# The build rule builds a Docker image that logs all Docker contains logs to -# Google Compute Platform using the Cloud Logging API. - -# Procedure for change: -# 1. Bump the tag number. -# 2. Push to the private repo and test using newer version -# 3. Issue PR. -# 4. Assuming permissions to do so, when PR is approved -# make the gcr.io version of the image: make build push -# 5. Issue PR with config files changes - -.PHONY: build push - -PREFIX=gcr.io/google-containers -TAG = 2.0 - -build: - docker build --pull -t $(PREFIX)/fluentd-gcp:$(TAG) . - - -push: - gcloud docker -- push $(PREFIX)/fluentd-gcp:$(TAG) diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/README.md b/cluster/addons/fluentd-gcp/fluentd-gcp-image/README.md index 853aa5457a1..f4caa66c8ee 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/README.md +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/README.md @@ -1,25 +1,6 @@ # Collecting Docker Log Files with Fluentd and sending to GCP. -This directory contains the source files needed to make a Docker image -that collects Docker container log files using [Fluentd](http://www.fluentd.org/) -and sends them to GCP. -This image is designed to be used as part of the [Kubernetes](https://github.com/kubernetes/kubernetes) -cluster bring up process. The image resides at DockerHub under the name -[kubernetes/fluentd-gcp](https://registry.hub.docker.com/u/kubernetes/fluentd-gcp/). - -# Usage - -The image is built with its own set of plugins which you can later use -in the configuration. The set of plugin is enumerated in a Gemfile in the -image's directory. You can find details about fluentd configuration on the -[official site](http://docs.fluentd.org/articles/config-file). - -In order to configure fluentd image, you should mount a directory with `.conf` -files to `/etc/fluent/config.d` or add files to that directory by building -a new image on top. All `.conf` files in the `/etc/fluent/config.d` directory -will be included to the final fluentd configuration. - -Command line arguments to the fluentd executable are passed -via environment variable `FLUENTD_ARGS`. +The image was moved to the the +[new location](https://github.com/kubernetes/contrib/tree/master/fluentd/fluentd-gcp-image). [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/fluentd-gcp/fluentd-gcp-image/README.md?pixel)]() diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf b/cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf deleted file mode 100644 index a73db5d7c70..00000000000 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf +++ /dev/null @@ -1,8 +0,0 @@ -# This is the root config file, which only includes components of the actual configuration - -# Do not collect fluentd's own logs to avoid infinite loops. - - type null - - -@include /etc/fluent/config.d/*.conf diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh b/cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh deleted file mode 100755 index bacecaaa3af..00000000000 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# These steps must be executed once the host /var and /lib volumes have -# been mounted, and therefore cannot be done in the docker build stage. - -# For systems without journald -mkdir -p /var/log/journal - -# Copy host libsystemd into image to avoid compatibility issues. -if [ ! -z "$(ls /host/lib/libsystemd* 2>/dev/null)" ]; then - rm /lib/x86_64-linux-gnu/libsystemd* - cp -a /host/lib/libsystemd* /lib/x86_64-linux-gnu/ -fi - -/usr/local/bin/fluentd $@