diff options
author | HuabingZhao <zhao.huabing@zte.com.cn> | 2017-07-25 15:18:33 +0800 |
---|---|---|
committer | HuabingZhao <zhao.huabing@zte.com.cn> | 2017-07-25 18:11:59 +0800 |
commit | 672f3d40be83d9e380fd7be4b674d5e8d5fa36de (patch) | |
tree | 43105e1d5e2ba8e8accea8648e57e1cf87db3f00 /msb-core/apiroute/apiroute-standalone/src | |
parent | 41d3db15a8e1a0496f9c2a5e15db2998a32bb9bf (diff) |
Divide the MSB source codes into two repos
Change-Id: Ie76d545b214a8ce5191f215350a623e1529983d9
Issue-id: MSB-5
Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'msb-core/apiroute/apiroute-standalone/src')
15 files changed, 0 insertions, 498 deletions
diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.exe b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.exe Binary files differdeleted file mode 100644 index c6e8fc2..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.exe +++ /dev/null diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.xml b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.xml deleted file mode 100644 index 617c66e..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.xml +++ /dev/null @@ -1,33 +0,0 @@ -<!-- - - Copyright 2016 ZTE Corporation. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Author: Zhaoxing Meng - email: meng.zhaoxing1@zte.com.cn - ---> -<service> - <id>msb_apiroute</id> - <name>msb_apiroute</name> - <description>This service runs apiroute.</description> - <workingdirectory>%BASE%</workingdirectory> - <env name="JAVA_HOME" value="c:\jdk"/> - <env name="RUNHOME" value="%BASE%"/> - <executable>java</executable> - <arguments>-jar "apiroute-service.jar" server "conf/apiroute.yml"</arguments> - <stopexecutable>stop.bat</stopexecutable> - <logmode>rotate</logmode> - <!-- stopparentprocessfirst>true</stopparentprocessfirst --> -</service>
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/conf/apiroute.yml b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/conf/apiroute.yml deleted file mode 100644 index 4fe697d..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/conf/apiroute.yml +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Zhaoxing Meng -# email: meng.zhaoxing1@zte.com.cn -# - -defaultWorkspace: ../apiroute-works - -defaultName: ${DW_DEFAULT_NAME:-Stranger} - -propertiesName: redis.properties -propertiesDir: conf - -# use the discover config if you want to monitor a discover service and register microservices change -discoverInfo: - ip: 127.0.0.1 - port: 10081 - enabled: false - -consulInfo: - ip: 127.0.0.1 - port: 8500 - -# use the simple server factory if you only want to run on a single port -server: - type: simple - rootPath: '/api/microservices/v1/*' - applicationContextPath: / - adminContextPath: /admin - connector: - type: http - port: 8086 - -# Logging settings. -logging: - - # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. - level: ALL - - # Logger-specific levels. - loggers: - - # Sets the level for 'com.example.app' to DEBUG. - com.example: DEBUG - - appenders: - - type: console - threshold: INFO - timeZone: UTC - logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n" - - type: file - threshold: INFO - logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n" - currentLogFilename: ../apiroute-works/logs/application.log - archivedLogFilenamePattern: ../apiroute-works/logs/application-%d{yyyy-MM-dd}-%i.log.gz - archivedFileCount: 7 - timeZone: UTC - diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/msb.json b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/msb.json deleted file mode 100644 index 5df59e2..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/msb.json +++ /dev/null @@ -1,53 +0,0 @@ -[{ - "serviceName" : "microservices", - "version" : "v1", - "url" : "/api/microservices/v1", - "apiJson" : "/api/microservices/v1/swagger.json", - "apiJsonType" : "1", - "metricsUrl" : "/admin/metrics", - "control" : "1", - "status" : "1", - "servers" : [{ - "ip" : "127.0.0.1", - "port" : "8086", - "weight" : 0 - } - ] - }, -{ - "serviceName" : "microservices", - "url" : "/iui/microservices", - "control" : "1", - "status" : "1", - "servers" : [{ - "ip" : "127.0.0.1", - "port" : "8086", - "weight" : 0 - } - ] - }, - { - "serviceName" : "/winery-topologymodeler", - "url" : "/winery-topologymodeler", - "control" : "0", - "status" : "1", - "servers" : [{ - "ip" : "127.0.0.1", - "port" : "8202", - "weight" : 0 - } - ] - }, - { - "serviceName" : "/winery", - "url" : "/winery", - "control" : "0", - "status" : "1", - "servers" : [{ - "ip" : "127.0.0.1", - "port" : "8202", - "weight" : 0 - } - ] - } -] diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/readme.txt b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/readme.txt deleted file mode 100644 index 2df5d10..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/readme.txt +++ /dev/null @@ -1,82 +0,0 @@ -==== - Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Author: Zhaoxing Meng - email: meng.zhaoxing1@zte.com.cn -==== - -########################## initialize default routeInfo to redis ########################## - -#when msb is starting, it will automatically read all json files under this folder, and initializes to redis. -#If the routeInfo is exist, it will be ignored, otherwise it will be saved. - - -# JSON File content must be routeInfo format array like below examples: - -# optional: -# apiJsonType: 1:user-defined json type 0:pre-defined json type -# control: 0:default 1:readonly 2:hidden -# status: 0:disabled 1:enabled -# Tip��control��status��weight are non-mandatory - -[ -##########################apiRoute example########################## - -{ - "serviceName" : "microservices", - "version" : "v1", - "url" : "/api/microservices/v1", - "apiJson" : "/api/microservices/v1/swagger.json", - "apiJsonType" : "1", - "metricsUrl" : "/admin/metrics", - "control" : "1", - "status" : "1", - "servers" : [{ - "ip" : "127.0.0.1", - "port" : "8086", - "weight" : 0 - } - ] - }, - -##########################iuiRoute example########################## - -{ - "serviceName" : "microservices", - "url" : "/iui/microservices", - "control" : "1", - "status" : "1", - "servers" : [{ - "ip" : "127.0.0.1", - "port" : "8086", - "weight" : 0 - } - ] - }, - -##########################customRoute example########################## - { - "serviceName" : "/test", - "url" : "/test", - "control" : "0", - "status" : "1", - "servers" : [{ - "ip" : "10.74.56.36", - "port" : "8989", - "weight" : 0 - } - ] - } -]
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc1.json b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc1.json deleted file mode 100644 index 7c63d7e..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc1.json +++ /dev/null @@ -1 +0,0 @@ -{"swagger":"2.0","info":{"version":"1.0.0","title":"Local API Test"},"basePath":"/service","tags":[{"name":"ApiRoute"}],"paths":{"/apiRoute":{"get":{"tags":["ApiRoute"],"summary":"get all ApiRoute ","description":"","operationId":"getApiRoutes","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ApiRouteInfo"}}}}},"post":{"tags":["ApiRoute"],"summary":"add one ApiRoute ","description":"","operationId":"addApiRoute","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"add ApiRoute error "}}}},"/apiRoute/type/{type}/{routeName}/version/{version}":{"get":{"tags":["ApiRoute"],"summary":"get one ApiRoute ","description":"","operationId":"getApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"get ApiRoute error "}}},"delete":{"tags":["ApiRoute"],"summary":"delete one ApiRoute by routeName and version","description":"","operationId":"deleteApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"delete ApiRoute error "}}}},"/apiRoute/{routeName}/version/{version}":{"put":{"tags":["ApiRoute"],"summary":"update one ApiRoute by routeName and version","description":"","operationId":"updateApiRoute","produces":["application/json"],"parameters":[{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"},{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"update ApiRoute error "}}}}},"definitions":{"ApiRouteLifeCycle":{"type":"object","properties":{"installPath":{"type":"string"},"startScript":{"type":"string"},"stopScript":{"type":"string"}}},"ApiRouteServer":{"type":"object","properties":{"ip":{"type":"string"},"weight":{"type":"integer","format":"int32"}}},"ApiRouteResult":{"type":"object","properties":{"result":{"type":"string"},"info":{"type":"string"}}},"ApiRouteInfo":{"type":"object","properties":{"routeName":{"type":"string"},"version":{"type":"string"},"url":{"type":"string"},"apiJson":{"type":"string"},"type":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/ApiRouteServer"}},"lifeCycle":{"$ref":"#/definitions/ApiRouteLifeCycle"}}}}}
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc2.json b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc2.json deleted file mode 100644 index eb7c8cd..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc2.json +++ /dev/null @@ -1 +0,0 @@ -{"swagger":"2.0","info":{"version":"1.0.0","title":"Local API Test2"},"basePath":"/service","tags":[{"name":"ApiRoute"}],"paths":{"/apiRoute":{"get":{"tags":["ApiRoute"],"summary":"get all ApiRoute ","description":"","operationId":"getApiRoutes","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ApiRouteInfo"}}}}},"post":{"tags":["ApiRoute"],"summary":"add one ApiRoute ","description":"","operationId":"addApiRoute","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"add ApiRoute error "}}}},"/apiRoute/type/{type}/{routeName}/version/{version}":{"get":{"tags":["ApiRoute"],"summary":"get one ApiRoute ","description":"","operationId":"getApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"get ApiRoute error "}}},"delete":{"tags":["ApiRoute"],"summary":"delete one ApiRoute by routeName and version","description":"","operationId":"deleteApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"delete ApiRoute error "}}}},"/apiRoute/{routeName}/version/{version}":{"put":{"tags":["ApiRoute"],"summary":"update one ApiRoute by routeName and version","description":"","operationId":"updateApiRoute","produces":["application/json"],"parameters":[{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"},{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"update ApiRoute error "}}}}},"definitions":{"ApiRouteLifeCycle":{"type":"object","properties":{"installPath":{"type":"string"},"startScript":{"type":"string"},"stopScript":{"type":"string"}}},"ApiRouteServer":{"type":"object","properties":{"ip":{"type":"string"},"weight":{"type":"integer","format":"int32"}}},"ApiRouteResult":{"type":"object","properties":{"result":{"type":"string"},"info":{"type":"string"}}},"ApiRouteInfo":{"type":"object","properties":{"routeName":{"type":"string"},"version":{"type":"string"},"url":{"type":"string"},"apiJson":{"type":"string"},"type":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/ApiRouteServer"}},"lifeCycle":{"$ref":"#/definitions/ApiRouteLifeCycle"}}}}}
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initUrlRootPath/initUrlRootPath.json b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initUrlRootPath/initUrlRootPath.json deleted file mode 100644 index 8684dee..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initUrlRootPath/initUrlRootPath.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "iuiRootPath" : "openoui", - "apiRootPath" : "openoapi" -} diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/initVisualRangeMatches.json b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/initVisualRangeMatches.json deleted file mode 100644 index 4554783..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/initVisualRangeMatches.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "visualRange" : "0,1" -} diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/readme.txt b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/readme.txt deleted file mode 100644 index 36e9244..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/readme.txt +++ /dev/null @@ -1,33 +0,0 @@ -==== - Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Author: Zhaoxing Meng - email: meng.zhaoxing1@zte.com.cn -==== - -########################## initialize default visualRange Matches from msdiscover to redis ########################## - - -visualRange:����Ŀɼ���Χ ϵͳ��:0 ϵͳ��:1 - -#when msb is starting, it will automatically read this json file named "initVisualRangeMatches.json" - -#when msdiscover will sysn datas to apiGateway,only visualRange Matches will be save to redis. - - - -# JSON File content must be format array like below examples: - -0 or 1 or 0,1
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/find_kill_process.bat b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/find_kill_process.bat deleted file mode 100644 index 6700cfe..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/find_kill_process.bat +++ /dev/null @@ -1,27 +0,0 @@ -@REM -@REM Copyright 2016 ZTE Corporation. -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM -@REM Author: Zhaoxing Meng -@REM email: meng.zhaoxing1@zte.com.cn -@REM - -echo %1 | findstr %2 | findstr %3>NUL -echo ERRORLEVEL=%ERRORLEVEL% -IF ERRORLEVEL 1 goto findend -for /f "tokens=1" %%a in (%1) do ( - echo kill %1 - taskkill /F /pid %%a -) -:findend
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.bat b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.bat deleted file mode 100644 index a67407a..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.bat +++ /dev/null @@ -1,59 +0,0 @@ -@REM -@REM Copyright 2016 ZTE Corporation. -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM -@REM Author: Zhaoxing Meng -@REM email: meng.zhaoxing1@zte.com.cn -@REM - -@echo off -title apiroute-service - -set RUNHOME=%~dp0 -echo ### RUNHOME: %RUNHOME% - -echo ### Starting apiroute-service -rem cd /d %RUNHOME% - -rem set JAVA_HOME=D:\JDK1.7\jdk\jdk\windows -set JAVA="%JAVA_HOME%\bin\java.exe" -set port=8777 - -setlocal enabledelayedexpansion -set index=1 -FOR /F "tokens=3 delims= " %%a in ('"%JAVA% -version 2>&1"')do ( - if !index! equ 1 set JAVA_VERSION=%%a - set /a index=index+1 -) -set JAVA_VERSION=%JAVA_VERSION:~1,3% -if "%JAVA_VERSION%"=="1.8" ( - set jvm_opts=-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxMetaspaceSize=64m -XX:NewRatio=2 -) else ( - set jvm_opts=-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxPermSize=64m -XX:NewRatio=2 -) - -set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n -set class_path=%RUNHOME%;%RUNHOME%apiroute-service.jar -echo ### jvm_opts: %jvm_opts% -echo ### class_path: %class_path% - -%JAVA% -classpath %class_path% %jvm_opts% org.openo.msb.ApiRouteApp server %RUNHOME%conf/apiroute.yml - -IF ERRORLEVEL 1 goto showerror -exit -:showerror -echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check! -echo After checking, press any key to close -pause -exit
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.sh b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.sh deleted file mode 100644 index 4094bb9..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 ZTE Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Zhaoxing Meng -# email: meng.zhaoxing1@zte.com.cn -# - -#JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux" - -DIRNAME=`dirname $0` -RUNHOME=`cd $DIRNAME/; pwd` -echo @RUNHOME@ $RUNHOME - -#JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA -JAVA_VERSION=`$JAVA -version 2>&1 |awk 'NR==1{ sub(/"/,""); print substr($3,1,3)}'` -echo @JAVA_VERSION@ $JAVA_VERSION -if [ $JAVA_VERSION = "1.8" ] -then - JAVA_OPTS="-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxMetaspaceSize=64m -XX:NewRatio=2" -else - JAVA_OPTS="-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxPermSize=64m -XX:NewRatio=2" -fi -port=8779 -#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n" -echo @JAVA_OPTS@ $JAVA_OPTS - -class_path="$RUNHOME/:$RUNHOME/apiroute-service.jar" -echo @class_path@ $class_path - -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.msb.ApiRouteApp server "$RUNHOME/conf/apiroute.yml" diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.bat b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.bat deleted file mode 100644 index 2782930..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.bat +++ /dev/null @@ -1,38 +0,0 @@ -@REM -@REM Copyright 2016 ZTE Corporation. -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM -@REM Author: Zhaoxing Meng -@REM email: meng.zhaoxing1@zte.com.cn -@REM - -@echo off -title stopping apiroute-service - -set HOME=%~dp0 -set APIROUTE_Main_Class="org.openo.msb.ApiRouteApp" - -echo ================== apiroute info ============================================= -echo HOME=$HOME -echo APIROUTE_Main_Class=%APIROUTE_Main_Class% -echo =============================================================================== - -echo ### Stopping apiroute-service -cd /d %HOME% - -rem set JAVA_HOME=D:\WorkSoftware\jdk1.7.0_60 -for /f "delims=" %%i in ('%JAVA_HOME%\bin\jcmd') do ( - call find_kill_process "%%i" %APIROUTE_Main_Class% %HOME% -) -exit
\ No newline at end of file diff --git a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.sh b/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.sh deleted file mode 100644 index d9b33e9..0000000 --- a/msb-core/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 ZTE Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Zhaoxing Meng -# email: meng.zhaoxing1@zte.com.cn -# - -DIRNAME=`dirname $0` -HOME=`cd $DIRNAME/; pwd` -APIROUTE_Main_Class="org.openo.msb.ApiRouteApp" - -echo ================== apiroute info ============================================= -echo HOME=$HOME -echo APIROUTE_Main_Class=$APIROUTE_Main_Class -echo =============================================================================== -cd $HOME; pwd - -echo @WORK_DIR@ $HOME - -function save_apiroute_pid(){ - apiroute_id=`ps -ef | grep $APIROUTE_Main_Class | grep $HOME | grep -v grep | awk '{print $2}'` - echo $apiroute_id -} - -function kill_apiroute_process(){ - ps -p $apiroute_id - if [ $? == 0 ]; then - kill -9 $apiroute_id - fi -} - -save_apiroute_pid; -echo @C_CMD@ kill -9 $apiroute_id -kill_apiroute_process;
\ No newline at end of file |