summaryrefslogtreecommitdiffstats
path: root/tests/blueprints/tosca-vnfd-hello-ves
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-10-23 19:49:56 +0000
committerblsaws <bryan.sullivan@att.com>2016-10-23 19:49:56 +0000
commitac118982bf77f435d81517c722cfa10ede661136 (patch)
treefca754979f99e661844005b7906c923b293979d9 /tests/blueprints/tosca-vnfd-hello-ves
parent1995784862923e2578dd93ebff68756c8fa4770b (diff)
Add removal steps for bare metal collectd agents
JIRA: VES-1 Change-Id: Ia5f70a41750da50df6cb5e83327c23b0e5b9816d Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'tests/blueprints/tosca-vnfd-hello-ves')
-rwxr-xr-xtests/blueprints/tosca-vnfd-hello-ves/start.sh50
1 files changed, 22 insertions, 28 deletions
diff --git a/tests/blueprints/tosca-vnfd-hello-ves/start.sh b/tests/blueprints/tosca-vnfd-hello-ves/start.sh
index 5f7ec8a..26fb667 100755
--- a/tests/blueprints/tosca-vnfd-hello-ves/start.sh
+++ b/tests/blueprints/tosca-vnfd-hello-ves/start.sh
@@ -1,5 +1,3 @@
-
-
#!/bin/bash
# Copyright 2016 AT&T Intellectual Property, Inc
#
@@ -43,28 +41,28 @@ setup_collectd () {
conf="/etc/collectd.conf"
fi
- if [[ ! -d ~/OpenStackBarcelonaDemo ]]; then
- if [ "$dist" == "Ubuntu" ]; then
- sudo apt-get update
- sudo apt-get install -y collectd
- else
- sudo yum update -y
- sudo yum install -y epel-release
- sudo yum install -y collectd
- fi
- cd ~
+ if [ "$dist" == "Ubuntu" ]; then
+ sudo apt-get update
+ sudo apt-get install -y collectd
+ else
+ sudo yum update -y
+ sudo yum install -y epel-release
+ sudo yum install -y collectd
+ sudo yum install -y collectd-virt
+ fi
+ cd ~
- echo "$0: Install VES collectd plugin"
- git clone https://github.com/maryamtahhan/OpenStackBarcelonaDemo.git
+ echo "$0: Install VES collectd plugin"
+ git clone https://github.com/maryamtahhan/OpenStackBarcelonaDemo.git
- sudo sed -i -- "s/FQDNLookup true/FQDNLookup false/" /etc/collectd/collectd.conf
- sudo sed -i -- "s/#LoadPlugin cpu/LoadPlugin cpu/" /etc/collectd/collectd.conf
- sudo sed -i -- "s/#LoadPlugin disk/LoadPlugin disk/" /etc/collectd/collectd.conf
- sudo sed -i -- "s/#LoadPlugin interface/LoadPlugin interface/" /etc/collectd/collectd.conf
- sudo sed -i -- "s/#LoadPlugin memory/LoadPlugin memory/" /etc/collectd/collectd.conf
+ sudo sed -i -- "s/FQDNLookup true/FQDNLookup false/" /etc/collectd/collectd.conf
+ sudo sed -i -- "s/#LoadPlugin cpu/LoadPlugin cpu/" /etc/collectd/collectd.conf
+ sudo sed -i -- "s/#LoadPlugin disk/LoadPlugin disk/" /etc/collectd/collectd.conf
+ sudo sed -i -- "s/#LoadPlugin interface/LoadPlugin interface/" /etc/collectd/collectd.conf
+ sudo sed -i -- "s/#LoadPlugin memory/LoadPlugin memory/" /etc/collectd/collectd.conf
- if [[ "$guest" == true ]]; then
- cat <<EOF | sudo tee -a $conf
+ if [[ "$guest" == true ]]; then
+ cat <<EOF | sudo tee -a $conf
<LoadPlugin python>
Globals true
</LoadPlugin>
@@ -102,13 +100,13 @@ LoadPlugin aggregation
</Plugin>
LoadPlugin uuid
EOF
- else
- cat <<EOF | sudo tee -a $conf
+ else
+ cat <<EOF | sudo tee -a $conf
<LoadPlugin python>
Globals true
</LoadPlugin>
<Plugin python>
- ModulePath "/home/ubuntu/OpenStackBarcelonaDemo/ves_plugin/"
+ ModulePath "/home/$USER/OpenStackBarcelonaDemo/ves_plugin/"
LogTraces true
Interactive false
Import "ves_plugin"
@@ -146,10 +144,6 @@ LoadPlugin aggregation
</Aggregation>
</Plugin>
EOF
- fi
- else
- echo "$0: Update collectd conf with current Collector IP"
- sudo sed -i -- "s/ Domain \".*\"/ Domain \"$collector_ip\"/" $conf
fi
sudo service collectd restart
}