From 249a52f718d192b4e0311c815e1de57db4b9e008 Mon Sep 17 00:00:00 2001 From: Helena McGough Date: Tue, 12 Dec 2017 11:27:46 +0000 Subject: [PATCH] Updated the manual installation process and documentation Change-Id: I9b0aeb28b5af442163ab117ab25e36a9eebeb385 Signed-off-by: Helena McGough --- .gitignore | 3 ++- doc/MON_install_guide.rst | 10 ++++++++-- osm_mon/core/message_bus/common_consumer | 5 ++--- osm_mon/plugins/CloudWatch/__init__.py | 0 scripts/install_mon.sh | 4 ++-- 5 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 osm_mon/plugins/CloudWatch/__init__.py diff --git a/.gitignore b/.gitignore index 2ed04bf..8243f05 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ develop-eggs .installed.cfg lib lib64 +nohup.out # Installer logs pip-log.txt @@ -73,4 +74,4 @@ ChangeLog .*.swp .*sw? .settings/ -.__pycache__/ +__pycache__/ diff --git a/doc/MON_install_guide.rst b/doc/MON_install_guide.rst index 272e630..2d36040 100644 --- a/doc/MON_install_guide.rst +++ b/doc/MON_install_guide.rst @@ -89,13 +89,13 @@ the plugins support. :: - lxc exec MON - python /root/MON/osm_mon/core/message_bus/common_consumer + lxc exec MON -- nohup python /root/MON/osm_mon/core/message_bus/common_consumer & * To enable Aodh alarm notifications to be sent to SO: :: - lxc exec MON - python /root/MON/osm_mon/plugins/OpenStack/Aodh/notifier.py + lxc exec MON - nohup python /root/MON/osm_mon/plugins/OpenStack/Aodh/notifier.py & CloudWatch ~~~~~~~~~~ @@ -116,3 +116,9 @@ Verification :: lxc exec MON -- service kafka status + +* To check the logs of the plugins: + + :: + + lxc exec MON -- tail -f /root/MON_plugins.log diff --git a/osm_mon/core/message_bus/common_consumer b/osm_mon/core/message_bus/common_consumer index 7221d0c..de0c4ed 100755 --- a/osm_mon/core/message_bus/common_consumer +++ b/osm_mon/core/message_bus/common_consumer @@ -25,7 +25,6 @@ import sys import os sys.path.append("/root/MON") -sys.path.append("../../plugins/CloudWatch") logging.basicConfig(filename='MON_plugins.log', format='%(asctime)s %(message)s', @@ -40,8 +39,8 @@ from osm_mon.plugins.OpenStack.Aodh import alarming from osm_mon.plugins.OpenStack.common import Common from osm_mon.plugins.OpenStack.Gnocchi import metrics -from plugin_alarm import plugin_alarms -from plugin_metric import plugin_metrics +from osm_mon.plugins.CloudWatch.plugin_alarm import plugin_alarms +from osm_mon.plugins.CloudWatch.plugin_metric import plugin_metrics # Initialize servers server = {'server': 'localhost:9092'} diff --git a/osm_mon/plugins/CloudWatch/__init__.py b/osm_mon/plugins/CloudWatch/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/scripts/install_mon.sh b/scripts/install_mon.sh index 56c2d5a..bee28a0 100644 --- a/scripts/install_mon.sh +++ b/scripts/install_mon.sh @@ -36,5 +36,5 @@ lxc exec MON -- apt-get --yes install git python python-pip libmysqlclient-dev lxc exec MON -- git clone https://osm.etsi.org/gerrit/osm/MON.git lxc exec MON -- pip install -r /root/MON/requirements.txt lxc exec MON -- python /root/MON/kafkad -lxc exec MON -- . /root/MON/scripts/kafka.sh -lxc exec MON -- . /root/MON/osm_mon/plugins/vRealiseOps/vROPs_Webservice/install.sh +lxc exec MON -- /bin/bash /root/MON/scripts/kafka.sh +lxc exec MON -- /bin/bash /root/MON/osm_mon/plugins/vRealiseOps/vROPs_Webservice/install.sh -- 2.25.1