diff options
author | yayogev <yaronyogev@gmail.com> | 2018-02-27 17:00:05 +0200 |
---|---|---|
committer | yayogev <yaronyogev@gmail.com> | 2018-02-27 17:00:05 +0200 |
commit | 648a394f7a318443dfd82f790f83a79616c26905 (patch) | |
tree | 719508e9d99771c3de056a9c2914d461c35fb967 /app/install | |
parent | 100add41cfe2b987524b190c1c92771a3c4f1d5f (diff) |
US3541 merge various fixes to OPNFV branch
timestamp of last commit tt was merged: 26-Jan-2018 16:25.
Change-Id: I7b0bf7885d7d0badb81c794a52c480b905d78459
Signed-off-by: yayogev <yaronyogev@gmail.com>
Diffstat (limited to 'app/install')
-rw-r--r-- | app/install/calipso-installer.py | 19 | ||||
-rw-r--r-- | app/install/db/monitoring_config_templates.json | 5 |
2 files changed, 17 insertions, 7 deletions
diff --git a/app/install/calipso-installer.py b/app/install/calipso-installer.py index 78bb927..ad2b4e0 100644 --- a/app/install/calipso-installer.py +++ b/app/install/calipso-installer.py @@ -16,7 +16,12 @@ import dockerpycreds # note : not used, useful for docker api security if used import time import json - +import socket +# by default, we want to use the docker0 interface ip address for inter-contatiner communications, +# if hostname argument will not be provided as argument for the calipso-installer +import os +dockerip = os.popen('ip addr show docker0 | grep "\<inet\>" | awk \'{ print $2 }\' | awk -F "/" \'{ print $1 }\'') +local_hostname = dockerip.read().replace("\n", "") C_MONGO_CONFIG = "/local_dir/calipso_mongo_access.conf" H_MONGO_CONFIG = "/home/calipso/calipso_mongo_access.conf" @@ -161,7 +166,8 @@ def start_mongo(dbport, copy): copy_file("clique_types") copy_file("cliques") copy_file("constants") - copy_file("environments_config") + copy_file("environments_config"), + copy_file("environment_options"), copy_file("inventory") copy_file("link_types") copy_file("links") @@ -328,10 +334,10 @@ def container_stop(container_name): # parser for getting optional command arguments: parser = argparse.ArgumentParser() parser.add_argument("--hostname", - help="Hostname or IP address of the server " - "(default=172.17.0.1)", + help="FQDN (ex:mysrv.cisco.com) or IP address of the Server" + "(default=docker0 interface ip address)", type=str, - default="172.17.0.1", + default=local_hostname, required=False) parser.add_argument("--webport", help="Port for the Calipso WebUI " @@ -401,6 +407,8 @@ parser.add_argument("--copy", required=False) args = parser.parse_args() +print("\nrunning installer against host:", args.hostname, "\n") + if args.command == "start-all": container = "all" action = "start" @@ -424,6 +432,7 @@ while container != "all" and container not in container_names: if container == "q": exit() + # starting the containers per arguments: if action == "start": # building /home/calipso/calipso_mongo_access.conf and diff --git a/app/install/db/monitoring_config_templates.json b/app/install/db/monitoring_config_templates.json index b5c47df..e0d59e7 100644 --- a/app/install/db/monitoring_config_templates.json +++ b/app/install/db/monitoring_config_templates.json @@ -315,14 +315,15 @@ "order" : "1",
"condition" : {
"mechanism_drivers" : [
- "OVS"
+ "OVS",
+ "Flannel"
]
},
"config" : {
"checks" : {
"{objtype}_{objid}" : {
"interval" : 15,
- "command" : "check_vconnector_ovs.py {name}",
+ "command" : "check_vconnector.py {name}",
"standalone" : true,
"type": "metric",
"subscribers" : [
|