summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fuel-plugin/Dockerfile6
-rw-r--r--src/fuel-plugin/LICENSE13
-rw-r--r--src/fuel-plugin/README.md60
-rwxr-xr-xsrc/fuel-plugin/build-collectd.sh80
-rwxr-xr-xsrc/fuel-plugin/build_fuel_plugin.sh6
-rwxr-xr-xsrc/fuel-plugin/deployment_scripts/install.sh105
-rw-r--r--src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp29
-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/deployment_tasks.yaml10
-rw-r--r--src/fuel-plugin/environment_config.yaml16
-rw-r--r--src/fuel-plugin/metadata.yaml32
-rwxr-xr-xsrc/fuel-plugin/pre_build_hook41
-rw-r--r--src/fuel-plugin/tasks.yaml1
-rw-r--r--src/fuel-plugin/vagrant/Vagrantfile21
15 files changed, 0 insertions, 429 deletions
diff --git a/src/fuel-plugin/Dockerfile b/src/fuel-plugin/Dockerfile
deleted file mode 100644
index a7b1593c..00000000
--- a/src/fuel-plugin/Dockerfile
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-FROM ubuntu:16.04
-
-RUN apt-get update -y
-RUN apt-get install -y sudo
diff --git a/src/fuel-plugin/LICENSE b/src/fuel-plugin/LICENSE
deleted file mode 100644
index da963557..00000000
--- a/src/fuel-plugin/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright 2015-2016 Intel Corporation
-
-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.
diff --git a/src/fuel-plugin/README.md b/src/fuel-plugin/README.md
deleted file mode 100644
index d7491977..00000000
--- a/src/fuel-plugin/README.md
+++ /dev/null
@@ -1,60 +0,0 @@
-Barometer Plugin
-================
-
-Plugin description
-Installs collectd-ceilometer on compute via a fuel plugin.
-
-Requirements
-------------
-
-| Requirement | Version/Comment |
-|----------------------------------|-----------------|
-| Mirantis OpenStack compatibility | 10.0 |
-
-
-Documents
----------
-
-1. https://wiki.openstack.org/wiki/Fuel
-2. https://wiki.openstack.org/wiki/Fuel/Plugins
-
-Build/Deploy/Verify
--------------------
-
-step 1, 2, 3 may be bypassed if fuel plugin is installed from /opt/opnfv in fuel@opnfv.
-
-1) install fuel plugin builder
- sudo apt-get install -y ruby-dev rubygems-integration python-pip rpm createrepo dpkg-dev
- sudo gem install fpm
- sudo pip install fuel-plugin-builder
-
-2) build plugin
- fpb --build <plugin-dir>
- e.g.: fpb --build barometer/src/fuel-plugin
-
-3) copy plugin rpm to fuel master
- e.g. scp fuel-plugin-collectd-ceilometer-1.0-1.0.0-1.noarch.rpm <user>@<server-name>:~/
-
-4) install plugin
- fuel plugins --install <plugin-name>.rpm
-
-5) prepare fuel environment
- a) enable ceilometer service
- go to settings/openstack services
- check 'Install Ceilometer and Aodh' to enable ceilometer
- b) enable collectd-ceilometer
- go to settings/other
- enable the barometer plugins using the checkboxes
- c) save settings
-
-6) add nodes to environment
-
-7) deploy
-
-8) verify
-SSH to openstack controller node:
- source openrc
- ceilometer sample-list -m interface.if_packets
- ceilometer sample-list -m hugepages.vmpage_number
- ceilometer sample-list -m ovs_events.gauge
- ceilometer sample-list -m mcelog.errors
diff --git a/src/fuel-plugin/build-collectd.sh b/src/fuel-plugin/build-collectd.sh
deleted file mode 100755
index 92589721..00000000
--- a/src/fuel-plugin/build-collectd.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-
-BUILD_HOME=/tmp/collectd-build
-
-set -eux
-
-sudo rm -rf $BUILD_HOME
-sudo mkdir -p $BUILD_HOME
-sudo chmod 777 $BUILD_HOME
-
-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 dh-strip-nondeterminism \
- bison flex autotools-dev libltdl-dev pkg-config \
- iptables-dev \
- javahelper \
- libatasmart-dev \
- libcap-dev \
- libcurl4-gnutls-dev \
- libdbi0-dev \
- libesmtp-dev \
- libganglia1-dev \
- libgcrypt11-dev \
- libglib2.0-dev \
- libgps-dev \
- libhiredis-dev \
- libi2c-dev \
- libldap2-dev \
- liblua5.3-dev \
- liblvm2-dev \
- libmemcached-dev \
- libmodbus-dev \
- libmnl-dev \
- libmosquitto-dev \
- libmysqlclient-dev \
- libnotify-dev \
- libopenipmi-dev \
- liboping-dev \
- libow-dev \
- libpcap0.8-dev \
- libpcap-dev\
- libperl-dev \
- libpq-dev \
- libprotobuf-c-dev \
- libriemann-client-dev \
- librdkafka-dev \
- librabbitmq-dev \
- librrd-dev \
- libsensors4-dev \
- libsigrok-dev \
- libsnmp-dev \
- libsnmp9-dev \
- perl \
- 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
-
-cd ${BUILD_HOME}
-rm -rf collectd
-git clone https://github.com/collectd/collectd; cd collectd; git checkout 36c657e9864856a10c1dba2519a22ab73d68ce76
-git clone https://github.com/collectd/pkg-debian; cd pkg-debian; git checkout 549d3caba74210ad762fe8c556801d9c11ab9876
-cp -r debian ..
-
-cd ${BUILD_HOME}/collectd
-./build.sh
-debian/rules build || true
-debian/rules build
-fakeroot debian/rules binary
-cp ${BUILD_HOME}/*.deb /fuel-plugin/build
diff --git a/src/fuel-plugin/build_fuel_plugin.sh b/src/fuel-plugin/build_fuel_plugin.sh
deleted file mode 100755
index 9d96e201..00000000
--- a/src/fuel-plugin/build_fuel_plugin.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-sudo apt-get update -y
-sudo apt-get install -y ruby-dev rubygems-integration python-pip rpm createrepo dpkg-dev git docker.io
-sudo gem install fpm
-sudo pip install fuel-plugin-builder
-fpb --debug --build .
diff --git a/src/fuel-plugin/deployment_scripts/install.sh b/src/fuel-plugin/deployment_scripts/install.sh
deleted file mode 100755
index 4c6da70b..00000000
--- a/src/fuel-plugin/deployment_scripts/install.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash
-set -eux
-
-INSTALL_HOME=/opt/collectd-ceilometer
-
-HOST=$1
-OS_AUTH_URL=$2
-OS_USERNAME=$3
-OS_PASSWORD=$4
-enable_mcelog=$5
-enable_hugepages=$6
-enable_ovs_events=$7
-
-CEILOMETER_URL_TYPE=${CEILOMETER_URL_TYPE:-internalURL}
-CEILOMETER_TIMEOUT=${CEILOMETER_TIMEOUT:-1000}
-
-MCELOG_SOCKET="socket-path = /var/run/mcelog-client"
-MCELOG_CONF="/etc/mcelog/mcelog.conf"
-
-rm -rf $INSTALL_HOME; mkdir -p $INSTALL_HOME
-cd $INSTALL_HOME
-curl http://$HOST:8080/plugins/fuel-plugin-collectd-ceilometer-1.0/repositories/ubuntu/collectd-ceilometer.tgz | tar xzvf -
-
-apt-get install -y --allow-unauthenticated collectd python-dev libpython2.7 mcelog
-
-cat << EOF > /etc/collectd/collectd.conf.d/collectd-ceilometer-plugin.conf
-<LoadPlugin python>
- Globals true
-</LoadPlugin>
-
-<Plugin python>
- ModulePath "$INSTALL_HOME/collectd-ceilometer-plugin"
- LogTraces true
- Interactive false
- Import "collectd_ceilometer.plugin"
-
- <Module "collectd_ceilometer.plugin">
-
- # Verbosity 1|0
- #VERBOSE 0
-
- # Batch size
- BATCH_SIZE 3
-
- # Service endpoint addresses
- OS_AUTH_URL "$OS_AUTH_URL"
-
- # Ceilometer address
- #CEILOMETER_ENDPOINT
- CEILOMETER_URL_TYPE "$CEILOMETER_URL_TYPE"
-
- # Ceilometer timeout in ms
- CEILOMETER_TIMEOUT "$CEILOMETER_TIMEOUT"
-
- # # Ceilometer user creds
- OS_USERNAME "$OS_USERNAME"
- OS_PASSWORD "$OS_PASSWORD"
- OS_TENANT_NAME "services"
-
- </Module>
-</Plugin>
-EOF
-
-if [ $enable_hugepages = 'true' ]
-then
- cat << EOF > /etc/collectd/collectd.conf.d/hugepages.conf
-LoadPlugin hugepages
-
-<Plugin hugepages>
- ReportPerNodeHP true
- ReportRootHP true
- ValuesPages true
- ValuesBytes false
- ValuesPercentage false
-</Plugin>
-EOF
-fi
-
-if [ $enable_mcelog = 'true' ]
-then
- echo $MCELOG_SOCKET | sudo tee -a $MCELOG_CONF;
- cat << EOF > /etc/collectd/collectd.conf.d/mcelog.conf
-<LoadPlugin mcelog>
- Interval 1
-</LoadPlugin>
-<Plugin "mcelog">
- McelogClientSocket "/var/run/mcelog-client"
-</Plugin>
-EOF
-fi
-
-if [ $enable_ovs_events = 'true' ]
-then
- ovs-vsctl set-manager ptcp:6640
- cat << EOF > /etc/collectd/collectd.conf.d/ovs.conf
-<LoadPlugin ovs_events>
- Interval 1
-</LoadPlugin>
-<Plugin "ovs_events">
- SendNotification true
-</Plugin>
-EOF
-fi
-
-service collectd restart
diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp
deleted file mode 100644
index 4da567d6..00000000
--- a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp
+++ /dev/null
@@ -1,29 +0,0 @@
-$master_ip = hiera('master_ip')
-$use_ceilometer = hiera('use_ceilometer', false)
-
-$management_vip = hiera('management_vip')
-$service_endpoint = hiera('service_endpoint', $management_vip)
-$ssl_hash = hiera_hash('use_ssl', {})
-$auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
-$auth_endpoint = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [$service_endpoint])
-$auth_uri = "${auth_protocol}://${auth_endpoint}:5000/v2.0"
-
-$ceilometer_hash = hiera_hash('ceilometer', {'user'=>'ceilometer'})
-$auth_user = 'ceilometer'
-$auth_password = $ceilometer_hash['user_password']
-
-
-$collectd_settings = hiera('fuel-plugin-collectd-ceilometer')
-$enable_mcelog = $collectd_settings['enable_mcelog']
-$enable_hugepages = $collectd_settings['enable_hugepages']
-$enable_ovs_events = $collectd_settings['enable_ovs_events']
-
-$exe_url = "http://${master_ip}:8080/plugins/fuel-plugin-collectd-ceilometer-1.0/deployment_scripts/install.sh"
-
-if ($use_ceilometer) {
-
- exec { "install collectd-ceilometer":
- command => "curl ${exe_url} | bash -s ${master_ip} ${auth_uri} ${auth_user} ${auth_password} ${enable_mcelog} ${enable_hugepages} ${enable_ovs_events}",
- path => "/usr/bin:/usr/sbin:/bin:/sbin";
- }
-}
diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp
deleted file mode 100644
index ffe3d6d9..00000000
--- a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644
index 59f5151b..00000000
--- a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-exec { "restart collectd":
- command => "service collectd restart",
- path => "/usr/bin:/usr/sbin:/bin:/sbin";
-}
diff --git a/src/fuel-plugin/deployment_tasks.yaml b/src/fuel-plugin/deployment_tasks.yaml
deleted file mode 100644
index e73783e0..00000000
--- a/src/fuel-plugin/deployment_tasks.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-- id: collectd-ceilometer_install
- type: puppet
- version: 2.0.0
- groups: [compute]
- required_for: [post_deployment_end]
- requires: [post_deployment_start]
- parameters:
- puppet_manifest: puppet/manifests/collectd-ceilometer_install.pp
- puppet_modules: puppet/modules:/etc/puppet/modules
- timeout: 720
diff --git a/src/fuel-plugin/environment_config.yaml b/src/fuel-plugin/environment_config.yaml
deleted file mode 100644
index 95cea4fa..00000000
--- a/src/fuel-plugin/environment_config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-attributes:
- enable_mcelog:
- type: "checkbox"
- weight: 20
- value: false
- label: "Enable collectd for mcelog"
- enable_hugepages:
- type: "checkbox"
- weight: 20
- value: false
- label: "Enable collectd for hugepages"
- enable_ovs_events:
- type: "checkbox"
- weight: 20
- value: false
- label: "Enable collectd for Open vSwitch events"
diff --git a/src/fuel-plugin/metadata.yaml b/src/fuel-plugin/metadata.yaml
deleted file mode 100644
index 376e7dc8..00000000
--- a/src/fuel-plugin/metadata.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-# Plugin name
-name: fuel-plugin-collectd-ceilometer
-# Human-readable name for your plugin
-title: Barometer Plugin
-# Plugin version
-version: '1.0.0'
-# Description
-description: Deploy Barometer Plugin
-# Required fuel version
-fuel_version: ['10.0']
-# Specify license of your plugin
-licenses: ['Apache License Version 2.0']
-# Specify author or company name
-authors: ['ruijing.guo@intel.com']
-# A link to the plugin's page
-homepage: 'https://gerrit.opnfv.org/gerrit/fastpathmetrics'
-# Specify a group which your plugin implements, possible options:
-# network, storage, storage::cinder, storage::glance, hypervisor
-groups: ['network']
-
-is_hotpluggable: true
-
-# The plugin is compatible with releases in the list
-releases:
- - os: ubuntu
- version: newton-10.0
- mode: ['ha']
- deployment_scripts_path: deployment_scripts/
- repository_path: repositories/ubuntu
-
-# Version of plugin package
-package_version: '4.0.0'
diff --git a/src/fuel-plugin/pre_build_hook b/src/fuel-plugin/pre_build_hook
deleted file mode 100755
index d264d0bf..00000000
--- a/src/fuel-plugin/pre_build_hook
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-# Add here any the actions which are required before plugin build
-# like packages building, packages downloading from mirrors and so on.
-# The script should return 0 if there were no errors.
-#!/bin/bash
-
-set -eux
-
-BUILD_FOR=${BUILD_FOR:-ubuntu}
-DIR="$(dirname `readlink -f $0`)"
-
-function build_pkg {
- case $1 in
- ubuntu)
- sudo rm -rf ${DIR}/build; mkdir -p ${DIR}/build
-
- cd ${DIR}/build
- git clone https://github.com/openstack/collectd-ceilometer-plugin
- cd collectd-ceilometer-plugin
- git checkout 73372f2eb86c81f12bc10b392f75050a401107db
-
- # build collectd
- cd ${DIR}
- sudo docker build -t collectd_build .
- sudo docker run -v ${DIR}:/fuel-plugin -t collectd_build /fuel-plugin/build-collectd.sh
-
- rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu
- cd ${DIR}/build
- mv *.deb ${DIR}/repositories/ubuntu
- tar cfvz ${DIR}/repositories/ubuntu/collectd-ceilometer.tgz .
- cd ..; sudo rm -rf ${DIR}/build
- ;;
- *) echo "Not supported system"; exit 1;;
- esac
-}
-
-for system in $BUILD_FOR
-do
- build_pkg $system
-done
diff --git a/src/fuel-plugin/tasks.yaml b/src/fuel-plugin/tasks.yaml
deleted file mode 100644
index fe51488c..00000000
--- a/src/fuel-plugin/tasks.yaml
+++ /dev/null
@@ -1 +0,0 @@
-[]
diff --git a/src/fuel-plugin/vagrant/Vagrantfile b/src/fuel-plugin/vagrant/Vagrantfile
deleted file mode 100644
index ba237d79..00000000
--- a/src/fuel-plugin/vagrant/Vagrantfile
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
-VAGRANTFILE_API_VERSION = "2"
-
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
-
- config.vm.box = "bento/ubuntu-16.04"
-
- config.vm.define "fuel" do | h |
- h.vm.host_name = "fuel"
- h.vm.provision :shell, :inline => "cd /fuel-plugin; ./build_fuel_plugin.sh", privileged: false
- h.vm.synced_folder "..", "/fuel-plugin"
- h.vm.provider :virtualbox do |v|
- v.customize ["modifyvm", :id, "--memory", 4096]
- v.customize ["modifyvm", :id, "--cpus", 4]
- v.customize "post-boot",["controlvm", :id, "setlinkstate1", "on"]
- end
- end
-end