Setup and Publish Backend Service. 51/31551/1
authorYuanHu <yuan.hu1@zte.com.cn>
Tue, 13 Feb 2018 03:22:10 +0000 (11:22 +0800)
committerYuanHu <yuan.hu1@zte.com.cn>
Tue, 13 Feb 2018 03:22:10 +0000 (11:22 +0800)
Setup backend service with dropwizard application framework.
Integrate backend with frontend to one micro-service.

Issue-ID: SDC-408

Change-Id: Ia6949302ee7c7ad6a4ce31e263f6a38183adfee3
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
12 files changed:
distribution/pom.xml
distribution/src/main/assembly/bin/find_kill_process.bat [new file with mode: 0644]
distribution/src/main/assembly/bin/run.bat [new file with mode: 0644]
distribution/src/main/assembly/bin/stop.bat [new file with mode: 0644]
distribution/src/main/assembly/bin/stop.sh [new file with mode: 0644]
distribution/src/main/assembly/conf/workflow-designer.yml [new file with mode: 0644]
distribution/src/main/assembly/shutdown.bat [deleted file]
distribution/src/main/assembly/shutdown.sh [deleted file]
distribution/src/main/assembly/startup.bat [deleted file]
distribution/src/main/assembly/startup.sh [deleted file]
distribution/src/main/docker/Dockerfile [moved from distribution/src/main/assembly/Dockerfile with 94% similarity]
pom.xml

index cf85df2..6b15fd2 100644 (file)
@@ -16,7 +16,7 @@
     <parent>
         <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
         <artifactId>sdc-workflow-designer</artifactId>
-        <version>1.0.0</version>
+        <version>1.1.0-SNAPSHOT</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <packaging>pom</packaging>
       
     <properties>
-        <packagename>sdc-workflow-designer</packagename>
+        <project.package>sdc-workflow-designer</project.package>
+        <project.jar>sdc-workflow-designer.jar</project.jar>
+        <src.assembly>src/main/assembly</src.assembly>
+        <src.docker>src/main/docker</src.docker>
         <linux64id>linux64</linux64id>
         <win64id>win64</win64id>
-        <linux64outputdir>target/assembly/${linux64id}</linux64outputdir>
-        <win64outputdir>target/assembly/${win64id}</win64outputdir>
+        <linux64outputdir>target/assembly/linux64</linux64outputdir>
+        <win64outputdir>target/assembly/win64</win64outputdir>
         <version.output>target/version</version.output>
+        <target.dir>target</target.dir>
     </properties>
     
- <build>
-       <plugins>
-                       <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
+    <build>
+        <plugins>
+            <!-- assembly ui and backend to one jar -->
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.onap.sdc.workflowdesigner.WorkflowDesignerApp</mainClass>
+                        </manifest>
+                    </archive>
+                    <descriptorRefs>
+                        <descriptorRef>jar-with-dependencies</descriptorRef>
+                    </descriptorRefs>
+                </configuration>
                 <executions>
                     <execution>
-                        <id>unpack-tomcat-to-temporary-dir</id>
-                        <phase>generate-resources</phase>
+                        <id>assembly-ui-and-backend</id>
+                        <phase>process-sources</phase>
                         <goals>
-                            <goal>unpack</goal>
+                            <goal>single</goal>
                         </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.tomcat</groupId>
-                                    <artifactId>tomcat</artifactId>
-                                    <type>zip</type>
-                                    <outputDirectory>target/tomcat</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>
+            
+            <!-- copy assembly and jar to assembly -->
             <plugin>
                 <artifactId>maven-resources-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>copy-resources-${linux64id}</id>
+                        <id>copy-assembly-and-jar-${linux64id}</id>
                         <phase>process-resources</phase>
                         <goals>
                             <goal>copy-resources</goal>
                         </goals>
                         <configuration>
                             <outputDirectory>${linux64outputdir}</outputDirectory>
+                            <overwrite>true</overwrite>
                             <resources>
                                 <resource>
-                                    <directory>src/main/assembly/</directory>
+                                    <directory>${src.assembly}</directory>
                                     <filtering>false</filtering>
                                     <includes>
                                         <include>**/*</include>
                                         <exclude>**/*.bat</exclude>
                                     </excludes>
                                 </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
-                        </configuration>
-                    </execution>
-                                       
-                                       <execution>
-                        <id>copy-tomcat-resources-${linux64id}</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${linux64outputdir}/tomcat</outputDirectory>
-                            <resources>
                                 <resource>
-                                    <directory>${basedir}/target/tomcat/apache-tomcat-${tomcat.version}</directory>
-                                    <includes>
-                                        <include>**/*</include>
-                                    </includes>
-                                                                       <excludes>
-                                        <exclude>**/*.bat</exclude>
-                                    </excludes>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
-                    
-                    <execution>
-                        <id>copy-workflow-designer-resources-${linux64id}</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${linux64outputdir}/tomcat/webapps/ROOT</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>${basedir}/../sdc-workflow-designer-ui/dist</directory>
+                                    <directory>${target.dir}</directory>
+                                    <filtering>false</filtering>
                                     <includes>
-                                        <include>**/*</include>
+                                        <include>*.jar</include>
                                     </includes>
                                 </resource>
                             </resources>
-                            <overwrite>true</overwrite>
                         </configuration>
                     </execution>
-                    
+                </executions>
+            </plugin>
+            
+            <!-- copy assembly and jar to assembly -->
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
                     <execution>
-                        <id>copy-resources-${win64id}</id>
+                        <id>copy-assembly-and-jar-${win64id}</id>
                         <phase>process-resources</phase>
                         <goals>
                             <goal>copy-resources</goal>
                         </goals>
                         <configuration>
                             <outputDirectory>${win64outputdir}</outputDirectory>
+                            <overwrite>true</overwrite>
                             <resources>
                                 <resource>
-                                    <directory>src/main/assembly/</directory>
+                                    <directory>${src.assembly}</directory>
                                     <filtering>false</filtering>
                                     <includes>
                                         <include>**/*</include>
                                         <exclude>**/*.sh</exclude>
                                     </excludes>
                                 </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
-                        </configuration>
-                    </execution>
-
-                                       <execution>
-                        <id>copy-tomcat-resources-${win64id}</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${win64outputdir}/tomcat</outputDirectory>
-                            <resources>
                                 <resource>
-                                    <directory>${basedir}/target/tomcat/apache-tomcat-${tomcat.version}</directory>
+                                    <directory>${target.dir}</directory>
+                                    <filtering>false</filtering>
                                     <includes>
-                                        <include>**/*</include>
+                                        <include>*.jar</include>
                                     </includes>
-                                                                       <excludes>
-                                        <exclude>**/*.sh</exclude>
-                                    </excludes>
                                 </resource>
                             </resources>
                         </configuration>
                     </execution>
-                    
+                </executions>
+            </plugin>
+            
+            <!-- rename jar name -->
+            <plugin>
+                <groupId>com.coderplus.maven.plugins</groupId>
+                <artifactId>copy-rename-maven-plugin</artifactId>
+                <executions>
                     <execution>
-                        <id>copy-workflow-designer-resources-${win64id}</id>
+                        <id>rename-jar-name-${linux64id}</id>
                         <phase>process-resources</phase>
                         <goals>
-                            <goal>copy-resources</goal>
+                            <goal>rename</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${win64outputdir}/tomcat/webapps/ROOT</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>${basedir}/../sdc-workflow-designer-ui/dist</directory>
-                                    <includes>
-                                        <include>**/*</include>
-                                    </includes>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
+                            <sourceFile>${linux64outputdir}/${project.name}-${project.version}-jar-with-dependencies.jar</sourceFile>
+                            <destinationFile>${linux64outputdir}/${project.jar}</destinationFile>
                         </configuration>
                     </execution>
-                    
-                                       <execution>
-                        <id>copy-dockerfile</id>
+                    <execution>
+                        <id>rename-jar-name-${win64id}</id>
                         <phase>process-resources</phase>
                         <goals>
-                            <goal>copy-resources</goal>
+                            <goal>rename</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${version.output}</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>src/main/assembly/</directory>
-                                    <filtering>false</filtering>
-                                    <includes>
-                                        <include>Dockerfile</include>
-                                    </includes>
-                                </resource>
-                            </resources>
-                            <overwrite>true</overwrite>
+                            <sourceFile>${win64outputdir}/${project.name}-${project.version}-jar-with-dependencies.jar</sourceFile>
+                            <destinationFile>${win64outputdir}/${project.jar}</destinationFile>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
-                       
+      
+            <!-- version package -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                         </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">
+                                <tar destfile="${version.output}/${project.package}-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip">
+                                    <tarfileset dir="${linux64outputdir}" filemode="0644" dirmode="0755">
                                         <exclude name="**/*.sh"/>
                                     </tarfileset>
-                                    <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755">
+                                    <tarfileset dir="${linux64outputdir}" 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="**"/>
+                                <attachartifact file="${version.output}/${project.package}-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/>
+                                <zip destfile="${version.output}/${project.package}-${project.version}-win64.zip" update="true">
+                                    <zipfileset dir="${win64outputdir}" includes="**"/>
                                 </zip>
-                                <attachartifact file="${version.output}/${packagename}-${project.version}-win64.zip" classifier="win64" type="zip"/>
+                                <attachartifact file="${version.output}/${project.package}-${project.version}-win64.zip" classifier="win64" type="zip"/>
                             </target>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
+            
+            <!-- Copy dockerfile to version -->
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dockerfile</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${version.output}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>${src.docker}</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
+                                        <include>Dockerfile</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                            <overwrite>true</overwrite>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
-       
-       <profiles>
+    
+    <profiles>
         <profile>
             <id>docker</id>
             <build>
             </build>
         </profile>
     </profiles>
-       
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
+            <artifactId>sdc-workflow-designer-server</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
+            <artifactId>sdc-workflow-designer-ui</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+    
 </project>
diff --git a/distribution/src/main/assembly/bin/find_kill_process.bat b/distribution/src/main/assembly/bin/find_kill_process.bat
new file mode 100644 (file)
index 0000000..6e08993
--- /dev/null
@@ -0,0 +1,20 @@
+@REM\r
+@REM Copyright (c) 2017 ZTE Corporation.\r
+@REM All rights reserved. This program and the accompanying materials\r
+@REM are made available under the terms of the Eclipse Public License v1.0\r
+@REM and the Apache License 2.0 which both accompany this distribution,\r
+@REM and are available at http://www.eclipse.org/legal/epl-v10.html\r
+@REM and http://www.apache.org/licenses/LICENSE-2.0\r
+@REM\r
+@REM Contributors:\r
+@REM     ZTE - initial API and implementation and/or initial documentation\r
+@REM\r
+\r
+echo %1 | findstr %2 >NUL\r
+echo ERRORLEVEL=%ERRORLEVEL%\r
+IF ERRORLEVEL 1 goto findend\r
+for /f "tokens=1" %%a in (%1) do (  \r
+    echo kill %1\r
+    taskkill /F /pid %%a\r
+)\r
+:findend
\ No newline at end of file
diff --git a/distribution/src/main/assembly/bin/run.bat b/distribution/src/main/assembly/bin/run.bat
new file mode 100644 (file)
index 0000000..9ef9647
--- /dev/null
@@ -0,0 +1,37 @@
+@REM\r
+@REM Copyright (c) 2017 ZTE Corporation.\r
+@REM All rights reserved. This program and the accompanying materials\r
+@REM are made available under the terms of the Eclipse Public License v1.0\r
+@REM and the Apache License 2.0 which both accompany this distribution,\r
+@REM and are available at http://www.eclipse.org/legal/epl-v10.html\r
+@REM and http://www.apache.org/licenses/LICENSE-2.0\r
+@REM\r
+@REM Contributors:\r
+@REM     ZTE - initial API and implementation and/or initial documentation\r
+@REM\r
+\r
+@echo off\r
+title sdc-workflow-designer\r
+\r
+set RUNHOME=%~dp0\r
+echo ### RUNHOME: %RUNHOME%\r
+echo ### Starting sdc-workflow-designer\r
+set main_path=%RUNHOME%..\\r
+cd /d %main_path%\r
+set JAVA="%JAVA_HOME%\bin\java.exe"\r
+set port=12345\r
+set jvm_opts=-Xms50m -Xmx128m\r
+rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=y\r
+set class_path=%main_path%;%main_path%sdc-workflow-designer.jar\r
+echo ### jvm_opts: %jvm_opts%\r
+echo ### class_path: %class_path%\r
+\r
+%JAVA% -classpath %class_path% %jvm_opts% org.onap.sdc.workflowdesigner.WorkflowDesignerApp server %main_path%conf/workflow-designer.yml\r
+\r
+IF ERRORLEVEL 1 goto showerror\r
+exit\r
+:showerror\r
+echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!\r
+echo After checking, press any key to close \r
+pause\r
+exit
\ No newline at end of file
diff --git a/distribution/src/main/assembly/bin/stop.bat b/distribution/src/main/assembly/bin/stop.bat
new file mode 100644 (file)
index 0000000..4407a44
--- /dev/null
@@ -0,0 +1,30 @@
+@REM\r
+@REM Copyright (c) 2017 ZTE Corporation.\r
+@REM All rights reserved. This program and the accompanying materials\r
+@REM are made available under the terms of the Eclipse Public License v1.0\r
+@REM and the Apache License 2.0 which both accompany this distribution,\r
+@REM and are available at http://www.eclipse.org/legal/epl-v10.html\r
+@REM and http://www.apache.org/licenses/LICENSE-2.0\r
+@REM\r
+@REM Contributors:\r
+@REM     ZTE - initial API and implementation and/or initial documentation\r
+@REM\r
+\r
+@echo off\r
+title stopping sdc-workflow-designer\r
+\r
+set HOME=%~dp0\r
+set Main_Class="org.onap.sdc.workflowdesigner.WorkflowDesignerApp"\r
+\r
+echo ================== sdc-workflow-designer info =============================================\r
+echo HOME=$HOME\r
+echo Main_Class=%Main_Class%\r
+echo ===============================================================================\r
+\r
+echo ### Stopping sdc-workflow-designer\r
+cd /d %HOME%\r
+\r
+for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do (\r
+  call find_kill_process "%%i" %Main_Class%\r
+)\r
+exit
\ No newline at end of file
diff --git a/distribution/src/main/assembly/bin/stop.sh b/distribution/src/main/assembly/bin/stop.sh
new file mode 100644 (file)
index 0000000..3fe6d60
--- /dev/null
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2017 ZTE Corporation.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# and the Apache License 2.0 which both accompany this distribution,
+# and are available at http://www.eclipse.org/legal/epl-v10.html
+# and http://www.apache.org/licenses/LICENSE-2.0
+#
+# Contributors:
+#     ZTE - initial API and implementation and/or initial documentation
+#
+
+DIRNAME=`dirname $0`
+HOME=`cd $DIRNAME/; pwd`
+Main_Class="org.onap.sdc.workflowdesigner.WorkflowDesignerApp"
+
+echo ================== sdc-workflow-designer 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;
\ No newline at end of file
diff --git a/distribution/src/main/assembly/conf/workflow-designer.yml b/distribution/src/main/assembly/conf/workflow-designer.yml
new file mode 100644 (file)
index 0000000..86f9687
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2017 ZTE Corporation.
+# All rights reserved. This program and the accompanying materials
+# are made available under the Apache License, Version 2.0
+# and the Eclipse Public License v1.0 which both accompany this distribution,
+# and are available at http://www.eclipse.org/legal/epl-v10.html
+# and http://www.apache.org/licenses/LICENSE-2.0
+#
+# Contributors:
+#     ZTE - initial API and implementation and/or initial documentation
+#
+
+template: Hello, %s!
+
+defaultName: ${DW_DEFAULT_NAME:-Stranger}
+
+# use the simple server factory if you only want to run on a single port
+server:
+  type: simple
+  rootPath: '/api/workflow-modeler/v1/*'
+  applicationContextPath: /
+  adminContextPath: /admin
+  connector:
+    type: http
+    port: 8080
+
+# 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.sdc.workflowdesigner.WorkflowDesignerApp: 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/wfd.log
+      archivedLogFilenamePattern: ./works/logs/zip/wfd-%d{yyyy-MM-dd}.log.gz
+      archivedFileCount: 7
+      timeZone: UTC
diff --git a/distribution/src/main/assembly/shutdown.bat b/distribution/src/main/assembly/shutdown.bat
deleted file mode 100644 (file)
index c2178a3..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-@REM\r
-@REM Copyright 2017 ZTE Corporation.\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM     http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-\r
-@echo off\r
-title catalog\r
-\r
-set RUNHOME=%~dp0\r
-echo ##RUNHOME %RUNHOME%\r
-\r
-echo ### shutdown blueprint\r
-start /D %RUNHOME%tomcat bin\shutdown.bat \r
diff --git a/distribution/src/main/assembly/shutdown.sh b/distribution/src/main/assembly/shutdown.sh
deleted file mode 100644 (file)
index d1762c7..0000000
+++ /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/distribution/src/main/assembly/startup.bat b/distribution/src/main/assembly/startup.bat
deleted file mode 100644 (file)
index 52bfe3c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-@REM\r
-@REM Copyright 2017 ZTE Corporation.\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM     http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-\r
-@echo off\r
-title catalog\r
-\r
-set RUNHOME=%~dp0\r
-echo ##RUNHOME %RUNHOME%\r
-\r
-set CATALINA_HOME=%RUNHOME%tomcat\r
-set CATALINA_BASE=%RUNHOME%tomcat\r
-echo ### Starting tomcat\r
-start /D %RUNHOME%tomcat bin\startup.bat \r
diff --git a/distribution/src/main/assembly/startup.sh b/distribution/src/main/assembly/startup.sh
deleted file mode 100644 (file)
index 503b102..0000000
+++ /dev/null
@@ -1,28 +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 workflow designer";
-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/catalina.sh run
similarity index 94%
rename from distribution/src/main/assembly/Dockerfile
rename to distribution/src/main/docker/Dockerfile
index eaf0da2..b1ac0e5 100644 (file)
@@ -22,5 +22,5 @@ WORKDIR /home/sdc-workflow-designer
 ADD sdc-workflow-designer-*-linux64.tar.gz /home/sdc-workflow-designer/
 RUN chmod 755 /home/sdc-workflow-designer/*.sh
 
-ENTRYPOINT /home/sdc-workflow-designer/startup.sh
+ENTRYPOINT /home/sdc-workflow-designer/bin/run.sh
 
diff --git a/pom.xml b/pom.xml
index 4dcbaf6..99fa6c4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 
     <modules>
         <module>sdc-workflow-designer-ui</module>
-               <!--<module>sdc-workflow-designer-server</module>-->
+        <module>sdc-workflow-designer-server</module>
         <module>distribution</module>
     </modules>
     
     <properties>
-        <tomcat.version>8.5.6</tomcat.version>
         <onap.nexus.javadocs-url>dav:https://nexus.onap.org/content/sites/site/org/onap/sdc/sdc-workflow-designer/${project.version}</onap.nexus.javadocs-url>
     </properties>
+    
     <distributionManagement>
       <site>
         <id>ecomp-site</id>
       </site>
     </distributionManagement>
     
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.apache.tomcat</groupId>
-                <artifactId>tomcat</artifactId>
-                <version>${tomcat.version}</version>
-                <type>zip</type>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-    
     <build>
         <pluginManagement>
             <plugins>