From 7cf28a1de425a1ee3e8726d1375cc6180b880e80 Mon Sep 17 00:00:00 2001 From: jamesfwood Date: Mon, 11 Jul 2022 13:41:05 -0700 Subject: [PATCH] Docker improvements (#110) * Updated docker setup * Separated console and worker. Now console only * Works with cws 2.3 now * Worker-only waits for console to startup before running configure.sh * Updated worker-ls to default connect to console-db-es-ls-kibana setup * Updated README.md --- .gitignore | 3 +- build.sh | 2 +- dev.sh | 10 +- .../docker/console-db-es-ls-kibana/README.md | 28 ++++- .../console-db-es-ls-kibana/config.properties | 8 +- .../console-db-es-ls-kibana/cws-logstash.conf | 2 +- .../docker-compose.yml | 70 +++++++++--- .../worker-config.properties | 103 ++++++++++++++++++ install/docker/cws-image/Dockerfile | 13 +-- install/docker/cws-image/build.sh | 12 +- .../cws-image/wait_for_db_es_console.sh | 53 +++++++++ install/docker/cws-image/wait_for_mariadb.sh | 37 ------- install/docker/es-only/docker-compose.yml | 20 ++-- install/docker/worker-ls/config.properties | 24 ++-- install/docker/worker-ls/cws-logstash.conf | 2 +- install/docker/worker-ls/docker-compose.yml | 35 +++--- utils.sh | 3 +- 17 files changed, 305 insertions(+), 120 deletions(-) create mode 100644 install/docker/console-db-es-ls-kibana/worker-config.properties create mode 100755 install/docker/cws-image/wait_for_db_es_console.sh delete mode 100755 install/docker/cws-image/wait_for_mariadb.sh diff --git a/.gitignore b/.gitignore index 4a80d92b..69b0dadb 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,5 @@ install/logging/logstash-*.zip # JaCoCo Reports /target -/jacoco-reports \ No newline at end of file +/jacoco-reports +/test-screenshots \ No newline at end of file diff --git a/build.sh b/build.sh index ffaaa410..35c9e895 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # -------- # build.sh # -------- diff --git a/dev.sh b/dev.sh index e8ea1af1..14697947 100755 --- a/dev.sh +++ b/dev.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # -------- # dev.sh # -------- @@ -73,7 +73,13 @@ BASE_PORT=8000 tab ${DIST}/console-only/cws "./start_cws.sh -d $BASE_PORT; tail -f $LOG_FILE" print "Waiting for console startup..." -sleep 180 +cws_console_host=$(grep cws_console_host ${ROOT}/auto_conf_console.dat | cut -d '=' -f2) +cws_console_ssl_port=$(grep cws_console_ssl_port ${ROOT}/auto_conf_console.dat | cut -d '=' -f2) +while ! curl -k -s https://${cws_console_host}:${cws_console_ssl_port}/cws-ui/login > /dev/null 2>&1; do + sleep 5 + print "Retry wait for console" +done +print "Console is now running!" # ----------------- # CONFIGURE WORKERS diff --git a/install/docker/console-db-es-ls-kibana/README.md b/install/docker/console-db-es-ls-kibana/README.md index d0bbf9b8..594468aa 100755 --- a/install/docker/console-db-es-ls-kibana/README.md +++ b/install/docker/console-db-es-ls-kibana/README.md @@ -2,11 +2,33 @@ ### Quickly run common-workflow-service on a single machine with all required services running on the same machine. -## Prerequisites: +#### It will deploy the following services in Docker: +- db (MariaDb) +- es (Elasticsearch) +- cws (CWS console) +- cws-worker1 (CWS Worker) -1. Build `common-workflow-image` Docker Image using the `build.sh` script in the cws-image dir -2. Update the `config.properties` and `docker-compose.yml` accordingly. +### Prerequisites: + +1. Be sure to increase your Docker Resources to at least 4 CPUs and 10GB memory +2. Build `common-workflow-service` Docker Image using the `build.sh` script in the cws-image dir + 1. Update the version in the `build.sh` script if necessary +3. Update the `config.properties` and `docker-compose.yml` accordingly. +4. Run the command `docker network create cws-network` to create a shared network space for other workers to join To run use the command: docker-compose up + +## Adding more workers + +### Prerequisites: + +1. Be sure to increase your Docker Resources and add 4GB memory per extra worker you want to run +2. You can easily add another worker (worker2) to this deployment by doing the following: + 1. `cd ../worker-ls` (Change to the worker-ls directory) + 2. `docker-compose up` (Startup worker2) +3. If you want to add even more workers you'll need to do the following: + 1. Copy the `worker-ls` directory to a new location + 2. Modify those `config.properites` and `docker-compose.yml` accordingly. + 3. Run `docker-compose up` in each new worker directory \ No newline at end of file diff --git a/install/docker/console-db-es-ls-kibana/config.properties b/install/docker/console-db-es-ls-kibana/config.properties index 3a0ae756..885d7665 100644 --- a/install/docker/console-db-es-ls-kibana/config.properties +++ b/install/docker/console-db-es-ls-kibana/config.properties @@ -28,7 +28,7 @@ hostname=cws-console # This is the type of installation you are performing # (1 = Console and Worker, 2 = Console Only, 3 = Worker Only) -install_type=1 +install_type=2 database_type=mariadb @@ -101,13 +101,14 @@ cws_enable_cloud_autoscaling=n # Specifies (comma separated) email addresses that will be used to receive # email alerts of major system errors, which include database connection failures, # messaging service (JMS) failures, and authentication server connection failures. -cws_notification_emails=[AdminEmailAddresses(comma separated)] +cws_notification_emails=cws@domain.com # This allows CWS to use a user provided Elasticsearch service. # If you wish to use an unsecured Elasticsearch host, you may do so # by specifying elasticsearch_use_auth=n below. +elasticsearch_protocol=http elasticsearch_use_auth=n -elasticsearch_host=http://es +elasticsearch_host=es elasticsearch_port=9200 # This allows CWS to use a user provided Logstash service, thus CWS will not install @@ -115,6 +116,7 @@ elasticsearch_port=9200 user_provided_logstash=n history_level=full +history_days_to_live=1 # Specifies the number of hours that a CWS security token is valid for. After this # amount of time it will expire, and the User will be required to authenticate diff --git a/install/docker/console-db-es-ls-kibana/cws-logstash.conf b/install/docker/console-db-es-ls-kibana/cws-logstash.conf index e9190ae3..f6df9ba7 100644 --- a/install/docker/console-db-es-ls-kibana/cws-logstash.conf +++ b/install/docker/console-db-es-ls-kibana/cws-logstash.conf @@ -8,7 +8,7 @@ input { } } file { - path => "__CWS_CATALINA_OUT_PATH__/catalina.out" + path => "/cws_logs/catalina.out" codec => multiline { pattern => "(^%{MONTH} %{MONTHDAY}, 20%{YEAR} %{HOUR}:?%{MINUTE}(?::?%{SECOND}) (?:AM|PM))|(^%{TIMESTAMP_ISO8601})|(^%{MONTHDAY}-%{MONTH}-%{YEAR} %{TIME})" negate => true diff --git a/install/docker/console-db-es-ls-kibana/docker-compose.yml b/install/docker/console-db-es-ls-kibana/docker-compose.yml index 18d2f5d7..f8867fa7 100644 --- a/install/docker/console-db-es-ls-kibana/docker-compose.yml +++ b/install/docker/console-db-es-ls-kibana/docker-compose.yml @@ -4,6 +4,7 @@ services: db: restart: always image: mariadb:10.3 + #image: arm64v8/mariadb:10.3 # Use this image for Mac M1/M2 arm64 container_name: cws-db ports: - "3306:3306" @@ -17,17 +18,18 @@ services: interval: 3s timeout: 1s retries: 5 - networks: - - backend + # networks: + # - backend es: labels: com.example.service: "es" com.example.description: "For searching and indexing data" image: elasticsearch:7.16.2 + #image: arm64v8/elasticsearch:7.16.2 # Use this image for Mac M1/M2 arm64 container_name: cws-es - networks: - - frontend - - backend + # networks: + # - frontend + # - backend ports: - "9200:9200" - "9300:9300" @@ -61,18 +63,18 @@ services: # - frontend # - backend # environment: -# - ELASTICSEARCH_URL=http://es:9200 +# - ELASTICSEARCH_HOSTS=http://es:9200 # depends_on: # - es # logstash: # labels: # com.example.service: "logstash" # com.example.description: "For logging data" -# image: docker.elastic.co/logstash/logstash:7.16.2 -# container_name: cws_logstash +# image: arm64v8/logstash:7.16.2 +# container_name: cws-logstash # volumes: # - ./cws-logstash.conf:/home/cws_user/cws-logstash.conf:ro -# - logs-volume:/cws_logs:ro +# - logs-volume:/cws_logs # command: logstash -f /home/cws_user/cws-logstash.conf # environment: # - XPACK_MONITORING_ENABLED=false @@ -93,7 +95,8 @@ services: labels: com.example.service: "cws-server" com.example.description: "Common Workflow Service" - image: nasa-ammos/common-workflow-service:2.2.0 # update this each CWS release + image: nasa-ammos/common-workflow-service:2.3.0-alpha.6 # update this each CWS release + #image: arm64v8/nasa-ammos/common-workflow-service:2.3.0-alpha.6 # Use this image for Mac M1/M2 arm64 depends_on: - db - es @@ -104,24 +107,55 @@ services: - "38443:38443" - "31616:31616" hostname: cws-console - networks: - - frontend - - backend + # networks: + # - frontend + # - backend environment: - DB_HOST=db - DB_USER=root - DB_PW=test - - ES_HOST=http://es + - ES_PROTOCOL=http + - ES_HOST=es - ES_PORT=9200 + healthcheck: + test: ["CMD-SHELL", "curl -k --silent --fail https://localhost:38443/cws-ui/login || exit 1"] + interval: 5s + timeout: 2s + retries: 12 volumes: - ./config.properties:/home/cws_user/config.properties:ro - logs-volume:/home/cws_user/cws/server/apache-tomcat-9.0.33/logs + cws-worker: + container_name: cws-worker1 + labels: + com.example.service: "cws-worker1" + com.example.description: "Common Workflow Service" + image: nasa-ammos/common-workflow-service:2.3.0-alpha.6 # update this each CWS release + #image: arm64v8/nasa-ammos/common-workflow-service:2.3.0-alpha.6 # Use this image for Mac M1/M2 arm64 + depends_on: + - db + - es + - cws + hostname: cws-worker1 + # networks: + # - frontend + # - backend + environment: + - DB_HOST=db + - DB_USER=root + - DB_PW=test + - ES_PROTOCOL=http + - ES_HOST=es + - ES_PORT=9200 + volumes: + - ./worker-config.properties:/home/cws_user/config.properties:ro + - logs-volume:/home/cws_user/cws/server/apache-tomcat-9.0.33/logs volumes: logs-volume: networks: - frontend: - driver: bridge - backend: - driver: bridge + default: + external: + name: cws-network + diff --git a/install/docker/console-db-es-ls-kibana/worker-config.properties b/install/docker/console-db-es-ls-kibana/worker-config.properties new file mode 100644 index 00000000..fabc25e9 --- /dev/null +++ b/install/docker/console-db-es-ls-kibana/worker-config.properties @@ -0,0 +1,103 @@ +# --------------------------------------------------------------------------- +# This is an example properties file that can be used when configuring CWS +# for the first time. +# +# To use: +# +# 1) Fill in the correct values where you see [YourXXX] below, for example +# [YourHostname]. +# The hard-coded values are suggested to be used, but can be changed if +# desired. +# +# 2) Run CWS configuration program with this properties file: +# ./configure.sh config.properties +# +# --------------------------------------------------------------------------- + +cws_ldap_url_default=ldaps://ldap.localhost:636 +ldap_identity_plugin_class=org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin +ldap_security_filter_class=jpl.cws.core.web.CwsLdapSecurityFilter +camunda_security_filter_class=jpl.cws.core.web.CwsCamundaSecurityFilter +auto_accept_config=y +startup_autoregister_process_defs=false + +# This is the hostname of the machine you are installing CWS (could be a Worker, +# a Console, or both) on. The name (or less preferably IP address) you use here +# should be accessible by all other components inthe CWS installation. +hostname=worker1 + +# This is the type of installation you are performing +# (1 = Console and Worker, 2 = Console Only, 3 = Worker Only) +install_type=3 + +database_type=mariadb + +# This is the hostname where the database is installed. +# This hostname must be accessible by all Workers and Console +database_host=db + +database_port=3306 + +# The name of the database schema. +database_name=cws + +# The name of the user that can access, and has CRUD permission to the database +database_username=root + +# The password for the database user. +database_password=test + +# The LDAP username for the user that will be the CWS Administrator. +# This User will have the initial permissions in CWS, and will have the ability +# to add users and modify permissions. +admin_user=cws + +# The first and last name, and email address of the CWS Administrator. +# These fields are only required if using CAMUNDA security +admin_firstname=CWS +admin_lastname=CWS +admin_email=cws@domain.com + +cws_web_port=39080 +cws_ssl_port=39443 +cws_ajp_port=39009 +cws_shutdown_port=39005 + +# The host that the CWS platform containing the console is installed on. +# This configuration option only needs to be specified if installing CWS on a +# non-console host. +cws_console_host=cws-console +cws_console_ssl_port=38443 + +# The host that will contain the CWS message broker. Currently this will always +# be the same as the Console host. If you are installing a Console, enter the +# same hostname as the "hostname" option. If you are installing a Worker, then +# enter the hostname of the console. +amq_host=cws-console +amq_port=31616 + +cws_jmx_port=31096 +identity_plugin_type=CAMUNDA +cws_ldap_url=ldaps://ldap.localhost:636 +notify_users_email=y +email_subject=[CWS] You have been assigned a task (CWS_TASK_NAME) +email_body=fn:CWS_USER_FIRSTNAME
ln:CWS_USER_LASTNAME,
tn:(CWS_TASK_NAME), em:CWS_USER_EMAIL + +# This allows CWS to use a user provided Logstash service, thus CWS will not install +# nor start its own. +user_provided_logstash=n + +history_level=full + +# Specifies (comma separated) email addresses that will be used to receive +# email alerts of major system errors, which include database connection failures, +# messaging service (JMS) failures, and authentication server connection failures. +cws_notification_emails=cws@domain.com + +# This allows CWS to use a user provided Elasticsearch service. +# If you wish to use an unsecured Elasticsearch host, you may do so +# by specifying elasticsearch_use_auth=n below. +elasticsearch_protocol=http +elasticsearch_use_auth=n +elasticsearch_host=es +elasticsearch_port=9200 diff --git a/install/docker/cws-image/Dockerfile b/install/docker/cws-image/Dockerfile index 578be228..2b2162ea 100644 --- a/install/docker/cws-image/Dockerfile +++ b/install/docker/cws-image/Dockerfile @@ -1,7 +1,8 @@ FROM oraclelinux:8 +#FROM arm64v8/oraclelinux:8 # Use this image for Mac M1/M2 arm64 RUN yum update -y && \ - yum install -y mariadb-server java-1.8.0-openjdk java-1.8.0-openjdk-devel rsync which && \ + yum install -y mysql java-1.8.0-openjdk java-1.8.0-openjdk-devel rsync which && \ yum clean all ENV JAVA_HOME /usr/lib/jvm/java-1.8.0 @@ -9,20 +10,14 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8.0 ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN useradd -ms /bin/bash cws_user && usermod -aG wheel cws_user - WORKDIR /home/cws_user ADD cws_server.tar.gz . ADD startup.sh . -ADD wait_for_mariadb.sh . +ADD wait_for_db_es_console.sh . # For time check ADD getTime.java . ADD joda-time-2.1.jar . -RUN chown -R cws_user:cws_user cws - -USER cws_user - -ENTRYPOINT [ "./wait_for_mariadb.sh" ] +ENTRYPOINT [ "./wait_for_db_es_console.sh" ] diff --git a/install/docker/cws-image/build.sh b/install/docker/cws-image/build.sh index 121d5973..6b892bb0 100755 --- a/install/docker/cws-image/build.sh +++ b/install/docker/cws-image/build.sh @@ -1,10 +1,13 @@ #!/usr/bin/env bash -ver='2.2.0' # update this each CWS release +ver='2.3.0-alpha.6' # update this each CWS release -echo -echo "ATTENTION: If changes were made to the source code or config files, don't forget to rebuild the cws .tar.gz package file before running this script." -echo +# Rebuild cws tar-ball +ROOT=$(pwd) +cd ../../.. +./build.sh + +cd $ROOT CWS_PACKAGE=../../../dist/cws_server.tar.gz @@ -20,6 +23,7 @@ cp ../../../cws-core/cws-core-libs/joda-time-2.1.jar . echo "Building CWS docker image. Version = $ver" docker build -t nasa-ammos/common-workflow-service:$ver . +#docker build -t arm64v8/nasa-ammos/common-workflow-service:$ver . # Use this image for Mac M1/M2 arm64 rm cws_server.tar.gz rm joda-time-2.1.jar diff --git a/install/docker/cws-image/wait_for_db_es_console.sh b/install/docker/cws-image/wait_for_db_es_console.sh new file mode 100755 index 00000000..81872e61 --- /dev/null +++ b/install/docker/cws-image/wait_for_db_es_console.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# wait until MySQL is really available +maxcounter=300 + +echo DB_HOST = $DB_HOST +echo DB_USER = $DB_USER +echo DB_PW = $DB_PW +echo ES_PROTOCOL = $ES_PROTOCOL +echo ES_HOST = $ES_HOST +echo ES_PORT = $ES_PORT + +counter=1 +while ! mysql --host="${DB_HOST}" --user="${DB_USER}" --password="${DB_PW}" -e "SHOW DATABASES;" > /dev/null 2>&1; do + sleep 1 + counter=`expr $counter + 1` + echo "Retry wait for DB: $counter" + if [ $counter -gt $maxcounter ]; then + >&2 echo "We have been waiting for MySQL too long already; failing." + exit 1 + fi; +done + +while ! curl -s "${ES_PROTOCOL}://${ES_HOST}:${ES_PORT}"; do + sleep 1 + echo "Retry wait for ES" +done + +>&2 echo "MariaDb and ES are up..." + +# If starting a worker only, wait for console to startup +install_type=$(grep install_type config.properties | cut -d '=' -f2) +if [[ "$install_type" == 3 ]]; then + echo "Waiting for console to startup..." + cws_console_host=$(grep cws_console_host config.properties | cut -d '=' -f2) + cws_console_ssl_port=$(grep cws_console_ssl_port config.properties | cut -d '=' -f2) + while ! curl -k -s "https://${cws_console_host}:${cws_console_ssl_port}/cws-ui/login" > /dev/null 2>&1; do + sleep 5 + echo "Retry wait for console" + done + echo "Console is running!" +fi + +# Start app +>&2 echo "Executing startup.sh..." + +./startup.sh + +# Start app +>&2 echo "CWS is up!!" + +exec "$@" + +tail -f cws/server/apache-tomcat-*/logs/cws.log diff --git a/install/docker/cws-image/wait_for_mariadb.sh b/install/docker/cws-image/wait_for_mariadb.sh deleted file mode 100755 index 46aaf805..00000000 --- a/install/docker/cws-image/wait_for_mariadb.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# wait until MySQL is really available -maxcounter=300 - -echo DB_HOST = $DB_HOST -echo DB_USER = $DB_USER -echo DB_PW = $DB_PW -echo ES_HOST = $ES_HOST -echo ES_PORT = $ES_PORT - -counter=1 -while ! mysql --host="${DB_HOST}" --user="${DB_USER}" --password="${DB_PW}" -e "SHOW DATABASES;" > /dev/null 2>&1; do - sleep 1 - counter=`expr $counter + 1` - echo "Retry wait for DB: $counter" - if [ $counter -gt $maxcounter ]; then - >&2 echo "We have been waiting for MySQL too long already; failing." - exit 1 - fi; -done - -while ! curl -s $ES_HOST:$ES_PORT; do - sleep 1 - echo "Retry wait for ES" -done - -# Start app ->&2 echo "MariaDb and ES are up - executing startup.sh..." - -./startup.sh - -# Start app ->&2 echo "CWS is up!!" - -exec "$@" - -tail -f cws/server/apache-tomcat-*/logs/cws.log diff --git a/install/docker/es-only/docker-compose.yml b/install/docker/es-only/docker-compose.yml index d09b1b6e..a719d225 100644 --- a/install/docker/es-only/docker-compose.yml +++ b/install/docker/es-only/docker-compose.yml @@ -1,16 +1,15 @@ version: '3.2' services: - - es: + elasticsearch: labels: com.example.service: "es" com.example.description: "For searching and indexing data" image: elasticsearch:7.16.2 - container_name: cws-es + #image: arm64v8/elasticsearch:7.16.2 # Use this image for Mac M1/M2 arm64 + container_name: cws-es-only networks: - - frontend - - backend + - es-net ports: - "9200:9200" - "9300:9300" @@ -41,15 +40,12 @@ services: # ports: # - "5601:5601" # networks: -# - frontend -# - backend +# - es-net # environment: -# - ELASTICSEARCH_URL=http://es:9200 +# - ELASTICSEARCH_HOSTS=http://cws-es:9200 # depends_on: -# - es +# - elasticsearch networks: - frontend: - driver: bridge - backend: + es-net: driver: bridge diff --git a/install/docker/worker-ls/config.properties b/install/docker/worker-ls/config.properties index ac1ac2e2..a67b9799 100644 --- a/install/docker/worker-ls/config.properties +++ b/install/docker/worker-ls/config.properties @@ -24,7 +24,7 @@ startup_autoregister_process_defs=false # This is the hostname of the machine you are installing CWS (could be a Worker, # a Console, or both) on. The name (or less preferably IP address) you use here # should be accessible by all other components inthe CWS installation. -hostname=worker1 +hostname=worker2 # This is the type of installation you are performing # (1 = Console and Worker, 2 = Console Only, 3 = Worker Only) @@ -34,7 +34,7 @@ database_type=mariadb # This is the hostname where the database is installed. # This hostname must be accessible by all Workers and Console -database_host=__DB_HOST__ +database_host=db database_port=3306 @@ -58,10 +58,10 @@ admin_firstname=CWS admin_lastname=CWS admin_email=cws@domain.com -cws_web_port=39080 -cws_ssl_port=39443 -cws_ajp_port=39009 -cws_shutdown_port=39005 +cws_web_port=37080 +cws_ssl_port=37443 +cws_ajp_port=37009 +cws_shutdown_port=37005 # The host that the CWS platform containing the console is installed on. # This configuration option only needs to be specified if installing CWS on a @@ -76,7 +76,7 @@ cws_console_ssl_port=38443 amq_host=cws-console amq_port=31616 -cws_jmx_port=31096 +cws_jmx_port=31097 identity_plugin_type=CAMUNDA cws_ldap_url=ldaps://ldap.localhost:636 notify_users_email=y @@ -92,4 +92,12 @@ history_level=full # Specifies (comma separated) email addresses that will be used to receive # email alerts of major system errors, which include database connection failures, # messaging service (JMS) failures, and authentication server connection failures. -cws_notification_emails=[AdminEmailAddresses(comma separated)] +cws_notification_emails=cws@domain.com + +# This allows CWS to use a user provided Elasticsearch service. +# If you wish to use an unsecured Elasticsearch host, you may do so +# by specifying elasticsearch_use_auth=n below. +elasticsearch_protocol=http +elasticsearch_use_auth=n +elasticsearch_host=es +elasticsearch_port=9200 diff --git a/install/docker/worker-ls/cws-logstash.conf b/install/docker/worker-ls/cws-logstash.conf index 07dfda04..801c7927 100644 --- a/install/docker/worker-ls/cws-logstash.conf +++ b/install/docker/worker-ls/cws-logstash.conf @@ -8,7 +8,7 @@ input { } } file { - path => "__CWS_CATALINA_OUT_PATH__/catalina.out" + path => "/cws_logs/catalina.out" codec => multiline { pattern => "(^%{MONTH} %{MONTHDAY}, 20%{YEAR} %{HOUR}:?%{MINUTE}(?::?%{SECOND}) (?:AM|PM))|(^%{TIMESTAMP_ISO8601})|(^%{MONTHDAY}-%{MONTH}-%{YEAR} %{TIME})" negate => true diff --git a/install/docker/worker-ls/docker-compose.yml b/install/docker/worker-ls/docker-compose.yml index 2527dea0..7351a247 100644 --- a/install/docker/worker-ls/docker-compose.yml +++ b/install/docker/worker-ls/docker-compose.yml @@ -24,24 +24,22 @@ services: # - frontend # - backend cws: - container_name: cws-worker + container_name: cws-worker2 labels: - com.example.service: "cws-server" + com.example.service: "cws-worker2" com.example.description: "Common Workflow Service" - image: nasa-ammos/common-workflow-service:2.2.0 # update this each CWS release - depends_on: - - logstash - hostname: cws-worker - networks: - - frontend - - backend + image: nasa-ammos/common-workflow-service:2.3.0-alpha.6 # update this each CWS release + #image: arm64v8/nasa-ammos/common-workflow-service:2.3.0-alpha.6 # Use this image for Mac M1/M2 arm64 + #depends_on: + # - logstash + hostname: cws-worker2 environment: - - DB_HOST=__DB_HOST__ - - DB_USER=root - - DB_PW=test - - ES_PROTOCOL=__ES_PROTOCOL__ - - ES_HOST=__ES_HOST__ - - ES_PORT=9200 + - DB_HOST=db + - DB_USER=root + - DB_PW=test + - ES_PROTOCOL=http + - ES_HOST=es + - ES_PORT=9200 volumes: - ./config.properties:/home/cws_user/config.properties:ro - logs-volume:/home/cws_user/cws/server/apache-tomcat-9.0.33/logs @@ -50,7 +48,6 @@ volumes: logs-volume: networks: - frontend: - driver: bridge - backend: - driver: bridge + default: + external: + name: cws-network diff --git a/utils.sh b/utils.sh index 7d053e0e..1998b1b0 100644 --- a/utils.sh +++ b/utils.sh @@ -296,7 +296,7 @@ function auto_conf_data () { amq_port=${AMQ_PORT} cws_amq_jmx_port=${CWS_AMQ_JMX_PORT} cws_jmx_port=${CWS_JMX_PORT} - history_days_to_live=2 + history_days_to_live=1 worker_abandoned_days=${WORKER_ABANDONED_DAYS} notify_users_email=y email_subject=[CWS] You have been assigned a task (CWS_TASK_NAME) @@ -314,6 +314,7 @@ function auto_conf_data () { startup_autoregister_process_defs=false cws_notification_emails=${NOTIFICATION_EMAILS} cws_token_expiration_hours=240 + user_provided_logstash=n EOF }