From: GuangrongFu Date: Wed, 25 Jul 2018 03:04:54 +0000 (+0800) Subject: Fixed the bug that UI cannot be registered to MSB X-Git-Tag: 1.2.0~36^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=holmes%2Frule-management.git;a=commitdiff_plain;h=07a64a6e2b0feea3543f7c6fc7fecb064cb600a3 Fixed the bug that UI cannot be registered to MSB Change-Id: I0645b0e6badeca838012d3fb8a8192924c18d283 Issue-ID: HOLMES-146 Signed-off-by: GuangrongFu --- diff --git a/rulemgt-standalone/src/main/assembly/bin/run.sh b/rulemgt-standalone/src/main/assembly/bin/run.sh index e05c753..f800eb4 100644 --- a/rulemgt-standalone/src/main/assembly/bin/run.sh +++ b/rulemgt-standalone/src/main/assembly/bin/run.sh @@ -82,10 +82,13 @@ sed -i "s|keyStorePassword:.*|keyStorePassword: $KEY_PASSWORD|" "$main_path/conf #Register the fronten to MSB -body='{"serviceName": "holmes", "version": "v1", "url": "/iui/holmes","protocol": "UI", "enable_ssl":"true", "visualRange":"0|1", "nodes": [ {"ip": "host_ip","port": "9104"}]}' -curl -X POST -H "Content-Type: application/json" -d ${body/host_ip/"${HOSTNAME%:*}"} http://${MSB_ADDR}:10081/api/microservices/v1/services +body='{"serviceName":"holmes","version":"v1","url":"/iui/holmes","nodes":[{"ip":"host_ip","port":"9104","lb_server_params":"","checkType":"","checkUrl":"","checkInterval":"","checkTimeOut":"","ttl":"","ha_role":""}],"protocol":"UI","visualRange":"0|1","lb_policy":"","publish_port":"","namespace":"","network_plane_type":"","host":"","path":"","labels":[],"metadata":[]}' +msg_body=${body/host_ip/"${HOSTNAME%:*}"} +curl -X POST -H "Content-Type: application/json" -d ${msg_body} http://${MSB_ADDR}/api/msdiscover/v1/services?is_manual=true +echo Registered UI to MSB. nginx -c /usr/local/openresty/nginx/conf/nginx.conf +echo nginx started. "$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.holmes.rulemgt.RuleActiveApp server "$main_path/conf/rulemgt.yml"