Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into wg-update-web-modeler
Browse files Browse the repository at this point in the history
wcgunter committed Feb 16, 2024
2 parents 1cab3bf + b88ba96 commit 2f310e0
Showing 24 changed files with 99 additions and 55 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/camunda.yml
Original file line number Diff line number Diff line change
@@ -33,10 +33,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: maven

@@ -163,10 +163,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: maven

4 changes: 2 additions & 2 deletions .github/workflows/ldap.yml
Original file line number Diff line number Diff line change
@@ -33,10 +33,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: maven

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,12 @@ See the [wiki](https://github.com/NASA-AMMOS/common-workflow-service/wiki) for m

## Prerequisites

- [**Java 17 JDK**](https://formulae.brew.sh/formula/openjdk@17): CWS only runs on JDK 17. (NOTE: Cannot use JRE)
- For Homebrew users:
- Install OpenJDK 17 using: `brew install openjdk@17`
- Check the exact version installed using `/usr/libexec/java_home -V`
- Add to your Shell startup (e.g. .zprofile): `export JAVA_HOME=$(/usr/libexec/java_home -v X.X.X)`
- Replace the X.X.X version above with the OpenJDK 17 output from the `/usr/libexec/java_home -V` command.
- [**Maven**](https://maven.apache.org/download.cgi): Used to dynamically download libraries and other required project dependencies.
- For Home-brew users:
- Install Maven using: `brew install maven`
@@ -39,15 +45,9 @@ See the [wiki](https://github.com/NASA-AMMOS/common-workflow-service/wiki) for m
- You will need to add your own truststore file to this path: `install/tomcat_lib/cws_truststore.jks`
- See: https://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html
- **Store Your Keystore Password**: You will need to add your own creds file, which carries the keystore password, to this path: `~/.cws/creds`
- Set the permissions for the **~/.cws/** directory and **creds** file as Owner-Only.
- **~/.cws/** directory: `chmod 700 ~/.cws/`
- **~/.cws/creds** file: `chmod 600 ~/.cws/creds`
- **Java 11 JDK**: CWS only runs on JDK 11 now, but planning for JDK 17 soon.
- For Homebrew users:
- Install OpenJDK 11 using: `brew install openjdk@11`
- Check the exact version installed using `/usr/libexec/java_home -V`
- Add to your Shell startup (e.g. .zprofile): `export JAVA_HOME=$(/usr/libexec/java_home -v X.X.X)`
- Replace the X.X.X version above with the OpenJDK 11 output from the `/usr/libexec/java_home -V` command.
- Set the permissions for the **~/.cws/** directory and **creds** file as Owner-Only.
- **~/.cws/** directory: `chmod 700 ~/.cws/`
- **~/.cws/creds** file: `chmod 600 ~/.cws/creds`


### **Development Environment Configuration**
2 changes: 1 addition & 1 deletion cws-adaptation-engine/pom.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-adaptation-engine</artifactId>

2 changes: 1 addition & 1 deletion cws-adaptation/pom.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-adaptation</artifactId>

2 changes: 1 addition & 1 deletion cws-core/pom.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-core</artifactId>

15 changes: 14 additions & 1 deletion cws-engine-service/pom.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-engine-service</artifactId>

@@ -123,6 +123,19 @@
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>23.0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>23.0.2</version>
<scope>runtime</scope>
</dependency>

<!-- IS THIS NEEDED?? -->
<dependency>
<groupId>org.apache.tomcat</groupId>
Original file line number Diff line number Diff line change
@@ -902,7 +902,8 @@ public boolean syncCounters(String reason) {
public void setJobExecutorMaxPoolSize(Integer executorServiceMaxPoolSize, boolean doDbUpdate) {
if (executorServiceMaxPoolSize != null) {
try {

// we are getting errors if we go beyond 10?
executorServiceMaxPoolSize = Math.min(10, executorServiceMaxPoolSize);
// Log information about JMX remote interface
if (System.getProperty("com.sun.management.jmxremote") == null) {
log.warn("JMX remote appears to be disabled");
14 changes: 13 additions & 1 deletion cws-engine/pom.xml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-engine</artifactId>

@@ -24,6 +24,18 @@
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>cws-adaptation-engine</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>23.0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>23.0.2</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
</profiles>
2 changes: 1 addition & 1 deletion cws-installer/pom.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-installer</artifactId>

7 changes: 3 additions & 4 deletions cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java
Original file line number Diff line number Diff line change
@@ -2504,9 +2504,6 @@ private static int validateKeystoreTruststore() {
print(" Days Until expiration: " + numDays + " days");
print("");
return 0;
} else {
print(" [OK]");
print("");
}
}
} catch (Exception e) {
@@ -2517,7 +2514,9 @@ private static int validateKeystoreTruststore() {
log.error("Keystore Storepass ERROR: " + e.getMessage());
return 1;
}
return 0; // OK
print(" [OK]");
print("");
return 0; // no warnings
}

/**
2 changes: 1 addition & 1 deletion cws-service/pom.xml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-service</artifactId>

8 changes: 3 additions & 5 deletions cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java
Original file line number Diff line number Diff line change
@@ -3,9 +3,7 @@
import static jpl.cws.core.db.SchedulerDbService.FAILED_TO_SCHEDULE;
import static jpl.cws.core.db.SchedulerDbService.PENDING;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.*;
import java.net.URLDecoder;
import java.sql.Timestamp;
import java.util.HashMap;
@@ -129,8 +127,8 @@ public SchedulerJob scheduleProcess(String procDefKey,
String procBusinessKey, String initiationKey,
int priority) throws Exception {

log.trace("Scheduling process definition '" + procDefKey + "' ...");
log.trace(" with variables=" + processVariables);
log.info("Scheduling process definition '" + procDefKey + "' ...");
log.info(" with variables=" + processVariables);

String schedulerJobUuid = null;
boolean rowCreated = false;
2 changes: 1 addition & 1 deletion cws-tasks/pom.xml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-tasks</artifactId>

2 changes: 1 addition & 1 deletion cws-test/pom.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>
<artifactId>cws-test</artifactId>

10 changes: 5 additions & 5 deletions cws-test/src/test/resources/configure_with_jacoco.sh
Original file line number Diff line number Diff line change
@@ -48,13 +48,13 @@ else
exit 1
fi

if [[ "$java_version" > "11" && "$java_version" < "12" ]]; then
echo " Java version == 11x [OK]"
if [[ "$java_version" > "17" && "$java_version" < "18" ]]; then
echo " Java version == 17x [OK]"
else
echo " +-------+----------------------------------------------------"
echo " | ERROR | "
echo " +-------+ "
echo " | Java version is less than 11. Must run with Java 11x "
echo " | Java version is not 17. Must run with Java 17x "
echo " | Aborting program... "
echo "--------------------------------------------------------------"
exit 1
@@ -264,7 +264,7 @@ rm -f ${ROOT}/config/my.cnf
sleep 1

if [ "$RECONFIGURE" = true ]; then
${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.2-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller --reconfigure
${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.7-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller --reconfigure
else
${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.2-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller
${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.7-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller
fi
2 changes: 1 addition & 1 deletion cws-ui/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version><!-- update this each CWS release -->
<version>2.6.0-pre.1</version><!-- update this each CWS release -->
</parent>

<artifactId>cws-ui</artifactId>
4 changes: 3 additions & 1 deletion cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml
Original file line number Diff line number Diff line change
@@ -15,7 +15,9 @@

<context:property-placeholder location="classpath:cws-ui.properties"/>

<mvc:annotation-driven />
<mvc:annotation-driven>
<mvc:path-matching suffix-pattern="true" />
</mvc:annotation-driven>

<!-- <bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
Binary file modified install/cws_camunda-bpm-tomcat-7.20.0.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions install/docker/console-db-es-ls-kibana/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ services:
labels:
com.example.service: "cws-server"
com.example.description: "Common Workflow Service"
image: nasa-ammos/common-workflow-service:2.5.0 # update this each CWS release
image: nasa-ammos/common-workflow-service:2.6.0-pre.1 # update this each CWS release
depends_on:
- db
- es
@@ -128,7 +128,7 @@ services:
labels:
com.example.service: "cws-worker1"
com.example.description: "Common Workflow Service"
image: nasa-ammos/common-workflow-service:2.5.0 # update this each CWS release
image: nasa-ammos/common-workflow-service:2.6.0-pre.1 # update this each CWS release
depends_on:
- db
- es
2 changes: 1 addition & 1 deletion install/docker/cws-image/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

ver='2.5.0' # update this each CWS release
ver='2.6.0-pre.1' # update this each CWS release

# Rebuild cws tar-ball
ROOT=$(pwd)
2 changes: 1 addition & 1 deletion install/docker/worker-ls/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ services:
labels:
com.example.service: "cws-worker2"
com.example.description: "Common Workflow Service"
image: nasa-ammos/common-workflow-service:2.5.0 # update this each CWS release
image: nasa-ammos/common-workflow-service:2.6.0-pre.1 # update this each CWS release
#depends_on:
# - logstash
hostname: cws-worker2
31 changes: 25 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>gov.nasa.jpl.ammos.ids.cws</groupId>
<artifactId>common-workflow-service</artifactId>
<version>2.5.0</version> <!-- update this each CWS release -->
<version>2.6.0-pre.1</version> <!-- update this each CWS release -->
<packaging>pom</packaging>
<name>cws</name>
<description>CWS</description>
@@ -47,8 +47,8 @@
<gson.version>2.8.9</gson.version>
<h2.version>2.2.220</h2.version>
<!-- <httpclient.version>4.3</httpclient.version> -->
<jacoco.version>0.8.2</jacoco.version>
<java.version>11</java.version>
<jacoco.version>0.8.7</jacoco.version>
<java.version>17</java.version>
<javax.mail.version>1.4.7</javax.mail.version>
<jersey-client.version>2.6</jersey-client.version>
<jms.version>1.1</jms.version>
@@ -77,11 +77,11 @@
<log4j.version>2.17.1</log4j.version>
<slf4j-log4j2-bind.version>2.17.1</slf4j-log4j2-bind.version>
<skip.integration.tests>false</skip.integration.tests>
<spring.framework.version>5.2.20.RELEASE</spring.framework.version>
<spring.framework.version>5.3.31</spring.framework.version>
<surefire.version>2.22.2</surefire.version>
<tomcat-catalina.version>9.0.75</tomcat-catalina.version>
<urlrewritefilter.version>4.0.3</urlrewritefilter.version>
<xbean-spring.version>3.17</xbean-spring.version>
<xbean-spring.version>4.24</xbean-spring.version>
<xmlunit.version>2.6.2</xmlunit.version>
</properties>

@@ -109,7 +109,7 @@
<repositories>
<repository>
<id>maven2</id>
<url>http://repo1.maven.org/maven2</url>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>repository.jboss.org-public</id>
@@ -192,6 +192,19 @@
<type>pom</type>
</dependency>

<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>23.0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>23.0.2</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
@@ -658,7 +671,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>

</build>

</project>
8 changes: 4 additions & 4 deletions utils.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
# Shell utility functions and environment settings used throughout CWS setup scripts

# Update versions as necessary
export CWS_VER='2.5.0' # update this each CWS release
export CWS_VER='2.6.0-pre.1' # update this each CWS release
export CAMUNDA_VER='7.20.0'
export TOMCAT_VER='9.0.75'
export LOGSTASH_VER='8.8.0'
@@ -152,10 +152,10 @@ function check_java_requirements () {
exit 1
fi

if [[ "${JAVA_PATH_VERSION}" > "11" && "${JAVA_PATH_VERSION}" < "12" ]]; then
print " Java version == 11x [OK]"
if [[ "${JAVA_PATH_VERSION}" > "17" && "${JAVA_PATH_VERSION}" < "18" ]]; then
print " Java version == 17x [OK]"
else
print " ERROR: Java version is ${JAVA_PATH_VERSION}. CWS only supports Java version 11x."
print " ERROR: Java version is ${JAVA_PATH_VERSION}. CWS only supports Java version 17x."
exit 1
fi

0 comments on commit 2f310e0

Please sign in to comment.