diff options
Diffstat (limited to 'esr-core/distribution/standalone/src')
9 files changed, 0 insertions, 403 deletions
diff --git a/esr-core/distribution/standalone/src/main/assembly/bin/find_kill_process.bat b/esr-core/distribution/standalone/src/main/assembly/bin/find_kill_process.bat deleted file mode 100644 index d93ab46..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/bin/find_kill_process.bat +++ /dev/null @@ -1,24 +0,0 @@ -@REM -@REM Copyright 2016-2017 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 - -echo %1 | findstr %2 >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/esr-core/distribution/standalone/src/main/assembly/bin/initDB.bat b/esr-core/distribution/standalone/src/main/assembly/bin/initDB.bat deleted file mode 100644 index dde251c..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/bin/initDB.bat +++ /dev/null @@ -1,34 +0,0 @@ -@REM -@REM Copyright 2016-2017 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 - -@echo off -set HOME=%~dp0 -set user=%1 -set password=%2 -set port=%3 -set host=%4 -echo start init esr db -echo HOME=%HOME% -set main_path=%HOME%..\ -cd /d %main_path% -mysql -u%user% -p%password% -P%port% -h%host% < dbscripts\mysql\onap-aai-esr-createobj.sql -set "err=%errorlevel%" -if "%err%"=="0" ( - echo init esr db success - ) else ( - echo failed init esr db - pause - )
\ No newline at end of file diff --git a/esr-core/distribution/standalone/src/main/assembly/bin/initDB.sh b/esr-core/distribution/standalone/src/main/assembly/bin/initDB.sh deleted file mode 100644 index 60f7be0..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/bin/initDB.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 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. -# - -DIRNAME=`dirname $0` -HOME=`cd $DIRNAME/; pwd` -user=$1 -password=$2 -port=$3 -host=$4 -echo "start init esr db" -main_path=$HOME/../ -mysql -u$user -p$password -P$port -h$host <$main_path/dbscripts/mysql/onap-aai-esr-createobj.sql -sql_result=$? -if [ $sql_result != 0 ] ; then - echo "failed to init esr database!" - exit 1 -fi -echo "init esr database success!" -exit 0 - diff --git a/esr-core/distribution/standalone/src/main/assembly/bin/run.bat b/esr-core/distribution/standalone/src/main/assembly/bin/run.bat deleted file mode 100644 index b79cbee..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/bin/run.bat +++ /dev/null @@ -1,41 +0,0 @@ -@REM -@REM Copyright 2016-2017 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 - -@echo off -title esr-service - -set RUNHOME=%~dp0 -echo ### RUNHOME: %RUNHOME% -echo ### Starting esr-service -set main_path=%RUNHOME%..\ -cd /d %main_path% -set JAVA="%JAVA_HOME%\bin\java.exe" -set port=8312 -set jvm_opts=-Xms50m -Xmx128m -rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n -set class_path=%main_path%;%main_path%esr-service.jar -echo ### jvm_opts: %jvm_opts% -echo ### class_path: %class_path% - -%JAVA% -classpath %class_path% %jvm_opts% org.onap.aai.esr.ExtsysApp server %main_path%conf/extsys.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/esr-core/distribution/standalone/src/main/assembly/bin/run.sh b/esr-core/distribution/standalone/src/main/assembly/bin/run.sh deleted file mode 100644 index d12fec5..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/bin/run.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 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. -# - -DIRNAME=`dirname $0` -RUNHOME=`cd $DIRNAME/; pwd` -echo @RUNHOME@ $RUNHOME - -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA -main_path=$RUNHOME/../ -cd $main_path -JAVA_OPTS="-Xms50m -Xmx128m" -port=8312 -#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="$main_path/:$main_path/esr-service.jar" -echo @class_path@ $class_path - -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.aai.esr.ExtsysApp server "$main_path/conf/extsys.yml" - diff --git a/esr-core/distribution/standalone/src/main/assembly/bin/stop.bat b/esr-core/distribution/standalone/src/main/assembly/bin/stop.bat deleted file mode 100644 index e024625..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/bin/stop.bat +++ /dev/null @@ -1,34 +0,0 @@ -@REM -@REM Copyright 2016-2017 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 - -@echo off -title stopping esr-service - -set HOME=%~dp0 -set Main_Class="org.onap.aai.esr.ExtsysApp" - -echo ================== esr-service info ============================================= -echo HOME=$HOME -echo Main_Class=%Main_Class% -echo =============================================================================== - -echo ### Stopping esr-service -cd /d %HOME% - -for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do ( - call find_kill_process "%%i" %Main_Class% -) -exit
\ No newline at end of file diff --git a/esr-core/distribution/standalone/src/main/assembly/bin/stop.sh b/esr-core/distribution/standalone/src/main/assembly/bin/stop.sh deleted file mode 100644 index a7aab04..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/bin/stop.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 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. -# - -DIRNAME=`dirname $0` -HOME=`cd $DIRNAME/; pwd` -Main_Class="org.onap.aai.esr.ExtsysApp" - -echo ================== esr-service info ============================================= -echo HOME=$HOME -echo Main_Class=$Main_Class -echo =============================================================================== -cd $HOME; pwd - -echo @WORK_DIR@ $HOME - -function save_service_pid(){ - service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` - echo @service_pid@ $service_pid -} - -function kill_service_process(){ - ps -p $service_pid - if [ $? == 0 ]; then - kill -9 $service_pid - fi -} - -save_service_pid; -echo @C_CMD@ kill -9 $service_pid -kill_service_process; diff --git a/esr-core/distribution/standalone/src/main/assembly/conf/extsys.yml b/esr-core/distribution/standalone/src/main/assembly/conf/extsys.yml deleted file mode 100644 index a66ccc1..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/conf/extsys.yml +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright 2016-2017 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. -# - -template: Hello, %s! - -defaultName: ${DW_DEFAULT_NAME:-Stranger} -# the micro service ip -serviceIp: -msbIp: 127.0.0.1 -msbPort: 10081 -msbServerAddr: http://127.0.0.1:80 - -# use the simple server factory if you only want to run on a single port -#server: -# type: simple -# connector: -# type: http -# port: 8080 -server: - type: simple - rootPath: '/api/aai-esr-server/v1/*' - applicationContextPath: / - adminContextPath: /admin - connector: - type: http - port: 8100 - -# 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. - org.onap.aai.esr.ExtsysApp: INFO - - appenders: - - type: console - threshold: INFO - timeZone: UTC - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" - - type: file - threshold: INFO - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" - currentLogFilename: ./works/logs/extsys.log - archivedLogFilenamePattern: ./works/logs/zip/extsys-%d{yyyy-MM-dd}.log.gz - archivedFileCount: 7 - timeZone: UTC - diff --git a/esr-core/distribution/standalone/src/main/assembly/dbscripts/mysql/onap-common-extsys-createobj.sql b/esr-core/distribution/standalone/src/main/assembly/dbscripts/mysql/onap-common-extsys-createobj.sql deleted file mode 100644 index c489c0e..0000000 --- a/esr-core/distribution/standalone/src/main/assembly/dbscripts/mysql/onap-common-extsys-createobj.sql +++ /dev/null @@ -1,91 +0,0 @@ --- --- Copyright 2016-2017 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. --- - -/******************drop old database and user***************************/ -use mysql; -drop database IF EXISTS extsys; -delete from user where User='extsys'; -FLUSH PRIVILEGES; - -/******************create new database and user***************************/ -create database extsys CHARACTER SET utf8; - -GRANT ALL PRIVILEGES ON extsys.* TO 'extsys'@'%' IDENTIFIED BY 'extsys' WITH GRANT OPTION; -GRANT ALL PRIVILEGES ON mysql.* TO 'extsys'@'%' IDENTIFIED BY 'extsys' WITH GRANT OPTION; - -GRANT ALL PRIVILEGES ON extsys.* TO 'extsys'@'localhost' IDENTIFIED BY 'extsys' WITH GRANT OPTION; -GRANT ALL PRIVILEGES ON mysql.* TO 'extsys'@'localhost' IDENTIFIED BY 'extsys' WITH GRANT OPTION; -FLUSH PRIVILEGES; - -use extsys; -set Names 'utf8'; -/******************drop old table and create new***************************/ -DROP TABLE IF EXISTS extsys_base_table; -CREATE TABLE extsys_base_table ( - ID VARCHAR(200) NOT NULL, - NAME VARCHAR(200) NULL, - TYPE VARCHAR(200) NULL, - VENDOR VARCHAR(100) NULL, - VERSION VARCHAR(100) NULL, - DESCRIPTION VARCHAR(100) NULL, - CREATETIME VARCHAR(200) NULL, - CATAGORY VARCHAR(200) NULL, - CONSTRAINT extsys_base_table PRIMARY KEY(ID) -); -DROP TABLE IF EXISTS extsys_ems_table; -CREATE TABLE extsys_ems_table ( - EMSID VARCHAR(200) NOT NULL, - URL VARCHAR(100) NULL, - PRODUCTNAME VARCHAR(100) NULL, - USERNAME VARCHAR(100) NULL, - PASSWORD VARCHAR(100) NULL, - CONSTRAINT extsys_ems_table PRIMARY KEY(EMSID) -); - -DROP TABLE IF EXISTS extsys_sdnc_table; -CREATE TABLE extsys_sdnc_table ( - SDNCONTROLLERID VARCHAR(200) NOT NULL, - URL VARCHAR(100) NULL, - USERNAME VARCHAR(100) NULL, - PASSWORD VARCHAR(100) NULL, - PRODUCTNAME VARCHAR(100) NULL, - PROTOCOL VARCHAR(100) NULL, - CONSTRAINT extsys_sdnc_table PRIMARY KEY(SDNCONTROLLERID) -); - -DROP TABLE IF EXISTS extsys_vim_table; -CREATE TABLE extsys_vim_table ( - VIMID VARCHAR(200) NOT NULL, - URL VARCHAR(100) NULL, - USERNAME VARCHAR(100) NULL, - PASSWORD VARCHAR(100) NULL, - DOMAIN VARCHAR(100) NULL, - TENANT VARCHAR(100) NULL, - CONSTRAINT extsys_vim_table PRIMARY KEY(VIMID) -); - -DROP TABLE IF EXISTS extsys_vnfm_table; -CREATE TABLE extsys_vnfm_table ( - VNFMID VARCHAR(200) NOT NULL, - URL VARCHAR(200) NULL, - USERNAME VARCHAR(100) NULL, - PASSWORD VARCHAR(100) NULL, - VIMID VARCHAR(100) NULL, - CERTIFICATEURL VARCHAR(200) NULL, - CONSTRAINT extsys_vnfm_table PRIMARY KEY(VNFMID) -); - - |