From d5979bd86ef9ad5fc28d9183439381d3abcf2053 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Mon, 8 Jan 2018 10:19:06 +0000 Subject: docker: cleanup directories and files Rename docker container directories to contain the barometer_ prefix to prevent any naming clashes with other opnfv containers. Cleanup files that are no longer needed. The patch cleans up trailing whitespace. Change-Id: I332626554502a3e17685a2abd98c0679f30d0c24 Signed-off-by: Maryam Tahhan --- docker/barometer-influxdb/Dockerfile | 4 ++++ docker/barometer-influxdb/influxdb.conf | 30 +++++++++++++++++++++++++++++ docker/barometer-kafka/Dockerfile | 20 +++++++++++++++++++ docker/barometer-kafka/start_kafka.sh | 27 ++++++++++++++++++++++++++ docker/barometer-snmp/docker-compose.yml | 10 ++++++++++ docker/barometer-snmp/snmpd.conf | 17 ++++++++++++++++ docker/docker-compose.yml | 16 ---------------- docker/get_types_db.sh | 14 -------------- docker/influxdb.conf | 33 -------------------------------- docker/influxdb/Dockerfile | 5 ----- docker/influxdb/influxdb.conf | 33 -------------------------------- docker/kafka/Dockerfile | 20 ------------------- docker/kafka/start_kafka.sh | 27 -------------------------- docker/snmp/docker-compose.yml | 10 ---------- docker/snmp/snmpd.conf | 18 ----------------- 15 files changed, 108 insertions(+), 176 deletions(-) create mode 100644 docker/barometer-influxdb/Dockerfile create mode 100644 docker/barometer-influxdb/influxdb.conf create mode 100644 docker/barometer-kafka/Dockerfile create mode 100755 docker/barometer-kafka/start_kafka.sh create mode 100644 docker/barometer-snmp/docker-compose.yml create mode 100644 docker/barometer-snmp/snmpd.conf delete mode 100644 docker/docker-compose.yml delete mode 100755 docker/get_types_db.sh delete mode 100644 docker/influxdb.conf delete mode 100644 docker/influxdb/Dockerfile delete mode 100644 docker/influxdb/influxdb.conf delete mode 100644 docker/kafka/Dockerfile delete mode 100755 docker/kafka/start_kafka.sh delete mode 100644 docker/snmp/docker-compose.yml delete mode 100644 docker/snmp/snmpd.conf (limited to 'docker') diff --git a/docker/barometer-influxdb/Dockerfile b/docker/barometer-influxdb/Dockerfile new file mode 100644 index 00000000..2989f631 --- /dev/null +++ b/docker/barometer-influxdb/Dockerfile @@ -0,0 +1,4 @@ +FROM influxdb:1.3.7 + +RUN wget https://raw.githubusercontent.com/collectd/collectd/collectd-5.8/src/types.db -O /types.db +COPY ./influxdb.conf /etc/influxdb/influxdb.conf diff --git a/docker/barometer-influxdb/influxdb.conf b/docker/barometer-influxdb/influxdb.conf new file mode 100644 index 00000000..7fee866d --- /dev/null +++ b/docker/barometer-influxdb/influxdb.conf @@ -0,0 +1,30 @@ + +[meta] + dir = "/var/lib/influxdb/meta" + +[data] + dir = "/var/lib/influxdb/data" + wal-dir = "/var/lib/influxdb/wal" + +[coordinator] + +[retention] + +[shard-precreation] + + +[monitor] + + +[http] + +[[graphite]] + +[[collectd]] +enabled = true +typesdb = "/types.db" +[[opentsdb]] + +[[udp]] + +[continuous_queries] diff --git a/docker/barometer-kafka/Dockerfile b/docker/barometer-kafka/Dockerfile new file mode 100644 index 00000000..3e2402e4 --- /dev/null +++ b/docker/barometer-kafka/Dockerfile @@ -0,0 +1,20 @@ +FROM centos:7 +RUN yum update -y && yum install -y epel-release \ + wget \ + https://archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/cloudera-cdh-5-0.x86_64.rpm \ + java-1.7.0-openjdk +RUN yum install -y python-pip + +RUN pip install kafka-python + +ENV repos_dir /src +WORKDIR ${repos_dir} +EXPOSE 9092 + +RUN wget "https://archive.apache.org/dist/kafka/1.0.0/kafka_2.11-1.0.0.tgz" +RUN tar -xzf kafka_2.11-1.0.0.tgz +RUN sed -i -- 's/#delete.topic.enable=true/delete.topic.enable=true/' kafka_2.11-1.0.0/config/server.properties + +COPY start_kafka.sh . +RUN chmod 755 start_kafka.sh +ENTRYPOINT ["/src/start_kafka.sh"] diff --git a/docker/barometer-kafka/start_kafka.sh b/docker/barometer-kafka/start_kafka.sh new file mode 100755 index 00000000..abde2d13 --- /dev/null +++ b/docker/barometer-kafka/start_kafka.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2017 OPNFV +# +# 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. + +if [ -n "$broker_id" ] +then + sed -i "s/broker.id=0/broker.id=$broker_id/" \ + kafka_2.11-1.0.0/config/server.properties +fi +if [ -n "$zookeeper_node" ] +then + sed -i "s/localhost:2181/$zookeeper_node:2181/" \ + kafka_2.11-1.0.0/config/server.properties +fi + +kafka_2.11-1.0.0/bin/kafka-server-start.sh kafka_2.11-1.0.0/config/server.properties > kafka_2.11-1.0.0/kafka.log 2>&1 diff --git a/docker/barometer-snmp/docker-compose.yml b/docker/barometer-snmp/docker-compose.yml new file mode 100644 index 00000000..49728c5e --- /dev/null +++ b/docker/barometer-snmp/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' + +services: + snmpd: + image: polinux/snmpd + network_mode: host + volumes: + - ./snmpd.conf:/etc/snmpd/snmpd.conf:ro + - /var/agentx/:/var/agentx/ + command: -c /etc/snmpd/snmpd.conf diff --git a/docker/barometer-snmp/snmpd.conf b/docker/barometer-snmp/snmpd.conf new file mode 100644 index 00000000..61ec1a38 --- /dev/null +++ b/docker/barometer-snmp/snmpd.conf @@ -0,0 +1,17 @@ +# Copyright 2017 OPNFV +# +# 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. +view systemview included .1 +access notConfigGroup "" any noauth exact systemview none none +master agentx +rocommunity public diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml deleted file mode 100644 index b5029a45..00000000 --- a/docker/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '2' - -services: - influxdb: - image: influxdb:1.3.7 - network_mode: host - volumes: - - /var/lib/influxdb - - ./influxdb.conf:/etc/influxdb/influxdb.conf - - ./types.db:/usr/share/collectd/types.db:ro - grafana: - image: grafana/grafana:4.6.0 - network_mode: host - volumes: - - /var/lib/grafana - diff --git a/docker/get_types_db.sh b/docker/get_types_db.sh deleted file mode 100755 index 7b9105e3..00000000 --- a/docker/get_types_db.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2017 OPNFV -# -# 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. -wget https://raw.githubusercontent.com/collectd/collectd/collectd-5.8/src/types.db -O types.db diff --git a/docker/influxdb.conf b/docker/influxdb.conf deleted file mode 100644 index 69d69b18..00000000 --- a/docker/influxdb.conf +++ /dev/null @@ -1,33 +0,0 @@ - -[meta] - dir = "/var/lib/influxdb/meta" - -[data] - dir = "/var/lib/influxdb/data" - wal-dir = "/var/lib/influxdb/wal" - -[coordinator] - -[retention] - -[shard-precreation] - - -[monitor] - - -[http] - -[[graphite]] - -[[collectd]] -enabled = true -typesdb = "/usr/share/collectd/types.db" -[[opentsdb]] - -[[udp]] - -[continuous_queries] - - - diff --git a/docker/influxdb/Dockerfile b/docker/influxdb/Dockerfile deleted file mode 100644 index 83d6ad55..00000000 --- a/docker/influxdb/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM influxdb:1.3.7 - -RUN wget https://raw.githubusercontent.com/collectd/collectd/collectd-5.8/src/types.db -O /types.db -COPY ./influxdb.conf /etc/influxdb/influxdb.conf - diff --git a/docker/influxdb/influxdb.conf b/docker/influxdb/influxdb.conf deleted file mode 100644 index af59499b..00000000 --- a/docker/influxdb/influxdb.conf +++ /dev/null @@ -1,33 +0,0 @@ - -[meta] - dir = "/var/lib/influxdb/meta" - -[data] - dir = "/var/lib/influxdb/data" - wal-dir = "/var/lib/influxdb/wal" - -[coordinator] - -[retention] - -[shard-precreation] - - -[monitor] - - -[http] - -[[graphite]] - -[[collectd]] -enabled = true -typesdb = "/types.db" -[[opentsdb]] - -[[udp]] - -[continuous_queries] - - - diff --git a/docker/kafka/Dockerfile b/docker/kafka/Dockerfile deleted file mode 100644 index 3e2402e4..00000000 --- a/docker/kafka/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM centos:7 -RUN yum update -y && yum install -y epel-release \ - wget \ - https://archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/cloudera-cdh-5-0.x86_64.rpm \ - java-1.7.0-openjdk -RUN yum install -y python-pip - -RUN pip install kafka-python - -ENV repos_dir /src -WORKDIR ${repos_dir} -EXPOSE 9092 - -RUN wget "https://archive.apache.org/dist/kafka/1.0.0/kafka_2.11-1.0.0.tgz" -RUN tar -xzf kafka_2.11-1.0.0.tgz -RUN sed -i -- 's/#delete.topic.enable=true/delete.topic.enable=true/' kafka_2.11-1.0.0/config/server.properties - -COPY start_kafka.sh . -RUN chmod 755 start_kafka.sh -ENTRYPOINT ["/src/start_kafka.sh"] diff --git a/docker/kafka/start_kafka.sh b/docker/kafka/start_kafka.sh deleted file mode 100755 index abde2d13..00000000 --- a/docker/kafka/start_kafka.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Copyright 2017 OPNFV -# -# 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. - -if [ -n "$broker_id" ] -then - sed -i "s/broker.id=0/broker.id=$broker_id/" \ - kafka_2.11-1.0.0/config/server.properties -fi -if [ -n "$zookeeper_node" ] -then - sed -i "s/localhost:2181/$zookeeper_node:2181/" \ - kafka_2.11-1.0.0/config/server.properties -fi - -kafka_2.11-1.0.0/bin/kafka-server-start.sh kafka_2.11-1.0.0/config/server.properties > kafka_2.11-1.0.0/kafka.log 2>&1 diff --git a/docker/snmp/docker-compose.yml b/docker/snmp/docker-compose.yml deleted file mode 100644 index 49728c5e..00000000 --- a/docker/snmp/docker-compose.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: '2' - -services: - snmpd: - image: polinux/snmpd - network_mode: host - volumes: - - ./snmpd.conf:/etc/snmpd/snmpd.conf:ro - - /var/agentx/:/var/agentx/ - command: -c /etc/snmpd/snmpd.conf diff --git a/docker/snmp/snmpd.conf b/docker/snmp/snmpd.conf deleted file mode 100644 index b8e7e5fb..00000000 --- a/docker/snmp/snmpd.conf +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2017 OPNFV -# -# 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. -view systemview included .1 -access notConfigGroup "" any noauth exact systemview none none -master agentx -rocommunity public - -- cgit 1.2.3-korg