Added telegraf container
Extended base container to include influxdb repositories Added telegraf container with package from influxdb repo Change-Id: I6ccf952d7b42eabe8ff7bdbd6471e395db86aa02 Partially-Implements: Blueprint performance-monitoring
This commit is contained in:
parent
74ea96bacf
commit
e5ca547f37
@ -40,11 +40,15 @@ COPY kibana.yum.repo /etc/yum.repos.d/kibana.yum.repo
|
||||
# Turns on MariaDB repos throughout the RPM build
|
||||
COPY mariadb.yum.repo /etc/yum.repos.d/MariaDB.repo
|
||||
|
||||
# Turns on InfluxDB repos throughout the RPM build
|
||||
COPY influxdb.yum.repo /etc/yum.repos.d/influxdb.repo
|
||||
|
||||
RUN yum -y install \
|
||||
http://repo.percona.com/release/7/RPMS/x86_64/percona-release-0.1-3.noarch.rpm \
|
||||
&& rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB \
|
||||
&& rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona \
|
||||
&& rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
|
||||
&& rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch \
|
||||
&& rpm --import https://repos.influxdata.com/influxdb.key
|
||||
|
||||
{% if install_metatype in ['rdo', 'mixed'] %}
|
||||
|
||||
@ -209,6 +213,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
|
||||
'08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
||||
'46095ACC8548582C1A2699A9D27D666CD88E42B4',
|
||||
'58118E89F3A912897C070ADBF76221572C52609D',
|
||||
'05CE15085FC09D18E99EFB22684A14CF2582E0C5',
|
||||
] %}
|
||||
{% elif base_distro == 'debian' %}
|
||||
{% set base_apt_keys = [
|
||||
@ -216,6 +221,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
|
||||
'58118E89F3A912897C070ADBF76221572C52609D',
|
||||
'0xcbcb082a1bb943db',
|
||||
'D27D666CD88E42B4',
|
||||
'05CE15085FC09D18E99EFB22684A14CF2582E0C5',
|
||||
] %}
|
||||
{% set base_apt_packages = base_apt_packages +
|
||||
['sudo',]
|
||||
|
6
docker/base/influxdb.yum.repo
Normal file
6
docker/base/influxdb.yum.repo
Normal file
@ -0,0 +1,6 @@
|
||||
[influxdb]
|
||||
name = InfluxDB Repository - RHEL $releasever
|
||||
baseurl = https://repos.influxdata.com/rhel/$releasever/$basearch/stable
|
||||
enabled = 1
|
||||
gpgcheck = 1
|
||||
gpgkey = https://repos.influxdata.com/influxdb.key
|
@ -24,3 +24,6 @@ deb http://packages.elastic.co/kibana/4.4/debian stable main
|
||||
|
||||
# docker
|
||||
deb http://apt.dockerproject.org/repo debian-jessie main
|
||||
|
||||
# InfluxDB repo
|
||||
deb https://repos.influxdata.com/debian jessie stable
|
||||
|
@ -27,3 +27,6 @@ deb http://packages.elastic.co/kibana/4.4/debian stable main
|
||||
|
||||
# Docker repo
|
||||
deb http://apt.dockerproject.org/repo ubuntu-trusty main
|
||||
|
||||
# InfluxDB repo
|
||||
deb https://repos.influxdata.com/ubuntu trusty stable
|
||||
|
17
docker/telegraf/Dockerfile.j2
Normal file
17
docker/telegraf/Dockerfile.j2
Normal file
@ -0,0 +1,17 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% set telegraf_packages = ['telegraf'] %}
|
||||
RUN {{ macros.install_packages(telegraf_packages | customizable("packages")) }}
|
||||
|
||||
COPY telegraf_sudoers /etc/sudoers.d/kolla_telegraf_sudoers
|
||||
RUN chmod 750 /etc/sudoers.d \
|
||||
&& chmod 440 /etc/sudoers.d/kolla_telegraf_sudoers \
|
||||
&& usermod -a -G kolla telegraf
|
||||
|
||||
{% block telegraf_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER telegraf
|
1
docker/telegraf/telegraf_sudoers
Normal file
1
docker/telegraf/telegraf_sudoers
Normal file
@ -0,0 +1 @@
|
||||
%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R telegraf\: /var/lib/telegraf, /bin/chown -R telegraf\: /var/lib/telegraf
|
Loading…
Reference in New Issue
Block a user