summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2018-01-19 07:11:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-19 07:11:56 +0000
commit758c219ff3c371dd2e1c07ca7cd0e4c62d9f4c87 (patch)
treec6a6834e950ef77f9e4fa48658e774059e2192e9 /deploy
parentac4b6676ca9b27705ed39e35039f0d3403695cb6 (diff)
parent371916c2ad016c460cee384db0e9ca1c97d11b6f (diff)
Merge "Add extra parameter to integrate with doctor"
Diffstat (limited to 'deploy')
-rw-r--r--deploy/prepare.sh8
-rw-r--r--deploy/prepare/execute.py13
2 files changed, 19 insertions, 2 deletions
diff --git a/deploy/prepare.sh b/deploy/prepare.sh
index 803d2462..bdf9f1ca 100644
--- a/deploy/prepare.sh
+++ b/deploy/prepare.sh
@@ -23,6 +23,7 @@ usage: `basename $0` -n network_config_file
OPTIONS:
-n network configuration path, necessary
-b 0 for virtual, 1 for baremetal
+ -d 1 for run doctor, other do not
-h Print this message and exit
Description:
@@ -36,7 +37,7 @@ EOF
NETWORK_CONF=''
-while getopts "n:b:h" OPTION
+while getopts "n:b:d:h" OPTION
do
case $OPTION in
n)
@@ -45,6 +46,9 @@ do
b)
IS_BARE=${OPTARG}
;;
+ d)
+ RUN_DOCTOR=${OPTARG}
+ ;;
h)
usage
exit 0
@@ -57,4 +61,4 @@ do
esac
done
-python $PYTHONPATH/deploy/prepare/execute.py -nw $NETWORK_CONF -b $IS_BARE
+python $PYTHONPATH/deploy/prepare/execute.py -nw $NETWORK_CONF -b $IS_BARE -d $RUN_DOCTOR
diff --git a/deploy/prepare/execute.py b/deploy/prepare/execute.py
index 11939b8d..909d3001 100644
--- a/deploy/prepare/execute.py
+++ b/deploy/prepare/execute.py
@@ -12,6 +12,7 @@ import os
from deploy.config.network import NetworkConfig
KOLLA_CONF_PATH = '/etc/kolla/config'
+DOCTOR_EXTRA_FILE = '/home/kolla_install/kolla-ansible/ansible/roles/ceilometer/templates/event_pipeline.yaml.j2'
def _make_dirs(path):
@@ -59,6 +60,11 @@ def _set_trusts_auth():
'trusts_delegated_roles =\n'
+def _config_doctor_extra_configuration():
+ with open(DOCTOR_EXTRA_FILE, 'a') as fp:
+ fp.write(' - notifier://?topic=alarm.all\n')
+
+
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-nw', '--network-file',
@@ -69,11 +75,18 @@ def main():
type=str,
required=True,
help='0 for virtual, 1 for baremetal')
+ parser.add_argument('-d', '--run-doctor',
+ type=str,
+ required=True,
+ help='1 for run doctor, other do not run doctor')
args = parser.parse_args()
if args.is_baremetal == '0':
_set_qemu_compute()
+ if args.run_doctor == '1':
+ _config_doctor_extra_configuration()
+
_set_default_floating_pool(args.network_file)
_set_trusts_auth()