diff --git a/kogito-data-index-ephemeral-image.yaml b/kogito-data-index-ephemeral-image.yaml index 5cd7606f6..4801a69e0 100644 --- a/kogito-data-index-ephemeral-image.yaml +++ b/kogito-data-index-ephemeral-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-data-index-ephemeral" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider" labels: @@ -45,18 +45,12 @@ envs: value: "http-events-support" description: "Allows to change the event connection type. The possible values are :`kafka-events-support` or `http-events-support`(default)" -packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.dataindex.community.ephemeral @@ -71,4 +65,3 @@ run: user: 1001 cmd: - "/home/kogito/kogito-app-launch.sh" - diff --git a/kogito-data-index-postgresql-image.yaml b/kogito-data-index-postgresql-image.yaml index a0852f996..3f41ff43c 100644 --- a/kogito-data-index-postgresql-image.yaml +++ b/kogito-data-index-postgresql-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-data-index-postgresql" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito Data Index Service for PostgreSQL persistence provider" @@ -43,9 +43,6 @@ envs: example: "true" description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization." -packages: - manager: microdnf - ports: - value: 8080 @@ -53,11 +50,8 @@ modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.dataindex.postgresql @@ -69,4 +63,3 @@ run: user: 1001 cmd: - "/home/kogito/kogito-app-launch.sh" - diff --git a/kogito-jit-runner-image.yaml b/kogito-jit-runner-image.yaml index 801539ae3..0907088be 100644 --- a/kogito-jit-runner-image.yaml +++ b/kogito-jit-runner-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-jit-runner" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito JIT Runner" labels: @@ -42,18 +42,12 @@ envs: example: "true" description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization." -packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.jit-runner diff --git a/kogito-jobs-service-allinone-image.yaml b/kogito-jobs-service-allinone-image.yaml index 0db23c680..f2a99f7a7 100644 --- a/kogito-jobs-service-allinone-image.yaml +++ b/kogito-jobs-service-allinone-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-jobs-service-allinone" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito Jobs Service with all available jdbc providers" labels: @@ -48,18 +48,12 @@ envs: example: "postgresql" description: "The all in one image contains all the supported jdbc plugins for Jobs Service, ephemeral and postgresql, if empty, defaults to ephemeral" -packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.jobs.service.allinone diff --git a/kogito-jobs-service-ephemeral-image.yaml b/kogito-jobs-service-ephemeral-image.yaml index b6b5bd6c8..d26ce19cb 100644 --- a/kogito-jobs-service-ephemeral-image.yaml +++ b/kogito-jobs-service-ephemeral-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-jobs-service-ephemeral" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito in memory Jobs Service" labels: @@ -45,18 +45,12 @@ envs: example: "true" description: "By default Jobs Service doesn't integrate with message systems (e.g. Kafka). Set this variable to true to enable the events add-on." -packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.jobs.service.ephemeral diff --git a/kogito-jobs-service-postgresql-image.yaml b/kogito-jobs-service-postgresql-image.yaml index b13f52043..df50edcc4 100644 --- a/kogito-jobs-service-postgresql-image.yaml +++ b/kogito-jobs-service-postgresql-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-jobs-service-postgresql" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito Jobs Service based on Postgresql" labels: @@ -45,18 +45,12 @@ envs: example: "true" description: "By default Jobs Service doesn't integrate with message systems (e.g. Kafka). Set this variable to true to enable the events add-on." -packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.jobs.service.postgresql diff --git a/kogito-management-console-image.yaml b/kogito-management-console-image.yaml index 3e4c14f3e..62ee22846 100644 --- a/kogito-management-console-image.yaml +++ b/kogito-management-console-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-management-console" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito Management Console" labels: @@ -45,18 +45,12 @@ envs: example: "http://data-index.service:8080" description: "Data Index service address, defaults to http://localhost:8180." -packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.management.console diff --git a/kogito-swf-builder-image.yaml b/kogito-swf-builder-image.yaml index a937e26ae..195fdae6c 100644 --- a/kogito-swf-builder-image.yaml +++ b/kogito-swf-builder-image.yaml @@ -17,32 +17,24 @@ # under the License. # - name: builder - from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" + from: "registry.access.redhat.com/ubi8/openjdk-17:1.18" version: "999-SNAPSHOT" modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - name: org.kie.kogito.launch.scripts - - name: org.kie.kogito.openjdk - version: "17" - name: org.kie.kogito.dynamic.resources - - name: org.kie.kogito.maven - version: "3.9.3" - name: org.kie.kogito.maven.common - name: org.kie.kogito.project.versions - name: org.kie.kogito.swf.common.scripts - name: org.kie.kogito.swf.builder.build-config - name: org.kie.kogito.swf.common.build - packages: - manager: microdnf - - name: "quay.io/kiegroup/kogito-swf-builder" - from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" + from: "registry.access.redhat.com/ubi8/openjdk-17:1.18" version: "999-SNAPSHOT" description: "Kogito Serverless Workflow base builder with Quarkus extensions libraries preinstalled" @@ -64,22 +56,14 @@ - name: "io.openshift.tags" value: "kogito,builder,serverless,workflow" - packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - name: org.kie.kogito.launch.scripts - - name: org.kie.kogito.openjdk - version: "17" - name: org.kie.kogito.dynamic.resources - - name: org.kie.kogito.maven - version: "3.9.3" - name: org.kie.kogito.maven.common - name: org.kie.kogito.project.versions - name: org.kie.kogito.swf.common.scripts diff --git a/kogito-swf-devmode-image.yaml b/kogito-swf-devmode-image.yaml index 6f4346810..105a522c5 100644 --- a/kogito-swf-devmode-image.yaml +++ b/kogito-swf-devmode-image.yaml @@ -17,21 +17,16 @@ # under the License. # - name: builder - from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" + from: "registry.access.redhat.com/ubi8/openjdk-17:1.18" version: "999-SNAPSHOT" modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - name: org.kie.kogito.launch.scripts - - name: org.kie.kogito.openjdk - version: "17" - name: org.kie.kogito.dynamic.resources - - name: org.kie.kogito.maven - version: "3.9.3" - name: org.kie.kogito.maven.common - name: org.kie.kogito.project.versions - name: org.kie.kogito.swf.common.scripts @@ -42,7 +37,7 @@ manager: microdnf - name: "quay.io/kiegroup/kogito-swf-devmode" - from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" + from: "registry.access.redhat.com/ubi8/openjdk-17:1.18" version: "999-SNAPSHOT" description: "Kogito Serverless Workflow development mode with Quarkus extensions libraries preinstalled" @@ -69,15 +64,10 @@ repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - name: org.kie.kogito.launch.scripts - - name: org.kie.kogito.openjdk - version: "17" - name: org.kie.kogito.dynamic.resources - - name: org.kie.kogito.maven - version: "3.9.3" - name: org.kie.kogito.maven.common - name: org.kie.kogito.project.versions - name: org.kie.kogito.swf.common.scripts diff --git a/kogito-task-console-image.yaml b/kogito-task-console-image.yaml index 75bfaf15c..2031de62f 100644 --- a/kogito-task-console-image.yaml +++ b/kogito-task-console-image.yaml @@ -20,7 +20,7 @@ schema_version: 1 name: "quay.io/kiegroup/kogito-task-console" version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" description: "Runtime image for Kogito Task Console" labels: @@ -45,18 +45,12 @@ envs: example: "http://data-index.service:8080" description: "Data Index service address, defaults to http://localhost:8180." -packages: - manager: microdnf - modules: repositories: - path: modules install: - - name: org.kie.kogito.image.dependencies - name: org.kie.kogito.system.user - name: org.kie.kogito.logging - - name: org.kie.kogito.openjdk.headless - version: "17" - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.task.console @@ -70,4 +64,3 @@ run: user: 1001 cmd: - "/home/kogito/kogito-app-launch.sh" - diff --git a/modules/kogito-data-index-ephemeral/community/configure b/modules/kogito-data-index-ephemeral/community/configure index f5807a90e..ae5360b77 100644 --- a/modules/kogito-data-index-ephemeral/community/configure +++ b/modules/kogito-data-index-ephemeral/community/configure @@ -19,12 +19,8 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/data-index-service-inmemory-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ - cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh - diff --git a/modules/kogito-data-index-ephemeral/community/module.yaml b/modules/kogito-data-index-ephemeral/community/module.yaml index 31d4e1bee..5a975f608 100644 --- a/modules/kogito-data-index-ephemeral/community/module.yaml +++ b/modules/kogito-data-index-ephemeral/community/module.yaml @@ -23,13 +23,9 @@ version: "999-SNAPSHOT" # see build-kogito-apps-components.sh script, responsible for build it. # called by the Makefile before builds artifacts: - - path: /tmp/build/data-index-service-inmemory/data-index-service-inmemory-quarkus-app.zip - name: data-index-service-inmemory-quarkus-app.zip + - path: /tmp/build/data-index-service-inmemory + dest: /home/kogito/bin + name: quarkus-app execute: - script: configure - -packages: - install: - - pam - diff --git a/modules/kogito-data-index-postgresql/configure b/modules/kogito-data-index-postgresql/configure index a38b551b6..ae5360b77 100644 --- a/modules/kogito-data-index-postgresql/configure +++ b/modules/kogito-data-index-postgresql/configure @@ -19,12 +19,8 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/data-index-service-postgresql-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ - cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh - diff --git a/modules/kogito-data-index-postgresql/module.yaml b/modules/kogito-data-index-postgresql/module.yaml index 3ad6f1872..d5037af86 100644 --- a/modules/kogito-data-index-postgresql/module.yaml +++ b/modules/kogito-data-index-postgresql/module.yaml @@ -23,9 +23,9 @@ version: "999-SNAPSHOT" # see build-kogito-apps-components.sh script, responsible for build it. # called by the Makefile before builds artifacts: - - path: /tmp/build/data-index-service-postgresql/data-index-service-postgresql-quarkus-app.zip - name: data-index-service-postgresql-quarkus-app.zip + - path: /tmp/build/data-index-service-postgresql + dest: /home/kogito/bin + name: quarkus-app execute: - script: configure - diff --git a/modules/kogito-dynamic-resources/module.yaml b/modules/kogito-dynamic-resources/module.yaml index 55802bf98..7699783d8 100644 --- a/modules/kogito-dynamic-resources/module.yaml +++ b/modules/kogito-dynamic-resources/module.yaml @@ -26,8 +26,6 @@ execute: - script: configure envs: - - name: JBOSS_CONTAINER_JAVA_JVM_MODULE - value: /opt/container/java/jvm - name: JAVA_OPTIONS description: User specified Java options to be appended to generated options in JAVA_OPTS (internal use). example: "-verbose:class" diff --git a/modules/kogito-jit-runner/configure b/modules/kogito-jit-runner/configure index 871632d9a..e1c6da21e 100644 --- a/modules/kogito-jit-runner/configure +++ b/modules/kogito-jit-runner/configure @@ -19,12 +19,9 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/jitexecutor-runner-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ - chown -R 1001:0 "${KOGITO_HOME}" chmod -R ug+rwX "${KOGITO_HOME}" diff --git a/modules/kogito-jit-runner/module.yaml b/modules/kogito-jit-runner/module.yaml index 75fee11a7..9928adf7d 100644 --- a/modules/kogito-jit-runner/module.yaml +++ b/modules/kogito-jit-runner/module.yaml @@ -23,8 +23,9 @@ version: "999-SNAPSHOT" # see build-kogito-apps-components.sh script, responsible for build it. # called by the Makefile before builds artifacts: - - path: /tmp/build/jitexecutor-runner/jitexecutor-runner-quarkus-app.zip - name: jitexecutor-runner-quarkus-app.zip + - path: /tmp/build/jitexecutor-runner + dest: /home/kogito/bin + name: quarkus-app execute: - script: configure diff --git a/modules/kogito-jobs-service-all-in-one/configure b/modules/kogito-jobs-service-all-in-one/configure index 6777f4806..04cf35c1f 100644 --- a/modules/kogito-jobs-service-all-in-one/configure +++ b/modules/kogito-jobs-service-all-in-one/configure @@ -19,14 +19,9 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/jobs-service-inmemory-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ephemeral -unzip "${SOURCES_DIR}"/jobs-service-postgresql-quarkus-app.zip -d "${KOGITO_HOME}"/bin/postgresql - - mkdir "${KOGITO_HOME}"/bin/shared-libs/ mv "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared-libs/ diff --git a/modules/kogito-jobs-service-all-in-one/module.yaml b/modules/kogito-jobs-service-all-in-one/module.yaml index aa890d326..1ef0ffff5 100644 --- a/modules/kogito-jobs-service-all-in-one/module.yaml +++ b/modules/kogito-jobs-service-all-in-one/module.yaml @@ -21,14 +21,12 @@ name: org.kie.kogito.jobs.service.allinone version: "999-SNAPSHOT" artifacts: - - path: /tmp/build/jobs-service-inmemory-all-in-one/jobs-service-inmemory-quarkus-app.zip - name: jobs-service-inmemory-quarkus-app.zip - - path: /tmp/build/jobs-service-postgresql-all-in-one/jobs-service-postgresql-quarkus-app.zip - name: jobs-service-postgresql-quarkus-app.zip - -packages: - install: - - pam + - path: /tmp/build/jobs-service-inmemory-all-in-one + name: jobs-service-inmemory-all-in-one + dest: /home/kogito/bin/ephemeral + - path: /tmp/build/jobs-service-postgresql-all-in-one + name: jobs-service-postgresql-all-in-one + dest: /home/kogito/bin/postgresql execute: - script: configure diff --git a/modules/kogito-jobs-service-ephemeral/configure b/modules/kogito-jobs-service-ephemeral/configure index c9a470c1b..10d0d252b 100644 --- a/modules/kogito-jobs-service-ephemeral/configure +++ b/modules/kogito-jobs-service-ephemeral/configure @@ -19,11 +19,8 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/jobs-service-inmemory-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ephemeral - cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh diff --git a/modules/kogito-jobs-service-ephemeral/module.yaml b/modules/kogito-jobs-service-ephemeral/module.yaml index 685f27e2a..1aeac4351 100644 --- a/modules/kogito-jobs-service-ephemeral/module.yaml +++ b/modules/kogito-jobs-service-ephemeral/module.yaml @@ -23,12 +23,9 @@ version: "999-SNAPSHOT" # see build-kogito-apps-components.sh script, responsible for build it. # called by the Makefile before builds artifacts: - - path: /tmp/build/jobs-service-inmemory/jobs-service-inmemory-quarkus-app.zip - name: jobs-service-inmemory-quarkus-app.zip - -packages: - install: - - pam + - path: /tmp/build/jobs-service-inmemory + dest: /home/kogito/bin/ephemeral + name: quarkus-app execute: - script: configure diff --git a/modules/kogito-jobs-service-postgresql/configure b/modules/kogito-jobs-service-postgresql/configure index 5ecde9755..10d0d252b 100644 --- a/modules/kogito-jobs-service-postgresql/configure +++ b/modules/kogito-jobs-service-postgresql/configure @@ -19,12 +19,8 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/jobs-service-postgresql-quarkus-app.zip -d "${KOGITO_HOME}"/bin/postgresql - cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh - diff --git a/modules/kogito-jobs-service-postgresql/module.yaml b/modules/kogito-jobs-service-postgresql/module.yaml index 67c5b13d0..95da8e909 100644 --- a/modules/kogito-jobs-service-postgresql/module.yaml +++ b/modules/kogito-jobs-service-postgresql/module.yaml @@ -23,9 +23,9 @@ version: "999-SNAPSHOT" # see build-kogito-apps-components.sh script, responsible for build it. # called by the Makefile before builds artifacts: - - path: /tmp/build/jobs-service-postgresql/jobs-service-postgresql-quarkus-app.zip - name: jobs-service-postgresql-quarkus-app.zip + - path: /tmp/build/jobs-service-postgresql + dest: /home/kogito/bin/postgresql + name: quarkus-app execute: - script: configure - diff --git a/modules/kogito-management-console/configure.sh b/modules/kogito-management-console/configure.sh index a7d9cab33..19b6d5c35 100644 --- a/modules/kogito-management-console/configure.sh +++ b/modules/kogito-management-console/configure.sh @@ -19,11 +19,9 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/management-console-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ cp -rv "${ADDED_DIR}"/launch/* "${KOGITO_HOME}"/launch/ chown -R 1001:0 "${KOGITO_HOME}" diff --git a/modules/kogito-management-console/module.yaml b/modules/kogito-management-console/module.yaml index 063487f45..f00bb9ed0 100644 --- a/modules/kogito-management-console/module.yaml +++ b/modules/kogito-management-console/module.yaml @@ -23,8 +23,9 @@ version: "999-SNAPSHOT" # see build-kogito-apps-components.sh script, responsible for build it. # called by the Makefile before builds artifacts: - - path: /tmp/build/management-console/management-console-quarkus-app.zip - name: management-console-quarkus-app.zip + - path: /tmp/build/management-console + dest: /home/kogito/bin + name: quarkus-app execute: - script: configure.sh diff --git a/modules/kogito-maven/common/configure b/modules/kogito-maven/common/configure old mode 100644 new mode 100755 index aa7e67b61..7f5306045 --- a/modules/kogito-maven/common/configure +++ b/modules/kogito-maven/common/configure @@ -22,8 +22,17 @@ set -e SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") -tar xzf "${SOURCES_DIR}"/apache-maven-"${MAVEN_VERSION}"-bin.tar.gz -C /usr/share -mv /usr/share/apache-maven-"${MAVEN_VERSION}" /usr/share/maven +mvn_install_dir="/usr/share/maven" + +# Verify if mvn is installed +if [ ! -d ${mvn_install_dir} ] && ! command -v mvn &> /dev/null ; +then + echo "---> Maven not found, downloading and installing it" + tar xzf "${SOURCES_DIR}"/apache-maven-"${MAVEN_VERSION}"-bin.tar.gz -C /usr/share + mv /usr/share/apache-maven-"${MAVEN_VERSION}" ${mvn_install_dir} +else + echo "---> Maven already present in the current context" +fi mkdir "${KOGITO_HOME}"/.m2 cp -v "${SCRIPT_DIR}"/maven/* "${KOGITO_HOME}"/.m2 diff --git a/modules/kogito-openjdk/17-headless/module.yaml b/modules/kogito-openjdk/17-headless/module.yaml index ebdf54bd5..db55c4fe0 100644 --- a/modules/kogito-openjdk/17-headless/module.yaml +++ b/modules/kogito-openjdk/17-headless/module.yaml @@ -35,6 +35,9 @@ envs: value: "openjdk" - name: "JAVA_VERSION" value: "17" + # Same env set by the openjdk image for modules that won't use it + - name: JBOSS_CONTAINER_JAVA_JVM_MODULE + value: /opt/container/java/jvm execute: - script: clean.sh diff --git a/modules/kogito-openjdk/17/module.yaml b/modules/kogito-openjdk/17/module.yaml index 7a7e7349d..6cd287ddf 100644 --- a/modules/kogito-openjdk/17/module.yaml +++ b/modules/kogito-openjdk/17/module.yaml @@ -35,6 +35,9 @@ envs: value: "openjdk" - name: "JAVA_VERSION" value: "17" + # Same env set by the openjdk image for modules that won't use it + - name: JBOSS_CONTAINER_JAVA_JVM_MODULE + value: /opt/container/java/jvm execute: - script: clean.sh diff --git a/modules/kogito-swf/builder/runtime/community/configure.sh b/modules/kogito-swf/builder/runtime/community/configure.sh index 14d76b745..8d26bb594 100644 --- a/modules/kogito-swf/builder/runtime/community/configure.sh +++ b/modules/kogito-swf/builder/runtime/community/configure.sh @@ -23,10 +23,11 @@ set -e SOURCES_DIR=/tmp/artifacts mkdir -p "${KOGITO_HOME}"/.m2/repository +mkdir -p "${KOGITO_HOME}/${PROJECT_ARTIFACT_ID}" # Unzip Quarkus app and Maven repository -unzip "${SOURCES_DIR}"/kogito-swf-quarkus-app.zip -d "${KOGITO_HOME}" -unzip "${SOURCES_DIR}"/kogito-swf-maven-repo.zip -d "${KOGITO_HOME}"/.m2/repository +tar xf "${SOURCES_DIR}"/kogito-swf-quarkus-app.tar -C "${KOGITO_HOME}/${PROJECT_ARTIFACT_ID}" +tar xf "${SOURCES_DIR}"/kogito-swf-maven-repo.tar -C "${KOGITO_HOME}"/.m2/repository chown -R 1001:0 "${KOGITO_HOME}" chmod -R ug+rwX "${KOGITO_HOME}" diff --git a/modules/kogito-swf/builder/runtime/community/module.yaml b/modules/kogito-swf/builder/runtime/community/module.yaml index 0a4d41728..4562b12ed 100644 --- a/modules/kogito-swf/builder/runtime/community/module.yaml +++ b/modules/kogito-swf/builder/runtime/community/module.yaml @@ -23,9 +23,9 @@ description: "Kogito Serverless Workflow builder runtime module" artifacts: - image: builder - path: /home/kogito/build_output/kogito-swf-quarkus-app.zip + path: /home/kogito/build_output/kogito-swf-quarkus-app.tar - image: builder - path: /home/kogito/build_output/kogito-swf-maven-repo.zip + path: /home/kogito/build_output/kogito-swf-maven-repo.tar execute: - script: configure.sh diff --git a/modules/kogito-swf/common/build/added/cleanup_project.sh b/modules/kogito-swf/common/build/added/cleanup_project.sh index b3c12a336..adfac1d52 100755 --- a/modules/kogito-swf/common/build/added/cleanup_project.sh +++ b/modules/kogito-swf/common/build/added/cleanup_project.sh @@ -35,4 +35,9 @@ rm -rfv "${PROJECT_ARTIFACT_ID}"/*.bak echo 'Clean Maven useless files' find "${KOGITO_HOME}"/.m2/repository -name _remote.repositories -type f -delete find "${KOGITO_HOME}"/.m2/repository -name _maven.repositories -type f -delete -find "${KOGITO_HOME}"/.m2/repository -name *.lastUpdated -type f -delete \ No newline at end of file +find "${KOGITO_HOME}"/.m2/repository -name *.lastUpdated -type f -delete + +# Remove files that include build timestamps to have reproducible images +find "${KOGITO_HOME}"/.m2/ -name resolver-status.properties -delete +# Remove quarkus registry +rm -rf "${KOGITO_HOME}"/.m2/repository/io/quarkus/registry/ diff --git a/modules/kogito-swf/common/build/added/zip_files.sh b/modules/kogito-swf/common/build/added/zip_files.sh index 31e30ec6f..3e68296ef 100755 --- a/modules/kogito-swf/common/build/added/zip_files.sh +++ b/modules/kogito-swf/common/build/added/zip_files.sh @@ -25,10 +25,10 @@ BUILD_OUTPUT="${KOGITO_HOME}"/build_output/ mkdir -p "${BUILD_OUTPUT}" echo "Zip and copy scaffold project" -zip -r kogito-swf-quarkus-app.zip "${PROJECT_ARTIFACT_ID}"/ -cp -v kogito-swf-quarkus-app.zip "${BUILD_OUTPUT}" +tar cf kogito-swf-quarkus-app.tar -C "${PROJECT_ARTIFACT_ID}" . +cp -v kogito-swf-quarkus-app.tar "${BUILD_OUTPUT}" echo "Zip and copy maven repo" cd "${KOGITO_HOME}"/.m2/repository/ -zip -r kogito-swf-maven-repo.zip * -cp -v kogito-swf-maven-repo.zip "${BUILD_OUTPUT}" \ No newline at end of file +tar cf kogito-swf-maven-repo.tar . +cp -v kogito-swf-maven-repo.tar "${BUILD_OUTPUT}" \ No newline at end of file diff --git a/modules/kogito-swf/common/build/module.yaml b/modules/kogito-swf/common/build/module.yaml index 8f277cd9f..84c1dfbe6 100644 --- a/modules/kogito-swf/common/build/module.yaml +++ b/modules/kogito-swf/common/build/module.yaml @@ -21,9 +21,5 @@ name: org.kie.kogito.swf.common.build version: "999-SNAPSHOT" description: "Kogito Serverless Workflow image build process" -packages: - install: - - zip - execute: - script: configure.sh diff --git a/modules/kogito-swf/common/scripts/added/create-app.sh b/modules/kogito-swf/common/scripts/added/create-app.sh index ad25fb66f..f965d9b78 100755 --- a/modules/kogito-swf/common/scripts/added/create-app.sh +++ b/modules/kogito-swf/common/scripts/added/create-app.sh @@ -130,4 +130,12 @@ fi "${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \ -nsu \ -s "${MAVEN_SETTINGS_PATH}" \ - clean dependency:go-offline io.quarkus.platform:quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":go-offline + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + clean dependency:go-offline io.quarkus.platform:quarkus-maven-plugin:"${QUARKUS_PLATFORM_VERSION}":go-offline install + +# clean up +"${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \ + -nsu \ + -s "${MAVEN_SETTINGS_PATH}" \ + clean diff --git a/modules/kogito-swf/devmode/runtime/community/configure.sh b/modules/kogito-swf/devmode/runtime/community/configure.sh index efe6f6089..7404a5c1e 100644 --- a/modules/kogito-swf/devmode/runtime/community/configure.sh +++ b/modules/kogito-swf/devmode/runtime/community/configure.sh @@ -23,9 +23,12 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SOURCES_DIR=/tmp/artifacts +mkdir -p "${KOGITO_HOME}/${PROJECT_ARTIFACT_ID}" +mkdir -p "${KOGITO_HOME}"/.m2/repository + # Unzip Quarkus app and Maven repository -unzip "${SOURCES_DIR}"/kogito-swf-quarkus-app.zip -d "${KOGITO_HOME}" -unzip "${SOURCES_DIR}"/kogito-swf-maven-repo.zip -d "${KOGITO_HOME}"/.m2/repository +tar xf "${SOURCES_DIR}"/kogito-swf-quarkus-app.tar -C "${KOGITO_HOME}/${PROJECT_ARTIFACT_ID}" +tar xf "${SOURCES_DIR}"/kogito-swf-maven-repo.tar -C "${KOGITO_HOME}"/.m2/repository chown -R 1001:0 "${KOGITO_HOME}" chmod -R ug+rwX "${KOGITO_HOME}" diff --git a/modules/kogito-swf/devmode/runtime/community/module.yaml b/modules/kogito-swf/devmode/runtime/community/module.yaml index c48ec7281..aa0662c64 100644 --- a/modules/kogito-swf/devmode/runtime/community/module.yaml +++ b/modules/kogito-swf/devmode/runtime/community/module.yaml @@ -40,9 +40,9 @@ envs: artifacts: - image: builder - path: /home/kogito/build_output/kogito-swf-quarkus-app.zip + path: /home/kogito/build_output/kogito-swf-quarkus-app.tar - image: builder - path: /home/kogito/build_output/kogito-swf-maven-repo.zip + path: /home/kogito/build_output/kogito-swf-maven-repo.tar execute: - script: configure.sh diff --git a/modules/kogito-system-user/module.yaml b/modules/kogito-system-user/module.yaml index 74788b3e2..75b6ff8ae 100644 --- a/modules/kogito-system-user/module.yaml +++ b/modules/kogito-system-user/module.yaml @@ -26,6 +26,9 @@ execute: envs: - name: "KOGITO_HOME" value: "/home/kogito" + # Force override here since some images depends on OpenJDK, which sets home to /home/jboss. Might be worth removing the kogito user and keep jboss instead. TODO: open an issue to track it and link to Kogito Operator deprecation. + - name: "HOME" + value: "/home/kogito" - name: "USER" value: "kogito" diff --git a/modules/kogito-task-console/configure b/modules/kogito-task-console/configure index 1c6659a10..19b6d5c35 100644 --- a/modules/kogito-task-console/configure +++ b/modules/kogito-task-console/configure @@ -19,11 +19,9 @@ # set -e -SOURCES_DIR=/tmp/artifacts SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added -unzip "${SOURCES_DIR}"/task-console-quarkus-app.zip -d "${KOGITO_HOME}"/bin/ cp -rv "${ADDED_DIR}"/launch/* "${KOGITO_HOME}"/launch/ chown -R 1001:0 "${KOGITO_HOME}" diff --git a/modules/kogito-task-console/module.yaml b/modules/kogito-task-console/module.yaml index 43d5667f0..5f45b4668 100644 --- a/modules/kogito-task-console/module.yaml +++ b/modules/kogito-task-console/module.yaml @@ -23,8 +23,9 @@ version: "999-SNAPSHOT" # see build-kogito-apps-components.sh script, responsible for build it. # called by the Makefile before builds artifacts: - - path: /tmp/build/task-console/task-console-quarkus-app.zip - name: task-console-quarkus-app.zip + - path: /tmp/build/task-console + dest: /home/kogito/bin + name: quarkus-app execute: - script: configure diff --git a/scripts/build-kogito-apps-components.sh b/scripts/build-kogito-apps-components.sh index ddaada7d8..4c80cd6c1 100755 --- a/scripts/build-kogito-apps-components.sh +++ b/scripts/build-kogito-apps-components.sh @@ -116,8 +116,7 @@ for ctx in ${contextDir}; do export YARN_CACHE_FOLDER=/tmp/cache/yarn/${ctx} # Fix for building yarn apps in parallel export CYPRESS_CACHE_FOLDER=/tmp/cache/cypress/${ctx} # https://docs.cypress.io/guides/getting-started/installing-cypress#Advanced eval ${mvn_command} - cd ${ctx}/target/ - zip -r $(basename ${ctx})-quarkus-app.zip quarkus-app - cp -v $(basename ${ctx})-quarkus-app.zip ${target_tmp_dir}/ + cd ${ctx}/target + cp -vr quarkus-app ${target_tmp_dir}/ cd - done diff --git a/tests/features/kogito-swf-builder.feature b/tests/features/kogito-swf-builder.feature index 96c72b707..2f6f0b544 100644 --- a/tests/features/kogito-swf-builder.feature +++ b/tests/features/kogito-swf-builder.feature @@ -14,7 +14,6 @@ Feature: Serverless Workflow builder images | expected_status_code | 200 | And container log should contain --no-transfer-progress And container log should contain -Duser.home=/home/kogito - And container log should match regex Installed features:.*kubernetes And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health @@ -33,7 +32,6 @@ Feature: Serverless Workflow builder images | expected_status_code | 200 | And container log should contain -Duser.home=/home/kogito And container log should contain Extension io.quarkus:quarkus-elytron-security-jdbc has been installed - And container log should match regex Installed features:.*kubernetes And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health diff --git a/tests/features/kogito-swf-devmode.feature b/tests/features/kogito-swf-devmode.feature index 533521167..471d0e943 100644 --- a/tests/features/kogito-swf-devmode.feature +++ b/tests/features/kogito-swf-devmode.feature @@ -15,7 +15,6 @@ Feature: Serverless Workflow devmode images And container log should contain --no-transfer-progress And container log should contain -Duser.home=/home/kogito -o And container log should contain -Dquarkus.test.continuous-testing=disabled - And container log should match regex Installed features:.*kubernetes And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health @@ -55,7 +54,6 @@ Feature: Serverless Workflow devmode images And container log should contain -Duser.home=/home/kogito And container log should not contain /bin/mvn -B -X --batch-mode -o And container log should contain Extension io.quarkus:quarkus-elytron-security-jdbc has been installed - And container log should match regex Installed features:.*kubernetes And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kogito-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health