aboutsummaryrefslogtreecommitdiffstats
path: root/docker/barometer-collectd
diff options
context:
space:
mode:
Diffstat (limited to 'docker/barometer-collectd')
-rw-r--r--docker/barometer-collectd/Dockerfile35
-rw-r--r--docker/barometer-collectd/README106
-rw-r--r--docker/barometer-collectd/run_collectd.sh5
3 files changed, 28 insertions, 118 deletions
diff --git a/docker/barometer-collectd/Dockerfile b/docker/barometer-collectd/Dockerfile
index 41ccad0b..db155572 100644
--- a/docker/barometer-collectd/Dockerfile
+++ b/docker/barometer-collectd/Dockerfile
@@ -1,25 +1,40 @@
-FROM centos:7
-RUN yum update -y && \
- yum install -y which sudo git && \
- yum clean all && \
+# Copyright 2017-2021 Intel Corporation, Anuket and others.
+# All rights reserved.
+#
+# 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.
+#
+
+FROM quay.io/centos/centos:stream8
+RUN dnf update -y && \
+ dnf install -y which sudo git-core && \
+ dnf clean all && \
git config --global http.sslVerify false
ENV DOCKER y
+ENV WITH_DPDK y
+ENV COLLECTD_FLAVOR stable
ENV repos_dir /src
-ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins
WORKDIR ${repos_dir}
RUN git clone https://gerrit.opnfv.org/gerrit/barometer
+
WORKDIR ${repos_dir}/barometer/systems
RUN sh ./build_base_machine.sh && \
+ dnf clean all && rm -rf /var/cache/dnf && \
+ cd ${repos_dir}/ && rm -rf barometer && \
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 run_collectd.sh /run_collectd.sh
RUN chmod +x /run_collectd.sh
diff --git a/docker/barometer-collectd/README b/docker/barometer-collectd/README
deleted file mode 100644
index 4936ad8c..00000000
--- a/docker/barometer-collectd/README
+++ /dev/null
@@ -1,106 +0,0 @@
-==============================================================================
-Readme for collectd docker container in barometer project
-==============================================================================
-
-This text file includes information about environment preparation and
-deployment collectd in docker container
-
-Table of content:
-1. DESCRIPTION
-2. SYSTEM REQUIREMENTS
-3. INSTALLATION NOTES
-4. ADDITIONAL STEPS
-
-------------------------------------------------------------------------------
-1. DESCRIPTION
-
-This Dockerfile provides instruction for building collect in isolated container
-
-------------------------------------------------------------------------------
-2. SYSTEM REQUIREMENTS
-
- Docker >= 17.06.0-ce
-
-------------------------------------------------------------------------------
-3. INSTALLATION NOTES
-
-To build docker container run
-sudo docker build -f ./docker/barometer-collectd/Dockerfile .
-from 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
-
-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
-
-/opt/collectd/sbin/collectd -f
-
-------------------------------------------------------------------------------
-4. ADDITIONAL STEPS
-
-To check if container works properly additional packages should be installed
-on host system.
-
-MCELOG
-To simulate mcelog message use instruction in http://artifacts.opnfv.org/barometer/docs/index.html#mcelog-plugin
-
-git clone https://github.com/andikleen/mce-inject
-cd mce-inject/
-make
-sudo make install
-modprobe mce-inject
-
-go to mcelog folder
-sudo make test
-
-if runs multiple times mcelog service shoud be restarted(cause mcelog make test exits closes mcelog)
-
-VIRT
-http://artifacts.opnfv.org/barometer/docs/index.html#virt-plugin
-Check that libvirtd is running on the remote host
-systemctl status libvirtd
-virsh list
-virsh perf instance-00000003
-sudo virsh perf instance-00000003 --enable cpu_cycles --live
-sudo virsh perf instance-00000003 --enable cmt --live
-sudo virsh perf instance-00000003 --enable mbmt --live
-sudo virsh perf instance-00000003 --enable mbml --live
-sudo virsh perf instance-00000003 --enable instructions --live
-sudo virsh perf instance-00000003 --enable cache_references --live
-sudo virsh perf instance-00000003 --enable cache_mises --live
-sudo virsh perf instance-00000003 --enable cache_misses --live
-
-OVS
-To successfuly run ovs plugins in Docker you need an ovs instance to connect to
-
-sudo yum install -y openvswitch-switch
-sudo service openvswitch-switch start
-sudo ovs-vsctl set-manager ptcp:6640
-
-Alternatively you can build ovs from source
-yum -y install make gcc openssl-devel autoconf automake rpm-build \
- redhat-rpm-config python-devel openssl-devel kernel-devel \
- kernel-debug-devel libtool wget python-six selinux-policy-devel
-mkdir -p ~/rpmbuild/SOURCES
-cd ~/rpmbuild/SOURCES
-wget http://openvswitch.org/releases/openvswitch-2.5.3.tar.gz
-tar xfz openvswitch-2.5.3.tar.gz
-sed 's/openvswitch-kmod, //g' rhel/openvswitch.spec > rhel/openvswitch_no_kmod.spec
-rpmbuild -bb --nocheck rhel/openvswitch_no_kmod.spec
-cd ../RPMS/x86_64/
-yum install -y openvswitch-2.5.3-1.x86_64.rpm
-sudo systemctl start openvswitch.service
-sudo ovs-vsctl set-manager ptcp:6640
-
-To check if connection is successfull please check
-sudo ovs-vsctl show
-319efc53-b321-49a9-b628-e8d70f9bd8a9
- Manager "ptcp:6640"
- is_connected: true - can be a marker that ovs plugins successfully connected
- ovs_version: "2.5.3"
-on the host.
diff --git a/docker/barometer-collectd/run_collectd.sh b/docker/barometer-collectd/run_collectd.sh
index 001cce1a..5920248a 100644
--- a/docker/barometer-collectd/run_collectd.sh
+++ b/docker/barometer-collectd/run_collectd.sh
@@ -1,15 +1,16 @@
#!/bin/bash
-# Copyright 2017 OPNFV
+# Copyright 2016-2019 Intel Corporation and OPNFV. All rights reserved.
#
# 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
+# 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