Enabled collectd build & installation changes/41/22641/1
authorTaras Chornyi <tarasx.chornyi@intel.com>
Mon, 3 Oct 2016 11:42:42 +0000 (12:42 +0100)
committerTaras Chornyi <tarasx.chornyi@intel.com>
Mon, 3 Oct 2016 11:42:42 +0000 (12:42 +0100)
Change-Id: Ic80542f6b181e0972157c0a3b2fea1faf434f44b
Signed-off-by: Taras Chornyi <tarasx.chornyi@intel.com>
src/fuel-plugin/build-collectd.sh
src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp [new file with mode: 0644]
src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp [new file with mode: 0644]
src/fuel-plugin/enable_dpdk_stats_plugin.patch [new file with mode: 0644]
src/fuel-plugin/pre_build_hook

index 30166a0..500533f 100755 (executable)
@@ -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 (file)
index 0000000..ffe3d6d
--- /dev/null
@@ -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 (file)
index 0000000..59f5151
--- /dev/null
@@ -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 (file)
index 0000000..ded647f
--- /dev/null
@@ -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 \
+
index 3cca5bd..9a53993 100755 (executable)
@@ -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
       ;;