aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/README_collectd (renamed from docker/barometer-collectd/README)55
-rw-r--r--docker/ansible/roles/config_files/templates/rdt.conf.j22
-rw-r--r--docker/barometer-collectd-master/Dockerfile29
-rw-r--r--docker/barometer-collectd-master/run_collectd.sh15
-rw-r--r--docker/barometer-dma/Dockerfile25
-rw-r--r--docker/barometer-grafana/dashboards/intel_rdt_dashboard.json6
6 files changed, 117 insertions, 15 deletions
diff --git a/docker/barometer-collectd/README b/docker/README_collectd
index 4936ad8c..c922ab64 100644
--- a/docker/barometer-collectd/README
+++ b/docker/README_collectd
@@ -8,13 +8,20 @@ deployment collectd in docker container
Table of content:
1. DESCRIPTION
2. SYSTEM REQUIREMENTS
-3. INSTALLATION NOTES
-4. ADDITIONAL STEPS
+3. INSTALLATION NOTES - barometer-collectd
+4. INSTALLATION NOTES - barometer-collectd-master
+5. ADDITIONAL STEPS
------------------------------------------------------------------------------
1. DESCRIPTION
-This Dockerfile provides instruction for building collect in isolated container
+This Dockerfile provides instruction for building collect in isolated container.
+There are currently two variants of collectd container:
+ - barometer-collectd - it is based on stable collect release
+ - barometer-collectd-master - development container that is based on
+ latest 'master' branch for collectd project. It contains all available
+ collectd plugins and features that are available on 'master' branch but
+ some issues with configuration or stability may occur
------------------------------------------------------------------------------
2. SYSTEM REQUIREMENTS
@@ -22,30 +29,52 @@ This Dockerfile provides instruction for building collect in isolated container
Docker >= 17.06.0-ce
------------------------------------------------------------------------------
-3. INSTALLATION NOTES
+3. INSTALLATION NOTES: barometer-collectd (stable container)
-To build docker container run
-sudo docker build -f ./docker/barometer-collectd/Dockerfile .
+To build docker container, that is based on stable collectd release, run:
+sudo docker build -f ./docker/barometer-collectd/Dockerfile ./docker/barometer-collectd
from barometer folder.
+sudo docker images # get docker image id
+sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \
+-v /var/run:/var/run -v /tmp:/tmp --privileged <image id>
+
+To make some changes run
+sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \
+-v /var/run:/var/run -v /tmp:/tmp --privileged --entrypoint=/bin/bash <image id>
+
+/opt/collectd/sbin/collectd -f
+
+------------------------------------------------------------------------------
+4. INSTALLATION NOTES: barometer-collectd-master (development container)
+
+To build docker barometer-collectd-master container run (it is based on master branch from collectd):
+sudo docker build -f ./docker/barometer-collectd-master/Dockerfile .
+from root barometer folder.
+
To run builded image run
-sudo docker images
-Get docker image id
-sudo docker run -ti --net=host -v `pwd`/../src/collectd_sample_configs:/opt/collectd/etc/collectd.d \
--v /var/run:/var/run -v /tmp:/tmp --privileged <image id> /run_collectd.sh
+sudo docker images # get docker image id
+sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs-master:/opt/collectd/etc/collectd.conf.d \
+-v /var/run:/var/run -v /tmp:/tmp --privileged <image id>
+
+NOTE: barometer-collectd-master container uses a different sample configurations files
+compared to regular barometer-collectd container (src/collectd/collectd_sample_configs-master)
To make some changes run
-sudo docker run -ti --net=host -v `pwd`/../collectd_sample_configs:/opt/collectd/etc/collectd.d \
- -v /var/run:/var/run --privileged <image id> /bin/bash
+sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs-master:/opt/collectd/etc/collectd.conf.d \
+-v /var/run:/var/run -v /tmp:/tmp --privileged --entrypoint=/bin/bash <image id>
/opt/collectd/sbin/collectd -f
------------------------------------------------------------------------------
-4. ADDITIONAL STEPS
+5. ADDITIONAL STEPS
To check if container works properly additional packages should be installed
on host system.
+DEVELOPMENT TOOLS
+sudo yum group install "Development Tools"
+
MCELOG
To simulate mcelog message use instruction in http://artifacts.opnfv.org/barometer/docs/index.html#mcelog-plugin
diff --git a/docker/ansible/roles/config_files/templates/rdt.conf.j2 b/docker/ansible/roles/config_files/templates/rdt.conf.j2
index 814c23ca..0e1afcfc 100644
--- a/docker/ansible/roles/config_files/templates/rdt.conf.j2
+++ b/docker/ansible/roles/config_files/templates/rdt.conf.j2
@@ -13,7 +13,7 @@
# limitations under the License.
<LoadPlugin intel_rdt>
- Interval "{{ rdt_interval }}"
+ Interval {{ rdt_interval }}
</LoadPlugin>
<Plugin intel_rdt>
diff --git a/docker/barometer-collectd-master/Dockerfile b/docker/barometer-collectd-master/Dockerfile
new file mode 100644
index 00000000..a1c957f3
--- /dev/null
+++ b/docker/barometer-collectd-master/Dockerfile
@@ -0,0 +1,29 @@
+FROM centos:7
+RUN yum update -y && \
+ yum install -y which sudo git && \
+ yum clean all && \
+ git config --global http.sslVerify false
+
+ENV DOCKER y
+ENV COLLECTD_USE_MASTER y
+ENV repos_dir /src
+ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins
+
+WORKDIR ${repos_dir}
+RUN mkdir -p ${repos_dir}/barometer
+COPY . ${repos_dir}/barometer
+
+WORKDIR ${repos_dir}/barometer/systems
+RUN sh ./build_base_machine.sh && \
+ useradd -ms /bin/bash collectd_exec && \
+ echo "collectd_exec ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+
+WORKDIR ${openstack_plugins}
+RUN make && \
+ pip install --upgrade pip && \
+ pip install -r ${openstack_plugins}/collectd-openstack-plugins/requirements.txt
+
+COPY docker/barometer-collectd-master/run_collectd.sh /run_collectd.sh
+RUN chmod +x /run_collectd.sh
+
+ENTRYPOINT ["/run_collectd.sh"]
diff --git a/docker/barometer-collectd-master/run_collectd.sh b/docker/barometer-collectd-master/run_collectd.sh
new file mode 100644
index 00000000..001cce1a
--- /dev/null
+++ b/docker/barometer-collectd-master/run_collectd.sh
@@ -0,0 +1,15 @@
+#!/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.
+/opt/collectd/sbin/collectd -f
diff --git a/docker/barometer-dma/Dockerfile b/docker/barometer-dma/Dockerfile
new file mode 100644
index 00000000..afe7c3f3
--- /dev/null
+++ b/docker/barometer-dma/Dockerfile
@@ -0,0 +1,25 @@
+FROM centos:7
+
+# install prerequisites
+RUN yum update -y &&\
+ yum install -y which sudo git libvirt-devel && \
+ rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO && \
+ curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo && \
+ yum install -y golang
+
+# set environment variables
+# need to change when we move to barometer
+ENV DOCKER y
+ENV repos_dir /root/go/src/github.com/distributed-monitoring/agent
+
+# copy repo code and
+# COPY . ${repos_dir}
+WORKDIR ${repos_dir}
+RUN git clone https://gerrit.opnfv.org/gerrit/barometer && \
+ mv barometer/src/dma/* ./
+RUN go build ./cmd/server && \
+ go build ./cmd/threshold && \
+ go build ./cmd/infofetch
+
+RUN cp server threshold infofetch /
+WORKDIR /
diff --git a/docker/barometer-grafana/dashboards/intel_rdt_dashboard.json b/docker/barometer-grafana/dashboards/intel_rdt_dashboard.json
index 49efec7a..38baa2f7 100644
--- a/docker/barometer-grafana/dashboards/intel_rdt_dashboard.json
+++ b/docker/barometer-grafana/dashboards/intel_rdt_dashboard.json
@@ -33,6 +33,7 @@
"datasource": "collectd",
"fill": 1,
"id": 1,
+ "interval": "1s",
"legend": {
"alignAsTable": true,
"avg": true,
@@ -171,6 +172,7 @@
"datasource": "collectd",
"fill": 1,
"id": 2,
+ "interval": "1s",
"legend": {
"alignAsTable": true,
"avg": true,
@@ -309,6 +311,7 @@
"datasource": "collectd",
"fill": 1,
"id": 3,
+ "interval": "1s",
"legend": {
"alignAsTable": true,
"avg": true,
@@ -441,6 +444,7 @@
"datasource": "collectd",
"fill": 1,
"id": 4,
+ "interval": "1s",
"legend": {
"alignAsTable": true,
"avg": true,
@@ -484,7 +488,7 @@
},
{
"params": [
- "none"
+ "null"
],
"type": "fill"
}