From 3e2bac5fcdc061cf62bd62e46bf5c2bbebc5eca0 Mon Sep 17 00:00:00 2001 From: sunqi310 Date: Mon, 29 Aug 2016 16:47:41 +0800 Subject: add catalog service start and stop scripts Change-Id: I10e37beac3fae52f5b233a56fadf27ac3bf2f01e Signed-off-by: sunqi310 --- catalog-core/distribution/catalog-all/pom.xml | 26 ++++ .../catalog-all/src/main/assembly/shutdown.bat | 27 ++++ .../catalog-all/src/main/assembly/shutdown.sh | 30 +++++ .../catalog-all/src/main/assembly/startup.bat | 28 ++++ .../catalog-all/src/main/assembly/startup.sh | 31 +++++ .../src/main/assembly/conf/catalog.yml | 4 +- .../src/main/assembly/tomcat/conf/server.xml | 144 +++++++++++++++++++++ 7 files changed, 288 insertions(+), 2 deletions(-) create mode 100644 catalog-core/distribution/catalog-all/src/main/assembly/shutdown.bat create mode 100644 catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh create mode 100644 catalog-core/distribution/catalog-all/src/main/assembly/startup.bat create mode 100644 catalog-core/distribution/catalog-all/src/main/assembly/startup.sh create mode 100644 catalog-core/httpserver/src/main/assembly/tomcat/conf/server.xml diff --git a/catalog-core/distribution/catalog-all/pom.xml b/catalog-core/distribution/catalog-all/pom.xml index 37623729..88c45c4b 100644 --- a/catalog-core/distribution/catalog-all/pom.xml +++ b/catalog-core/distribution/catalog-all/pom.xml @@ -32,6 +32,32 @@ + + maven-resources-plugin + + + copy-resources + process-resources + + copy-resources + + + target/assembly/ + + + src/main/assembly/ + false + + **/* + + + + true + + + + + org.apache.maven.plugins maven-dependency-plugin diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.bat b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.bat new file mode 100644 index 00000000..9697dbab --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.bat @@ -0,0 +1,27 @@ +@REM +@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +@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 catalog + +set RUNHOME=%~dp0 +echo ##RUNHOME %RUNHOME% + + +echo ### Starting catalog +start /D %RUNHOME%catalog stop.bat + +echo ### Starting tomcat +start /D %RUNHOME%tomcat bin\shutdown.bat diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh new file mode 100644 index 00000000..ae1999ab --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/shutdown.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +# +# 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 "### Starting catalog"; +cd catalog +./stop.sh & +cd $RUNHOME + + +echo "\n\n### Starting catalog-http server" +cd ./tomcat +./bin/shutdown.sh & +echo "### Starting catalog end..."; diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/startup.bat b/catalog-core/distribution/catalog-all/src/main/assembly/startup.bat new file mode 100644 index 00000000..6dd72c8e --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/startup.bat @@ -0,0 +1,28 @@ +@REM +@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +@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 catalog + +set RUNHOME=%~dp0 +echo ##RUNHOME %RUNHOME% + + +echo ### Starting catalog +start /D %RUNHOME%catalog run.bat + +echo ### Starting tomcat +start /D %RUNHOME%tomcat bin\startup.bat + diff --git a/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh b/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh new file mode 100644 index 00000000..212ebdea --- /dev/null +++ b/catalog-core/distribution/catalog-all/src/main/assembly/startup.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +# +# 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 "### Starting catalog"; +cd catalog +./run.sh & +cd $RUNHOME + + +echo "\n\n### Starting catalog-http server" +cd ./tomcat +./bin/startup.sh & +echo "### Starting catalog end..."; + diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml index 14deab79..1cd7d3a0 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml @@ -42,7 +42,7 @@ database: password: catalog # the JDBC URL - url: jdbc:mysql://10.74.148.157:3306/catalog + url: jdbc:mysql://127.0.0.1:3306/catalog #LDAP ldapServerIp: 127.0.0.1 ldapServerPort: 20096 @@ -63,7 +63,7 @@ server: adminContextPath: /admin connector: type: http - port: 8212 + port: 8200 # Logging settings. logging: diff --git a/catalog-core/httpserver/src/main/assembly/tomcat/conf/server.xml b/catalog-core/httpserver/src/main/assembly/tomcat/conf/server.xml new file mode 100644 index 00000000..7d12c6ce --- /dev/null +++ b/catalog-core/httpserver/src/main/assembly/tomcat/conf/server.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg