This is an automated email from the ASF dual-hosted git repository.

imesha pushed a commit to branch development
in repository https://gitbox.apache.org/repos/asf/oodt.git


The following commit(s) were added to refs/heads/development by this push:
     new 5f4a15a  Add assembly to deployment project
5f4a15a is described below

commit 5f4a15a35cbe40c7cee6296410a7425199c76976
Author: Imesha Sudasingha <[email protected]>
AuthorDate: Sat Aug 7 21:36:23 2021 +0530

    Add assembly to deployment project
---
 deployment/assembly.xml                         | 58 +++++++++++++++++++++
 deployment/build.sh                             | 19 -------
 deployment/docker-compose.yml                   |  7 ++-
 deployment/pom.xml                              | 67 +++++++++++++++++++++++++
 filemgr/Dockerfile                              |  2 +-
 filemgr/pom.xml                                 |  1 +
 workflow/Dockerfile                             |  2 +-
 workflow/pom.xml                                |  1 +
 workflow/src/main/resources/workflow.properties |  2 +-
 9 files changed, 135 insertions(+), 24 deletions(-)

diff --git a/deployment/assembly.xml b/deployment/assembly.xml
new file mode 100644
index 0000000..b1c1025
--- /dev/null
+++ b/deployment/assembly.xml
@@ -0,0 +1,58 @@
+<!-- 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+-->
+
+<assembly>
+    <id>docker-compose</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <baseDirectory>oodt-docker-compose</baseDirectory>
+    <files>
+        <file>
+            <source>docker-compose.yml</source>
+            <filtered>true</filtered>
+        </file>
+    </files>
+
+    <fileSets>
+        <fileSet>
+            <outputDirectory>/filemgr/data</outputDirectory>
+            <excludes>
+                <exclude>**/*</exclude>
+            </excludes>
+        </fileSet>
+        <fileSet>
+            
<directory>${project.build.directory}/docker-compose/cas-filemgr-${project.version}</directory>
+            <outputDirectory>/filemgr</outputDirectory>
+            <includes>
+                <include>**</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            
<directory>${project.build.directory}/docker-compose/cas-workflow-${project.version}</directory>
+            <outputDirectory>/workflowmgr</outputDirectory>
+            <includes>
+                <include>**</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+
+</assembly>
diff --git a/deployment/build.sh b/deployment/build.sh
deleted file mode 100755
index 00fe1f2..0000000
--- a/deployment/build.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-ROOT_DIR="$(cd ..; pwd)"
-
-# Build File Manager
-cd ${ROOT_DIR}/filemgr
-mvn clean install -nsu -DskipTests
-docker build . -t oodt/filemgr
-
-# Build Tomcat
-cd ${ROOT_DIR}
-mvn clean install -nsu -DskipTests -pl webapp/fmprod
-cd ${ROOT_DIR}/webapp
-docker build . -t oodt/tomcat
-
-# Build OPSUI
-cd ${ROOT_DIR}/react-components/oodt_opsui_sample_app
-docker build . -t oodt/opsui
-
-cd ${ROOT_DIR}/deployment
-echo "Done!"
\ No newline at end of file
diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml
index 5e56a34..a60a79a 100644
--- a/deployment/docker-compose.yml
+++ b/deployment/docker-compose.yml
@@ -12,7 +12,8 @@ services:
       - SOLR_URL=http://solr:8983
       - DEBUG=5005
     volumes:
-      - filemgr-data:/filemgr/data
+      - ./filemgr/data:/filemgr/data
+      - ./filemgr/policy:/filemgr/policy
 
   workflowmgr:
     image: oodt/workflowmgr:latest
@@ -21,6 +22,8 @@ services:
       - 9001:9001
     environment:
       - SOLR_URL=http://solr:8983
+    volumes:
+      - ./workflowmgr/policy:/workflowmgr/policy
 
   opsui:
     image: oodt/opsui:latest
@@ -38,7 +41,7 @@ services:
       WORKFLOW_URL: http://workflowmgr:9001
       FILEMGR_WORKINGDIR: /tmp
     volumes:
-      - filemgr-data:/filemgr/data
+      - ./filemgr/data:/filemgr/data
 
 volumes:
   filemgr-data:
\ No newline at end of file
diff --git a/deployment/pom.xml b/deployment/pom.xml
index da871df..ac0ee8c 100644
--- a/deployment/pom.xml
+++ b/deployment/pom.xml
@@ -33,6 +33,14 @@
         <dependency>
             <groupId>org.apache.oodt</groupId>
             <artifactId>cas-filemgr</artifactId>
+            <version>${project.version}</version>
+            <type>zip</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.oodt</groupId>
+            <artifactId>cas-workflow</artifactId>
+            <version>${project.version}</version>
+            <type>zip</type>
         </dependency>
         <dependency>
             <groupId>org.apache.oodt</groupId>
@@ -50,4 +58,63 @@
             <type>pom</type>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>3.2.0</version>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.oodt</groupId>
+                                    <artifactId>cas-filemgr</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>zip</type>
+                                    <overWrite>false</overWrite>
+                                    
<outputDirectory>${project.build.directory}/docker-compose</outputDirectory>
+                                    <includes>*/policy/**</includes>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.oodt</groupId>
+                                    <artifactId>cas-workflow</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>zip</type>
+                                    <overWrite>false</overWrite>
+                                    
<outputDirectory>${project.build.directory}/docker-compose</outputDirectory>
+                                    <includes>*/policy/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <descriptors>
+                        <descriptor>assembly.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>install</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file
diff --git a/filemgr/Dockerfile b/filemgr/Dockerfile
index 670a1d6..033c749 100644
--- a/filemgr/Dockerfile
+++ b/filemgr/Dockerfile
@@ -1,6 +1,6 @@
 FROM openjdk:8-jre-alpine
 
-ADD target/cas-filemgr-1.9-SNAPSHOT-dist.tar.gz /
+ADD target/cas-filemgr-1.9-SNAPSHOT.tar.gz /
 RUN mv cas-filemgr-1.9-SNAPSHOT /filemgr
 
 WORKDIR /filemgr/bin
diff --git a/filemgr/pom.xml b/filemgr/pom.xml
index 7725882..5bd24a5 100644
--- a/filemgr/pom.xml
+++ b/filemgr/pom.xml
@@ -336,6 +336,7 @@
         <artifactId>maven-assembly-plugin</artifactId>
         <version>2.6</version>
         <configuration>
+          <appendAssemblyId>false</appendAssemblyId>
           <descriptors>
             <descriptor>src/main/assembly/assembly.xml</descriptor>
           </descriptors>
diff --git a/workflow/Dockerfile b/workflow/Dockerfile
index 1caf290..44fdb4f 100644
--- a/workflow/Dockerfile
+++ b/workflow/Dockerfile
@@ -1,6 +1,6 @@
 FROM openjdk:8-jre-alpine
 
-ADD target/cas-workflow-1.9-SNAPSHOT-dist.tar.gz /
+ADD target/cas-workflow-1.9-SNAPSHOT.tar.gz /
 RUN mv cas-workflow-1.9-SNAPSHOT /workflowmgr
 
 WORKDIR /workflowmgr/bin
diff --git a/workflow/pom.xml b/workflow/pom.xml
index 42fd7a2..6d5c798 100644
--- a/workflow/pom.xml
+++ b/workflow/pom.xml
@@ -263,6 +263,7 @@ the License.
         <artifactId>maven-assembly-plugin</artifactId>
         <version>2.6</version>
         <configuration>
+          <appendAssemblyId>false</appendAssemblyId>
           <descriptors>
             <descriptor>src/main/assembly/assembly.xml</descriptor>
           </descriptors>
diff --git a/workflow/src/main/resources/workflow.properties 
b/workflow/src/main/resources/workflow.properties
index 582ff1a..4002f00 100644
--- a/workflow/src/main/resources/workflow.properties
+++ b/workflow/src/main/resources/workflow.properties
@@ -88,4 +88,4 @@ 
org.apache.oodt.cas.cli.action.spring.config=file://[CAS_WORKFLOW_HOME]/policy/c
 
org.apache.oodt.cas.cli.option.spring.config=file://[CAS_WORKFLOW_HOME]/policy/cmd-line-options.xml
 
 # workflow lifecycle Manager
-org.apache.oodt.cas.workflow.lifecycle.filePath=/path/to/workflow-lifecycle.xml
+org.apache.oodt.cas.workflow.lifecycle.filePath=[CAS_WORKFLOW_HOME]/policy/workflow-lifecycle.xml

Reply via email to