summaryrefslogtreecommitdiffstats
path: root/integration
diff options
context:
space:
mode:
authorlizi00164331 <li.zi30@zte.com.cn>2017-09-19 16:56:13 +0800
committerlizi00164331 <li.zi30@zte.com.cn>2017-09-19 16:56:13 +0800
commit5e5e988c86f20e21d85a631ac3948f4b29ff23e6 (patch)
tree5d1a6575025fa469917a293b5bf8dd575c8d7e32 /integration
parent8a2751aaa3c1367cdf70a6fa2d0b9ad39f311b0b (diff)
Add esr portal source file to tomcat.
Change-Id: Icf76b16954d68a0b7795747bb72324be0bc6b820 Issue-ID: AAI-333 Signed-off-by: lizi00164331 <li.zi30@zte.com.cn>
Diffstat (limited to 'integration')
-rw-r--r--integration/pom.xml163
-rw-r--r--integration/src/main/assembly/monitor.sh75
-rw-r--r--integration/src/main/assembly/shutdown.bat24
-rw-r--r--integration/src/main/assembly/shutdown.sh27
-rw-r--r--integration/src/main/assembly/startup.bat26
-rw-r--r--integration/src/main/assembly/startup.sh29
-rw-r--r--integration/src/main/assembly/startup4docker.sh30
7 files changed, 26 insertions, 348 deletions
diff --git a/integration/pom.xml b/integration/pom.xml
index b4cef04..868311c 100644
--- a/integration/pom.xml
+++ b/integration/pom.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+ Copyright 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
+ 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,
@@ -22,8 +22,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>aai-esr-gui-integration</artifactId>
- <packaging>pom</packaging>
+ <artifactId>integration</artifactId>
+ <packaging>war</packaging>
<name>esr-gui/integration</name>
<properties>
@@ -93,143 +93,32 @@
</dependency>
<dependency>
<groupId>org.onap.aai.esr-gui</groupId>
- <artifactId>httpserver</artifactId>
- <version>${project.version}</version>
- <type>zip</type>
- </dependency>
+ <artifactId>portal</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <type>war</type>
+ </dependency>
</dependencies>
<build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-resources-${linux64id}</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${linux64outputdir}</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/assembly/</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>**/*.bat</exclude>
- </excludes>
- </resource>
- </resources>
- <overwrite>true</overwrite>
- </configuration>
- </execution>
- <execution>
- <id>copy-resources-${win64id}</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${win64outputdir}</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/assembly/</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>**/*.sh</exclude>
- </excludes>
- </resource>
- </resources>
- <overwrite>true</overwrite>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack-httpserver-${linux64id}</id>
- <goals>
- <goal>unpack</goal>
- </goals>
- <phase>prepare-package</phase>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.onap.aai.esr-gui</groupId>
- <artifactId>httpserver</artifactId>
- <type>zip</type>
- </artifactItem>
- </artifactItems>
- <excludes>**/*.bat,*.cmd</excludes>
- <outputDirectory>${linux64outputdir}</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
- </configuration>
- </execution>
- <execution>
- <id>unpack-httpserver-${win64id}</id>
- <goals>
- <goal>unpack</goal>
- </goals>
- <phase>prepare-package</phase>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.onap.aai.esr-gui</groupId>
- <artifactId>httpserver</artifactId>
- <type>zip</type>
- </artifactItem>
- </artifactItems>
- <excludes>*.sh,*/*.sh,*/*/*.sh</excludes>
- <outputDirectory>${win64outputdir}</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
+ <finalName>esr-gui</finalName>
+ <plugins>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>distribution</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target name="distribution">
- <tar destfile="${version.output}/${packagename}-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip">
- <tarfileset dir="target/assembly/linux64" filemode="0644" dirmode="0755">
- <exclude name="**/*.sh"/>
- </tarfileset>
- <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755">
- <include name="**/*.sh"/>
- </tarfileset>
- </tar>
- <attachartifact file="${version.output}/${packagename}-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/>
- <zip destfile="${version.output}/${packagename}-${project.version}-win64.zip" update="true">
- <zipfileset dir="target/assembly/win64" includes="**"/>
- </zip>
- <attachartifact file="${version.output}/${packagename}-${project.version}-win64.zip" classifier="win64" type="zip"/>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
+ <overlays>
+ <overlay>
+ <groupId>org.onap.aai.esr-gui</groupId>
+ <artifactId>common</artifactId>
+ </overlay>
+ <overlay>
+ <groupId>org.onap.aai.esr-gui</groupId>
+ <artifactId>portal</artifactId>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
diff --git a/integration/src/main/assembly/monitor.sh b/integration/src/main/assembly/monitor.sh
deleted file mode 100644
index 9cac87a..0000000
--- a/integration/src/main/assembly/monitor.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-DIRNAME=`dirname $0`
-RUNHOME=`cd $DIRNAME/; pwd`
-LOG_DIR=${RUNHOME}/tomcat/logs
-
-RETRY=$1
-CURL_RETRY_COUNT=1
-SLEEP_SECONDS_IN_MONITOR=2
-
-if [ x"$HTTP_OVERWRITE_PORT" == x"" ]; then
- apds_port=80
-else
- apds_port=$HTTP_OVERWRITE_PORT
-fi
-
-#####################################
-echo @RUNHOME@ $RUNHOME
-echo @LOG_DIR@ $LOG_DIR
-echo @apds_port@ $apds_port
-#####################################
-
-print_log() {
- LOG_DATE=`date "+%Y-%m-%d %H:%M:%S"`
- LOG_FILENAME="$LOG_DIR/apds-monitor-`date "+%Y-%m-%d"`.log"
- ######[$$]:进程id
- ###### $n 传递给脚本或函数的参数, $1为函数名称,默认为FUNCNAME[0] $2为日志输出内容
- ###### $? 函数的返回值
- ###### FUNCNAME[@]: 函数调用栈,
- ###### {} 第一个空格后在写脚本
- { echo -e $LOG_DATE "[$$]===${FUNCNAME[@]}=== $2 "; } >> $LOG_FILENAME
-}
-
-apds_monitor() {
- print_log ${FUNCNAME[0]} "Starting health check. ==$1==";
- if [ "$1" == "with-retry" ]; then
- CURL_RETRY_COUNT=5
- fi
-
- for i in `seq $CURL_RETRY_COUNT`
- do
- success=0
- response=$(curl -m 2 -sL 127.0.0.1:$apds_port/blueprint/readme.txt -w %{http_code} -o /dev/null)
- rc=$?
- if [ $rc -eq 0 ];then
- print_log "${FUNCNAME[0]}" "Info: Curl to health check endpoint succeeded.";
- success=1
- break
- else
- print_log "${FUNCNAME[0]}" "Warn: Curl to health check endpoint failed $i time(s).";
- if [ "$1" == "with-retry" ]; then
- sleep $SLEEP_SECONDS_IN_MONITOR
- fi
- fi
- done
-
- if [ $success -eq 0 ];then
- print_log "${FUNCNAME[0]}" "Failed: health check Endpoint is unreachable.";
- return 1
- fi
-
- if [ $response -eq 200 ]; then
- print_log "${FUNCNAME[0]}" "health check succeed.";
- return 0
- fi
-
- print_log "${FUNCNAME[0]}" "Failed:health check return non 200 but is : $response ";
- return 1
-}
-
-if [ ! -d "$LOG_DIR" ]; then
- echo there is no $LOG_DIR but will be created, You can ignore this message!
- mkdir -p "$LOG_DIR"
-fi
-
-apds_monitor $RETRY
diff --git a/integration/src/main/assembly/shutdown.bat b/integration/src/main/assembly/shutdown.bat
deleted file mode 100644
index c2178a3..0000000
--- a/integration/src/main/assembly/shutdown.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-@REM
-@REM Copyright 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 catalog
-
-set RUNHOME=%~dp0
-echo ##RUNHOME %RUNHOME%
-
-echo ### shutdown blueprint
-start /D %RUNHOME%tomcat bin\shutdown.bat
diff --git a/integration/src/main/assembly/shutdown.sh b/integration/src/main/assembly/shutdown.sh
deleted file mode 100644
index d1762c7..0000000
--- a/integration/src/main/assembly/shutdown.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright 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 "### shutdown blueprint";
-cd $RUNHOME
-cd ./tomcat
-export CATALINA_HOME=$RUNHOME/tomcat
-export CATALINA_BASE=$RUNHOME/tomcat
-$RUNHOME/tomcat/bin/shutdown.sh &
-echo "### shutdown blueprint end";
diff --git a/integration/src/main/assembly/startup.bat b/integration/src/main/assembly/startup.bat
deleted file mode 100644
index 52bfe3c..0000000
--- a/integration/src/main/assembly/startup.bat
+++ /dev/null
@@ -1,26 +0,0 @@
-@REM
-@REM Copyright 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 catalog
-
-set RUNHOME=%~dp0
-echo ##RUNHOME %RUNHOME%
-
-set CATALINA_HOME=%RUNHOME%tomcat
-set CATALINA_BASE=%RUNHOME%tomcat
-echo ### Starting tomcat
-start /D %RUNHOME%tomcat bin\startup.bat
diff --git a/integration/src/main/assembly/startup.sh b/integration/src/main/assembly/startup.sh
deleted file mode 100644
index d95c99b..0000000
--- a/integration/src/main/assembly/startup.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright 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 "### Starting blueprint";
-cd ./tomcat
-if [ ! -d "$RUNHOME/tomcat/logs" ]; then
- mkdir $RUNHOME/tomcat/logs
-fi
-export CATALINA_HOME=$RUNHOME/tomcat
-export CATALINA_BASE=$RUNHOME/tomcat
-$RUNHOME/tomcat/bin/startup.sh &
-echo "### Starting blueprint end";
diff --git a/integration/src/main/assembly/startup4docker.sh b/integration/src/main/assembly/startup4docker.sh
deleted file mode 100644
index f2adb11..0000000
--- a/integration/src/main/assembly/startup4docker.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright 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.
-#
-
-#!/bin/sh
-DIRNAME=`dirname $0`
-RUNHOME=`cd $DIRNAME/; pwd`
-echo @RUNHOME@ $RUNHOME
-echo "### Starting blueprint";
-#cd ./tomcat
-cd $RUNHOME/tomcat
-if [ ! -d "$RUNHOME/tomcat/logs" ]; then
- mkdir $RUNHOME/tomcat/logs
-fi
-export CATALINA_HOME=$RUNHOME/tomcat
-export CATALINA_BASE=$RUNHOME/tomcat
-$RUNHOME/tomcat/bin/catalina.sh run
-echo "### Starting blueprint end";