Fixed the bug that UI cannot be registered to MSB 09/57409/1
authorGuangrongFu <fu.guangrong@zte.com.cn>
Wed, 25 Jul 2018 03:04:54 +0000 (11:04 +0800)
committerGuangrongFu <fu.guangrong@zte.com.cn>
Wed, 25 Jul 2018 03:04:54 +0000 (11:04 +0800)
Change-Id: I0645b0e6badeca838012d3fb8a8192924c18d283
Issue-ID: HOLMES-146
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
rulemgt-standalone/src/main/assembly/bin/run.sh

index e05c753..f800eb4 100644 (file)
@@ -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"