summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaras Chornyi <tarasx.chornyi@intel.com>2016-10-03 12:42:42 +0100
committerTaras Chornyi <tarasx.chornyi@intel.com>2016-10-03 12:42:42 +0100
commit8c17f4cb219221a080dd0a74e6e0baabdbfc4bcf (patch)
tree7c42b48e5665040ec05c144e43fd34e3d2d51109
parentbf4ef8881e5dfe7dedf149c4ae75909c712bb329 (diff)
Enabled collectd build & installation
Change-Id: Ic80542f6b181e0972157c0a3b2fea1faf434f44b Signed-off-by: Taras Chornyi <tarasx.chornyi@intel.com>
-rwxr-xr-xsrc/fuel-plugin/build-collectd.sh48
-rw-r--r--src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp5
-rw-r--r--src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp4
-rw-r--r--src/fuel-plugin/enable_dpdk_stats_plugin.patch40
-rwxr-xr-xsrc/fuel-plugin/pre_build_hook6
5 files changed, 81 insertions, 22 deletions
diff --git a/src/fuel-plugin/build-collectd.sh b/src/fuel-plugin/build-collectd.sh
index 30166a01..500533f3 100755
--- a/src/fuel-plugin/build-collectd.sh
+++ b/src/fuel-plugin/build-collectd.sh
@@ -3,60 +3,70 @@
BUILD_HOME="$(pwd)"
set -eux
-sudo apt-get -y install build-essential dh-autoreconf fakeroot dpkg-dev devscripts dpkg-dev git wget
+sudo apt-get -y install build-essential dh-autoreconf fakeroot devscripts dpkg-dev git wget
-sudo apt-get -y install debhelper dpkg-dev po-debconf dh-systemd \
+sudo apt-get -y install debhelper po-debconf dh-systemd \
bison flex autotools-dev libltdl-dev pkg-config \
+ dh-strip-nondeterminism \
iptables-dev \
javahelper \
- libatasmart-dev \
- libcap-dev \
+ libatasmart-dev \
+ libcap-dev \
libcurl4-gnutls-dev \
+ libcurl3-gnutls-dev \
libdbi0-dev \
libesmtp-dev \
libganglia1-dev \
- libgcrypt11-dev \
+ libgcrypt20-dev \
libglib2.0-dev \
+ libgps-dev \
libhiredis-dev \
+ libi2c-dev \
libldap2-dev \
- liblvm2-dev \
+ liblua5.3-dev \
+ liblvm2-dev \
libmemcached-dev \
libmodbus-dev \
- libmnl-dev \
+ libmosquitto-dev \
+ libmnl-dev \
+ libmysqlclient-dev \
libnotify-dev \
libopenipmi-dev \
liboping-dev \
libow-dev \
- libpcap0.8-dev \
libpcap-dev \
libperl-dev \
libpq-dev \
- librdkafka-dev \
+ libprotobuf-c-dev \
librabbitmq-dev \
- librrd-dev \
+ librdkafka-dev \
+ libriemann-client-dev \
+ librrd-dev \
libsensors4-dev \
- libsigrok-dev \
- libsnmp9-dev \
+ libsigrok-dev \
libsnmp-dev \
perl \
- libtokyocabinet-dev \
- libtokyotyrant-dev \
- libudev-dev \
+ libtokyocabinet-dev \
+ libtokyotyrant-dev \
+ libudev-dev \
libupsclient-dev \
libvarnishapi-dev \
libvirt-dev \
+ libxen-dev \
libxml2-dev \
libyajl-dev \
- linux-libc-dev \
default-jdk \
protobuf-c-compiler \
- python-dev
+ python-dev \
+ riemann-c-client \
+ patch
cd ${BUILD_HOME}
rm -rf collectd
-git clone https://github.com/collectd/collectd; cd collectd; git checkout 37fe166;
-git clone https://github.com/collectd/pkg-debian; cd pkg-debian; git checkout e2e3b00; mv debian ..
+git clone https://github.com/collectd/collectd; cd collectd; git checkout ed946a1;
+git clone https://github.com/collectd/pkg-debian; cd pkg-debian; git checkout 3041e46
+patch -p1 < ../../../enable_dpdk_stats_plugin.patch mv debian ..
cd ${BUILD_HOME}/collectd
./build.sh
diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp
new file mode 100644
index 00000000..ffe3d6d9
--- /dev/null
+++ b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp
@@ -0,0 +1,5 @@
+if $operatingsystem == 'Ubuntu' {
+ package { 'collectd':
+ ensure => installed,
+ }
+}
diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp
new file mode 100644
index 00000000..59f5151b
--- /dev/null
+++ b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp
@@ -0,0 +1,4 @@
+exec { "restart collectd":
+ command => "service collectd restart",
+ path => "/usr/bin:/usr/sbin:/bin:/sbin";
+}
diff --git a/src/fuel-plugin/enable_dpdk_stats_plugin.patch b/src/fuel-plugin/enable_dpdk_stats_plugin.patch
new file mode 100644
index 00000000..ded647ff
--- /dev/null
+++ b/src/fuel-plugin/enable_dpdk_stats_plugin.patch
@@ -0,0 +1,40 @@
+diff --git a/debian/rules b/debian/rules
+index e26fb54..799c9ef 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -50,6 +50,7 @@ confflags = --host=$(DEB_HOST_GNU_TYPE) \
+ --mandir=\$${prefix}/share/man \
+ --localstatedir=/var --sysconfdir=/etc \
+ --with-perl-bindings="INSTALLDIRS=vendor INSTALL_BASE=" \
++ --with-libdpdk=/usr \
+ --without-libstatgrab \
+ --without-included-ltdl \
+ --disable-static \
+@@ -258,7 +259,7 @@ binary-indep: install-indep
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -i ChangeLog
+- dh_installdocs -A -i debian/README.Debian AUTHORS README TODO
++ dh_installdocs -A -i debian/README.Debian AUTHORS README
+ dh_installexamples -i contrib/examples/myplugin.c \
+ contrib/examples/MyPlugin.pm
+ dh_compress -i -Xexamples/
+@@ -272,7 +273,7 @@ binary-arch: build install-arch
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs -a ChangeLog
+- dh_installdocs -A -a debian/README.Debian AUTHORS README TODO
++ dh_installdocs -A -a debian/README.Debian AUTHORS README
+ dh_installdocs -a debian/NEWS.Debian debian/README.Debian.plugins
+ dh_installexamples -a contrib/collectd2html.pl contrib/collection.cgi \
+ contrib/collection3/ contrib/php-collection/ \
+@@ -305,7 +306,7 @@ binary-arch: build install-arch
+ dh_shlibdeps -a -Ncollectd-core -Ncollectd
+ dpkg-shlibdeps -Tdebian/collectd.substvars \
+ -dDepends debian/collectd-core/usr/lib/collectd/rrdtool.so
+- dpkg-shlibdeps -Tdebian/collectd-core.substvars \
++ dpkg-shlibdeps --ignore-missing-info -Tdebian/collectd-core.substvars \
+ -dDepends debian/collectd-core/usr/sbin/* \
+ -dSuggests debian/collectd-core/usr/lib/collectd/*.so
+ grep shlibs:Suggests debian/collectd-core.substvars \
+
diff --git a/src/fuel-plugin/pre_build_hook b/src/fuel-plugin/pre_build_hook
index 3cca5bd8..9a539934 100755
--- a/src/fuel-plugin/pre_build_hook
+++ b/src/fuel-plugin/pre_build_hook
@@ -20,9 +20,9 @@ function build_pkg {
git checkout 73372f2eb86c81f12bc10b392f75050a401107db
tar cfvz ${DIR}/repositories/ubuntu/collectd-ceilometer.tgz . --exclude=collectd-ceilometer.tgz
- # support collectd with dpdk later
- #cd ${DIR}/build; ../build-collectd.sh
- #cp *.deb ${DIR}/repositories/ubuntu
+ # support collectd with dpdk
+ cd ${DIR}/build; ../build-collectd.sh
+ cp *.deb ${DIR}/repositories/ubuntu
rm -rf ${DIR}/build
;;