From feebea2e272bf62ae5fab8e18c98314b1d1240c3 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:40:00 -0300 Subject: [PATCH 1/4] [NO-ISSUE] Remove MongoDB leftovers duo to ASF restrictions (#1732) * Remove MongoDB leftovers duo to ASF restrictions Signed-off-by: Ricardo Zanini * Removing composer references on Infinispan and MongoDB Signed-off-by: Ricardo Zanini * Remove Inifinispan leftovers Signed-off-by: Ricardo Zanini --------- Signed-off-by: Ricardo Zanini --- README.md | 9 ++-- .../container-compose-infinispan.yaml | 46 ---------------- .../container-compose-mongodb.yaml | 54 ------------------- .../jobs-service/infinispan/infinispan.xml | 19 ------- kogito-jobs-service-allinone-image.yaml | 6 +-- .../added/kogito-app-launch.sh | 2 +- .../kogito-jobs-service-all-in-one/configure | 10 ---- .../module.yaml | 4 -- scripts/build-kogito-apps-components.sh | 2 - .../kogito-jobs-service-all-in-one.feature | 36 +------------ 10 files changed, 9 insertions(+), 179 deletions(-) delete mode 100644 contrib/jobs-service/container-compose-infinispan.yaml delete mode 100644 contrib/jobs-service/container-compose-mongodb.yaml delete mode 100644 contrib/jobs-service/infinispan/infinispan.xml diff --git a/README.md b/README.md index 9be81e495..f511a8d40 100644 --- a/README.md +++ b/README.md @@ -615,7 +615,7 @@ Today we have the following Kogito Component Images: The Data Index Service aims at capturing and indexing data produced by one more Kogito runtime services. For more information please visit this (link)(https://docs.jboss.org/kogito/release/latest/html_single/#proc-kogito-travel-agency-enable-data-index_kogito-deploying-on-openshift). -The Data Index Service depends on a running Infinispan, MongoDB or PostgreSQL. +The Data Index Service depends on a PostgreSQL instance. The Persistence service can be switched by using its corresponding image - Ephemeral PostgreSQL: quay.io/kiegroup/kogito-data-index-ephemeral @@ -639,7 +639,7 @@ $ docker run -it --env QUARKUS_DATASOURCE_JDBC_URL="jdbc:postgresql://localhost: To enable debug just use this env while running this image: ```bash -$ docker run -it --env SCRIPT_DEBUG=true --env QUARKUS_INFINISPAN_CLIENT_HOSTS=my-infinispan-server:11222 quay.io/kiegroup/kogito-data-index-postgresql:latest +$ docker run -it --env SCRIPT_DEBUG=true quay.io/kiegroup/kogito-data-index-postgresql:latest ``` You should notice a few debug messages present in the system output. @@ -675,16 +675,13 @@ docker run -it --env SCRIPT_DEBUG=true quay.io/kiegroup/kogito-jobs-service-post You should notice a few debug messages being printed in the system output. The ephemeral image does not have external dependencies like a backend persistence provider, it uses in-memory persistence -while working with Jobs Services `allinone`, `infinispan`, `mongodb` and `postgresql` variants, it will need to -have an Infinispan, MongoDB or PostgreSQL server, respectively, previously running. +while working with Jobs Services `postgresql` variant, it will need to have a PostgreSQL server previously running. #### Jobs Services All-in-one The Jobs Services All in One image provides the option to run any supported variant that we have at disposal, which are: - PostgreSQL -- Infinispan -- MongoDB - Ephemeral (default if no variant is specified) There are 3 exposed environment variables that can be used to configure the behaviour, which are: diff --git a/contrib/jobs-service/container-compose-infinispan.yaml b/contrib/jobs-service/container-compose-infinispan.yaml deleted file mode 100644 index 0ecfb2b31..000000000 --- a/contrib/jobs-service/container-compose-infinispan.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# -# 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. -# -services: - infinispan: - image: infinispan/server:14.0.4.Final - container_name: infinispan - ports: - - "11222:11222" - command: "-c infinispan-demo.xml" - volumes: - - ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:11222/rest/v2/cache-managers/default/health/status" ] - interval: 1s - timeout: 1s - retries: 50 - - jobs-service-all-in-one: - image: quay.io/kiegroup/kogito-jobs-service-allinone:latest - container_name: jobs-service - ports: - - "8080:8080" - depends_on: - infinispan: - condition: service_healthy - environment: - JOBS_SERVICE_PERSISTENCE: infinispan - KOGITO_JOBS_SERVICE_KNATIVE_EVENTS: "false" - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" \ No newline at end of file diff --git a/contrib/jobs-service/container-compose-mongodb.yaml b/contrib/jobs-service/container-compose-mongodb.yaml deleted file mode 100644 index 531d42554..000000000 --- a/contrib/jobs-service/container-compose-mongodb.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# -# 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. -# -services: - mongo: - image: mongo - container_name: mongo - restart: always - environment: - MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: example - - mongo-express: - image: mongo-express - container_name: mongo-express - restart: always - ports: - - 8081:8081 - environment: - ME_CONFIG_MONGODB_ADMINUSERNAME: root - ME_CONFIG_MONGODB_ADMINPASSWORD: example - ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/ - - jobs-service-all-in-one: - image: quay.io/kiegroup/kogito-jobs-service-allinone:latest - container_name: jobs-service - ports: - - "8080:8080" - depends_on: - - mongo - environment: - JOBS_SERVICE_PERSISTENCE: mongodb - QUARKUS_MONGODB_CONNECTION_STRING: mongodb://mongo:27017 - QUARKUS_MONGODB_DATABASE: kogito - MONGODB_HOST: mongodb:27017 - QUARKUS_MONGODB_CREDENTIALS_USERNAME: root - QUARKUS_MONGODB_CREDENTIALS_PASSWORD: example - QUARKUS_MONGODB_CREDENTIALS_AUTH_SOURCE: admin - KOGITO_JOBS_SERVICE_KNATIVE_EVENTS: "false" \ No newline at end of file diff --git a/contrib/jobs-service/infinispan/infinispan.xml b/contrib/jobs-service/infinispan/infinispan.xml deleted file mode 100644 index 726675509..000000000 --- a/contrib/jobs-service/infinispan/infinispan.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kogito-jobs-service-allinone-image.yaml b/kogito-jobs-service-allinone-image.yaml index 6765bdaae..0db23c680 100644 --- a/kogito-jobs-service-allinone-image.yaml +++ b/kogito-jobs-service-allinone-image.yaml @@ -33,7 +33,7 @@ labels: - name: "io.k8s.display-name" value: "Kogito Jobs Service All-in-One" - name: "io.openshift.tags" - value: "kogito,jobs-service,postgresql,mongodb,infinispan,ephemeral" + value: "kogito,jobs-service,postgresql,ephemeral" - name: "io.openshift.expose-services" value: "8080:http" @@ -45,8 +45,8 @@ 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." - name: "JOBS_SERVICE_PERSISTENCE" - example: "mongodb" - description: "The all in one image contains all the supported jdbc plugins for Jobs Service, ephemeral, postgresql, mongodb and infinispan, if empty, defaults to ephemeral" + 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 diff --git a/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh b/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh index 750845d0f..43fc15e1c 100644 --- a/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh +++ b/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh @@ -30,7 +30,7 @@ if [ "${SCRIPT_DEBUG}" = "true" ] ; then printenv fi -allowed_jobs_service_flavors=("ephemeral" "mongodb" "infinispan" "postgresql") +allowed_jobs_service_flavors=("ephemeral" "postgresql") jobs_service_flavor="ephemeral" if [[ ! "${allowed_jobs_service_flavors[*]}" =~ ${JOBS_SERVICE_PERSISTENCE,,} ]]; then log_warning "${JOBS_SERVICE_PERSISTENCE,,} is not supported, the allowed flavors are [${allowed_jobs_service_flavors[*]}], defaulting to ${jobs_service_flavor}" diff --git a/modules/kogito-jobs-service-all-in-one/configure b/modules/kogito-jobs-service-all-in-one/configure index d77d57dcc..6777f4806 100644 --- a/modules/kogito-jobs-service-all-in-one/configure +++ b/modules/kogito-jobs-service-all-in-one/configure @@ -24,8 +24,6 @@ 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-infinispan-quarkus-app.zip -d "${KOGITO_HOME}"/bin/infinispan -unzip "${SOURCES_DIR}"/jobs-service-mongodb-quarkus-app.zip -d "${KOGITO_HOME}"/bin/mongodb unzip "${SOURCES_DIR}"/jobs-service-postgresql-quarkus-app.zip -d "${KOGITO_HOME}"/bin/postgresql @@ -35,14 +33,6 @@ mv "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared- rm -rf "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib ln -s "${KOGITO_HOME}"/bin/shared-libs "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib -cp -r "${KOGITO_HOME}"/bin/infinispan/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared-libs/ -rm -rf "${KOGITO_HOME}"/bin/infinispan/quarkus-app/lib -ln -s "${KOGITO_HOME}"/bin/shared-libs "${KOGITO_HOME}"/bin/infinispan/quarkus-app/lib - -cp -r "${KOGITO_HOME}"/bin/mongodb/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared-libs/ -rm -rf "${KOGITO_HOME}"/bin/mongodb/quarkus-app/lib -ln -s "${KOGITO_HOME}"/bin/shared-libs "${KOGITO_HOME}"/bin/mongodb/quarkus-app/lib - cp -r "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared-libs/ rm -rf "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib ln -s "${KOGITO_HOME}"/bin/shared-libs "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib diff --git a/modules/kogito-jobs-service-all-in-one/module.yaml b/modules/kogito-jobs-service-all-in-one/module.yaml index 0886aa3ff..aa890d326 100644 --- a/modules/kogito-jobs-service-all-in-one/module.yaml +++ b/modules/kogito-jobs-service-all-in-one/module.yaml @@ -23,10 +23,6 @@ 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-mongodb-all-in-one/jobs-service-mongodb-quarkus-app.zip - name: jobs-service-mongodb-quarkus-app.zip - - path: /tmp/build/jobs-service-infinispan-all-in-one/jobs-service-infinispan-quarkus-app.zip - name: jobs-service-infinispan-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 diff --git a/scripts/build-kogito-apps-components.sh b/scripts/build-kogito-apps-components.sh index 24f7187da..ddaada7d8 100755 --- a/scripts/build-kogito-apps-components.sh +++ b/scripts/build-kogito-apps-components.sh @@ -72,9 +72,7 @@ case ${imageName} in "kogito-jobs-service-allinone") extended_context="-all-in-one" contextDir="jobs-service/jobs-service-inmemory" - contextDir="${contextDir} jobs-service/jobs-service-infinispan" contextDir="${contextDir} jobs-service/jobs-service-postgresql" - contextDir="${contextDir} jobs-service/jobs-service-mongodb" ;; "kogito-jit-runner") contextDir="jitexecutor/jitexecutor-runner" diff --git a/tests/features/jobs-service/kogito-jobs-service-all-in-one.feature b/tests/features/jobs-service/kogito-jobs-service-all-in-one.feature index 636c458fb..395415190 100644 --- a/tests/features/jobs-service/kogito-jobs-service-all-in-one.feature +++ b/tests/features/jobs-service/kogito-jobs-service-all-in-one.feature @@ -7,14 +7,12 @@ Feature: Kogito-jobs-service-all-in-one feature. And the image should contain label io.openshift.expose-services with value 8080:http And the image should contain label io.k8s.description with value Runtime image for Kogito Jobs Service with all available jdbc providers And the image should contain label io.k8s.display-name with value Kogito Jobs Service All-in-One - And the image should contain label io.openshift.tags with value kogito,jobs-service,postgresql,mongodb,infinispan,ephemeral + And the image should contain label io.openshift.tags with value kogito,jobs-service,postgresql,ephemeral Scenario: Verify if all jobs-service flavors are in the image When container is started with command bash Then file /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar should exist - And file /home/kogito/bin/infinispan/quarkus-app/quarkus-run.jar should exist And file /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar should exist - And file /home/kogito/bin/mongodb/quarkus-app/quarkus-run.jar should exist Scenario: Verify if the debug is correctly enabled with the ephemeral jar When container is started with env @@ -24,43 +22,13 @@ Feature: Kogito-jobs-service-all-in-one feature. And container log should contain started in And container log should not contain Application failed to start - Scenario: Infinispan - verify if auth is correctly set - When container is started with env - | variable | value | - | SCRIPT_DEBUG | true | - | JOBS_SERVICE_PERSISTENCE | infinispan | - | QUARKUS_INFINISPAN_CLIENT_HOSTS | 172.18.0.1:11222 | - | QUARKUS_INFINISPAN_CLIENT_USE_AUTH | true | - | QUARKUS_INFINISPAN_CLIENT_USERNAME | IamNotExist | - | QUARKUS_INFINISPAN_CLIENT_PASSWORD | hard2guess | - | QUARKUS_INFINISPAN_CLIENT_AUTH_REALM | SecretRealm | - | QUARKUS_INFINISPAN_CLIENT_SASL_MECHANISM | COOLGSSAPI | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/infinispan/quarkus-app/quarkus-run.jar - And container log should contain QUARKUS_INFINISPAN_CLIENT_HOSTS=172.18.0.1:11222 - And container log should contain QUARKUS_INFINISPAN_CLIENT_USE_AUTH=true - And container log should contain QUARKUS_INFINISPAN_CLIENT_PASSWORD=hard2guess - And container log should contain QUARKUS_INFINISPAN_CLIENT_USERNAME=IamNotExist - And container log should contain QUARKUS_INFINISPAN_CLIENT_AUTH_REALM=SecretReal - And container log should contain QUARKUS_INFINISPAN_CLIENT_SASL_MECHANISM=COOLGSSAPI - And container log should not contain Application failed to start - - Scenario: verify if the container is correctly started with mongo parameters - When container is started with env - | variable | value | - | SCRIPT_DEBUG | true | - | JOBS_SERVICE_PERSISTENCE | mongodb | - | QUARKUS_MONGODB_CONNECTION_STRING | mongodb://user:password@localhost:27017/admin | - | QUARKUS_MONGODB_DATABASE | kogito | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/mongodb/quarkus-app/quarkus-run.jar - And container log should not contain Application failed to start - Scenario: verify if the container is started with invalid jobs-service flavor When container is started with env | variable | value | | SCRIPT_DEBUG | true | | JOBS_SERVICE_PERSISTENCE | something | Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar - And container log should contain something is not supported, the allowed flavors are [ephemeral mongodb infinispan postgresql], defaulting to ephemeral + And container log should contain something is not supported, the allowed flavors are [ephemeral postgresql], defaulting to ephemeral Scenario: verify if container starts as expected When container is started with env From e8c7b7b45548634d7500b572e95251bea1cf26c6 Mon Sep 17 00:00:00 2001 From: Roberto Oliveira Date: Mon, 22 Jan 2024 08:25:23 +0100 Subject: [PATCH 2/4] NO-ISSUE: drop scripts/logic folder as it is deprecated (#1733) --- scripts/logic/build-quarkus-app.sh | 213 ---------------------- scripts/logic/builder-maven-repo/pom.xml | 40 ---- scripts/logic/builder-quarkus-app/pom.xml | 40 ---- scripts/logic/devmode-maven-repo/pom.xml | 40 ---- scripts/logic/devmode-quarkus-app/pom.xml | 40 ---- scripts/logic/pom.xml | 85 --------- scripts/logic/test/behave_test.sh | 28 --- scripts/logic/test/env_test.sh | 34 ---- scripts/logic/test/shell_test.sh | 28 --- 9 files changed, 548 deletions(-) delete mode 100755 scripts/logic/build-quarkus-app.sh delete mode 100644 scripts/logic/builder-maven-repo/pom.xml delete mode 100644 scripts/logic/builder-quarkus-app/pom.xml delete mode 100644 scripts/logic/devmode-maven-repo/pom.xml delete mode 100644 scripts/logic/devmode-quarkus-app/pom.xml delete mode 100644 scripts/logic/pom.xml delete mode 100755 scripts/logic/test/behave_test.sh delete mode 100755 scripts/logic/test/env_test.sh delete mode 100755 scripts/logic/test/shell_test.sh diff --git a/scripts/logic/build-quarkus-app.sh b/scripts/logic/build-quarkus-app.sh deleted file mode 100755 index 93fb0a440..000000000 --- a/scripts/logic/build-quarkus-app.sh +++ /dev/null @@ -1,213 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -# Parameters: -# 1 - Image name -# 2 - Quarkus platform group id -# 3 - Quarkus platform version -# 4 - Kogito version -# Note that all parameters are required and can't be empty - -# fast fail -set -e -set -o pipefail - -# Read entries before sourcing -image_name="${1}" -quarkus_platform_groupid="${2}" -quarkus_platform_version="${3}" -kogito_version="${KOGITO_VERSION:-${4}}" - -# GAV of maven plugins to be injected in the plugin management section -maven_plugins_gav=("org.apache.maven.plugins:maven-resources-plugin:3.3.1" "org.apache.maven.plugins:maven-install-plugin:3.1.1" "org.apache.maven.plugins:maven-jar-plugin:3.3.0" "org.apache.maven.plugins:maven-clean-plugin:3.3.1") - -# Properties to be replaced in the pom by the new versions -properties_with_versions=("compiler-plugin.version:3.11.0" "surefire-plugin.version:3.1.2") - -# arch specific dependencies -quarkus_extensions_arch_specific="com.aayushatharva.brotli4j:native-linux-aarch64:1.8.0" -# common extensions used by the kogito-swf-builder and kogito-swf-devmode -quarkus_extensions="quarkus-kubernetes,smallrye-health,org.kie.kogito:kogito-quarkus-serverless-workflow:${kogito_version},org.kie.kogito:kogito-addons-quarkus-knative-eventing:${kogito_version},org.kie.kogito:kogito-addons-quarkus-microprofile-config-service-catalog:${kogito_version},org.kie.kogito:kogito-addons-quarkus-kubernetes:${kogito_version},org.kie.kogito:kogito-addons-quarkus-knative-serving:${kogito_version}" -# dev mode purpose extensions used only by the kogito-swf-devmode -kogito_swf_devmode_extensions="org.kie.kogito:kogito-quarkus-serverless-workflow-devui:${kogito_version},org.kie.kogito:kogito-addons-quarkus-source-files:${kogito_version},org.kie.kogito:kogito-addons-quarkus-process-management:${kogito_version},org.kie.kogito:kogito-addons-quarkus-jobs-service-embedded:${kogito_version},org.kie.kogito:kogito-addons-quarkus-data-index-inmemory:${kogito_version}" -# builder/prod extensitons used only by the kogito-swf-builder -kogito_swf_builder_extensions="org.kie.kogito:kogito-addons-quarkus-events-process:${kogito_version},org.kie.kogito:kogito-addons-quarkus-process-management:${kogito_version},org.kie.kogito:kogito-addons-quarkus-source-files:${kogito_version}" - -if [ -z ${quarkus_platform_version} ]; then - echo "Please provide the quarkus version" - exit 1 -fi - -case ${image_name} in - "kogito-swf-builder") - quarkus_extensions="${quarkus_extensions},${kogito_swf_builder_extensions},${quarkus_extensions_arch_specific}" - ;; - "kogito-swf-devmode") - quarkus_extensions="${quarkus_extensions},${kogito_swf_devmode_extensions},${quarkus_extensions_arch_specific}" - ;; - *) - echo "${image_name} is not a quarkus app image, exiting..." - exit 0 - ;; -esac - - -target_tmp_dir="/tmp/build/${image_name}" -build_target_dir="/tmp/${image_name}" -mvn_local_repo="/tmp/temp_maven/${image_name}" - -rm -rf ${target_tmp_dir} && mkdir -p ${target_tmp_dir} -rm -rf ${build_target_dir} && mkdir -p ${build_target_dir} -if [ "${CI}" = "true" ]; then - # On CI we want to make sure we remove all artifacts from maven repo - rm -rf ${mvn_local_repo} -fi -mkdir -p ${mvn_local_repo} - -if [ "${NIGHTLY}" = "true" ]; then - # In case of a nightly, the Kogito/Drools artifacts are not deployed anywhere, so they need to be copied - # inside the maven repo local folder - cp -rp ${NIGHTLY_DEPLOY_FOLDER}/* ${mvn_local_repo} -fi - -set -x -echo "Create quarkus project to path ${build_target_dir}" -cd ${build_target_dir} -mvn ${MAVEN_OPTIONS} \ - -Dmaven.repo.local=${mvn_local_repo} \ - -DprojectGroupId="org.acme" \ - -DprojectArtifactId="serverless-workflow-project" \ - -DprojectVersionId="1.0.0-SNAPSHOT" \ - -DplatformVersion="${quarkus_platform_version}" \ - -Dextensions="${quarkus_extensions}" \ - "${quarkus_platform_groupid}":quarkus-maven-plugin:"${quarkus_platform_version}":create - -# Fix as we cannot rely on Quarkus platform -# Should be removed once https://issues.redhat.com/browse/KOGITO-9120 is implemented -if [ ! -z ${kogito_version} ]; then - echo "Replacing Kogito Platform BOM with version ${kogito_version}" - # [ ]* -> is a regexp pattern to match any number of spaces - pattern_1="[ ]*.*<\/groupId>" - pattern_2="[ ]*quarkus-kogito-bom<\/artifactId>\n" - pattern_3="[ ]*.*<\/version>\n" - complete_pattern="$pattern_1\n$pattern_2$pattern_3" - - replace_1=" org.kie.kogito<\/groupId>\n" - replace_2=" kogito-bom<\/artifactId>\n" - replace_3=" ${kogito_version}<\/version>\n" - complete_replace="$replace_1$replace_2$replace_3" - - sed -i.bak -e "/$pattern_1/{ - N;N;N - s/$complete_pattern/$complete_replace/ - }" serverless-workflow-project/pom.xml -fi - - -# Inject empty plugin management section if not present in the pom.xml -if ! grep -q "" "serverless-workflow-project/pom.xml"; then - echo "Injecting empty plugin Management section as it does not exist in pom" - pattern_1="[ ]*" - complete_pattern="$pattern_1" - - replace_1=" <\build>\n" - replace_2=" \n" - replace_3=" \n" - replace_4=" <\/plugins>\n" - replace_5=" <\/pluginManagement>" - complete_replace="$replace_1$replace_2$replace_3$replace_4$replace_5" - - sed -i.bak -e "/$pattern_1/{ - N;N;N - s/$complete_pattern/$complete_replace/ - }" serverless-workflow-project/pom.xml -fi - -# Inject maven plugins into plugin management section -for gav in ${maven_plugins_gav[@]}; do - group_id=$(echo $gav | cut -f1 -d:) - artifact_id=$(echo $gav | cut -f2 -d:) - version=$(echo $gav | cut -f3 -d:) - - echo "Injecting ${gav} in plugin management section" - pattern_1="[ ]*" - pattern_2="[ ]*" - complete_pattern="$pattern_1\n$pattern_2" - - replace_1=" \n" - replace_2=" \n" - replace_3=" \n" - replace_4=" ${group_id}<\/groupId>\n" - replace_5=" ${artifact_id}<\/artifactId>\n" - replace_6=" ${version}<\/version>\n" - replace_7=" <\/plugin>" - complete_replace="$replace_1$replace_2$replace_3$replace_4$replace_5$replace_6$replace_7" - - sed -i.bak -e "/$pattern_1/{ - N;N;N - s/$complete_pattern/$complete_replace/ - }" serverless-workflow-project/pom.xml -done - -# Replace properties values by new values -for property_with_version in ${properties_with_versions[@]}; do - property=$(echo $property_with_version | cut -f1 -d:) - new_version=$(echo $property_with_version | cut -f2 -d:) - - echo "Replacing property ${property} with value ${new_version}" - complete_pattern="[ ]*<${property}>.*<\/${property}>" - complete_replace=" <${property}>${new_version}<\/${property}>" - sed -i.bak "s/$complete_pattern/$complete_replace/g" serverless-workflow-project/pom.xml -done - -echo "Build quarkus app" -cd "serverless-workflow-project" -# Quarkus version is enforced if some dependency pulled has older version of Quarkus set. -# This avoids to have, for example, Quarkus BOMs or other artifacts with multiple versions. -mvn ${MAVEN_OPTIONS} \ - -DskipTests \ - -Dmaven.repo.local=${mvn_local_repo} \ - -Dquarkus.container-image.build=false \ - clean install - -cd ${build_target_dir} - -#remove unnecessary files -rm -rfv serverless-workflow-project/target -rm -rfv serverless-workflow-project/src/main/resources/* -rm -rfv serverless-workflow-project/src/main/docker -rm -rfv serverless-workflow-project/.mvn/wrapper -rm -rfv serverless-workflow-project/mvnw* -rm -rfv serverless-workflow-project/src/test -rm -rfv serverless-workflow-project/*.bak - -# Maven useless files -# Needed to avoid Maven to automatically re-download from original Maven repository ... -find ${mvn_local_repo} -name _remote.repositories -type f -delete -find ${mvn_local_repo} -name _maven.repositories -type f -delete -find ${mvn_local_repo} -name *.lastUpdated -type f -delete - -echo "Zip and copy scaffold project" -zip -r ${image_name}-quarkus-app.zip serverless-workflow-project/ -cp -v ${image_name}-quarkus-app.zip ${target_tmp_dir}/ -echo "Zip and copy maven repo" -cd ${mvn_local_repo} -zip -r ${image_name}-maven-repo.zip * -cp -v ${image_name}-maven-repo.zip ${target_tmp_dir}/ \ No newline at end of file diff --git a/scripts/logic/builder-maven-repo/pom.xml b/scripts/logic/builder-maven-repo/pom.xml deleted file mode 100644 index 6f3297af4..000000000 --- a/scripts/logic/builder-maven-repo/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - 4.0.0 - - - org.kie.kogito - kogito-image-build-artifacts-parent - 999-SNAPSHOT - - - kogito-builder-maven-repository - Kogito Builder Quarkus App - Maven repository zip - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - /tmp/build/${build.quarkusapp.argument.imagename.builder}/${build.quarkusapp.argument.imagename.builder}-maven-repo.zip - zip - image-build - - - - - - - - - \ No newline at end of file diff --git a/scripts/logic/builder-quarkus-app/pom.xml b/scripts/logic/builder-quarkus-app/pom.xml deleted file mode 100644 index 20158d3c5..000000000 --- a/scripts/logic/builder-quarkus-app/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - 4.0.0 - - - org.kie.kogito - kogito-image-build-artifacts-parent - 999-SNAPSHOT - - - kogito-builder-quarkus-app - Kogito Builder Quarkus App - Quarkus app zip - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - /tmp/build/${build.quarkusapp.argument.imagename.builder}/${build.quarkusapp.argument.imagename.builder}-quarkus-app.zip - zip - image-build - - - - - - - - - \ No newline at end of file diff --git a/scripts/logic/devmode-maven-repo/pom.xml b/scripts/logic/devmode-maven-repo/pom.xml deleted file mode 100644 index 287e8d24b..000000000 --- a/scripts/logic/devmode-maven-repo/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - 4.0.0 - - - org.kie.kogito - kogito-image-build-artifacts-parent - 999-SNAPSHOT - - - kogito-devmode-maven-repository - Kogito Dev Mode Quarkus App - Maven repository zip - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - /tmp/build/${build.quarkusapp.argument.imagename.devmode}/${build.quarkusapp.argument.imagename.devmode}-maven-repo.zip - zip - image-build - - - - - - - - - \ No newline at end of file diff --git a/scripts/logic/devmode-quarkus-app/pom.xml b/scripts/logic/devmode-quarkus-app/pom.xml deleted file mode 100644 index 098ccfc02..000000000 --- a/scripts/logic/devmode-quarkus-app/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - 4.0.0 - - - org.kie.kogito - kogito-image-build-artifacts-parent - 999-SNAPSHOT - - - kogito-devmode-quarkus-app - Kogito Dev Mode Quarkus App - Quarkus app zip - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - /tmp/build/${build.quarkusapp.argument.imagename.devmode}/${build.quarkusapp.argument.imagename.devmode}-quarkus-app.zip - zip - image-build - - - - - - - - - \ No newline at end of file diff --git a/scripts/logic/pom.xml b/scripts/logic/pom.xml deleted file mode 100644 index 0588d4c60..000000000 --- a/scripts/logic/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - 4.0.0 - - org.kie.kogito - kogito-image-build-artifacts-parent - 999-SNAPSHOT - - Kogito image build artifacts - Maven project to build a Quarkus App with Kogito Serverless Worflow - pom - - http://kogito.kie.org - 2019 - - JBoss by Red Hat - http://www.jboss.org/ - - - - - Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - kogito-swf-devmode - kogito-swf-builder - io.quarkus.platform - 2.16.7.Final - 1.40.0.Final - - - - devmode-quarkus-app - devmode-maven-repo - builder-quarkus-app - builder-maven-repo - - - - - - org.codehaus.mojo - exec-maven-plugin - false - - - devmode-quarkus-app - compile - - exec - - - ${project.basedir}/build-quarkus-app.sh - - ${build.quarkusapp.argument.imagename.devmode} - ${build.quarkusapp.argument.quarkusplatform.groupid} - ${build.quarkusapp.argument.quarkusplatform.version} - ${build.quarkusapp.argument.kogitoversion} - - - - - builder-quarkus-app - compile - - exec - - - ${project.basedir}/build-quarkus-app.sh - - ${build.quarkusapp.argument.imagename.builder} - ${build.quarkusapp.argument.quarkusplatform.groupid} - ${build.quarkusapp.argument.quarkusplatform.version} - ${build.quarkusapp.argument.kogitoversion} - - - - - - - - \ No newline at end of file diff --git a/scripts/logic/test/behave_test.sh b/scripts/logic/test/behave_test.sh deleted file mode 100755 index f4eec48b8..000000000 --- a/scripts/logic/test/behave_test.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# 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. -# - -script_dir_path="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" -source ${script_dir_path}/env_test.sh $@ - -echo "---- Pulling image ${image_full_tag} ----" -docker pull ${image_full_tag} - -echo "---- Run behave test for image ${image_id} ----" -cekit --descriptor ${image_descriptor_filename} test --image ${image_full_tag} behave diff --git a/scripts/logic/test/env_test.sh b/scripts/logic/test/env_test.sh deleted file mode 100755 index a830d1d00..000000000 --- a/scripts/logic/test/env_test.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# 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. -# - -export image_id=$1 -export image_full_tag=$2 - -export image_full_name=${image_full_tag%%:*} -export image_full_name=${image_full_name%%@sha256*} # Remove `@sha256` if needed -export image_registry_name=${image_full_name%/*} -export image_name=${image_full_name##*/} -export image_registry=${image_registry_name%/*} -export image_namespace=${image_registry_name##*/} - -export image_descriptor_filename=${image_id}-image.yaml - -export community_image_id=${image_id/logic-/kogito-} -export community_image_id=${community_image_id/-rhel8/} diff --git a/scripts/logic/test/shell_test.sh b/scripts/logic/test/shell_test.sh deleted file mode 100755 index dff8a2839..000000000 --- a/scripts/logic/test/shell_test.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# 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. -# - -script_dir_path="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" -source ${script_dir_path}/env_test.sh $@ - -echo "---- Pulling image ${image_full_tag} ----" -docker pull ${image_full_tag} - -echo "---- Run jBang test for image ${image_id} ----" -tests/shell/run.sh ${community_image_id} ${image_full_tag} From bed894802de58a0e1098cb0a730e0791cf0a325d Mon Sep 17 00:00:00 2001 From: Walter Medvedeo Date: Mon, 22 Jan 2024 15:15:19 +0100 Subject: [PATCH 3/4] kie-kogito-images-1735: Add the kogito-addons-quarkus-jobs-knative-eventing addon to the swf-builder images (#1736) --- modules/kogito-swf/builder/build-config/module.yaml | 2 +- tests/shell/kogito-swf-builder/src/RunTests.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/kogito-swf/builder/build-config/module.yaml b/modules/kogito-swf/builder/build-config/module.yaml index 79fac6fe4..b3563932c 100644 --- a/modules/kogito-swf/builder/build-config/module.yaml +++ b/modules/kogito-swf/builder/build-config/module.yaml @@ -27,4 +27,4 @@ envs: - name: QUARKUS_EXTENSIONS # NOTE: If you change the QUARKUS_EXTENSIONS value remember to update the scripts/logic/build-quarkus-app.sh too! # Follow up issue to remove KOGITO_VERSION: https://issues.redhat.com/browse/KOGITO-9270 - value: quarkus-kubernetes,smallrye-health,org.kie.kogito:kogito-quarkus-serverless-workflow:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-eventing:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-events-process:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-process-management:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-source-files:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION} + value: quarkus-kubernetes,smallrye-health,org.kie.kogito:kogito-quarkus-serverless-workflow:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-eventing:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-events-process:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-process-management:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-source-files:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:${KOGITO_VERSION} diff --git a/tests/shell/kogito-swf-builder/src/RunTests.java b/tests/shell/kogito-swf-builder/src/RunTests.java index 3cccdd702..2ec43afad 100644 --- a/tests/shell/kogito-swf-builder/src/RunTests.java +++ b/tests/shell/kogito-swf-builder/src/RunTests.java @@ -65,6 +65,7 @@ public class RunTests { .withDockerfile(Paths.get(getScriptDirPath(), "resources/greet", "Dockerfile")) .withBuildArg("BUILDER_IMAGE_TAG", getTestImage())) .withExposedPorts(8080) + .withEnv("KOGITO_SERVICE_URL", "http://localhost:8080") .waitingFor(Wait.forHttp("/jsongreet")) .withLogConsumer(logConsumer); @@ -93,6 +94,7 @@ public void testBuiltContainerAnswerCorrectly() throws URISyntaxException, IOExc "resources/greet-with-inputschema", "Dockerfile")) .withBuildArg("BUILDER_IMAGE_TAG", getTestImage())) .withExposedPorts(8080) + .withEnv("KOGITO_SERVICE_URL", "http://localhost:8080") .waitingFor(Wait.forHttp("/greeting")) .withLogConsumer(logConsumer); From 4eb5fdd6b47a5edd4c5bdc1be714a0554fb3db5a Mon Sep 17 00:00:00 2001 From: Roberto Oliveira Date: Tue, 23 Jan 2024 18:28:24 +0100 Subject: [PATCH 4/4] NO-ISSUE: remove deprecated prod modules (#1737) --- .../prod/added/kogito-app-launch.sh | 50 ------------------- .../prod/configure | 31 ------------ .../prod/module.yaml | 34 ------------- .../builder/runtime/osl/configure.sh | 32 ------------ .../builder/runtime/osl/module.yaml | 33 ------------ .../devmode/runtime/osl/configure.sh | 31 ------------ .../devmode/runtime/osl/module.yaml | 50 ------------------- 7 files changed, 261 deletions(-) delete mode 100644 modules/kogito-data-index-ephemeral/prod/added/kogito-app-launch.sh delete mode 100644 modules/kogito-data-index-ephemeral/prod/configure delete mode 100644 modules/kogito-data-index-ephemeral/prod/module.yaml delete mode 100644 modules/kogito-swf/builder/runtime/osl/configure.sh delete mode 100644 modules/kogito-swf/builder/runtime/osl/module.yaml delete mode 100644 modules/kogito-swf/devmode/runtime/osl/configure.sh delete mode 100644 modules/kogito-swf/devmode/runtime/osl/module.yaml diff --git a/modules/kogito-data-index-ephemeral/prod/added/kogito-app-launch.sh b/modules/kogito-data-index-ephemeral/prod/added/kogito-app-launch.sh deleted file mode 100644 index aa15cda21..000000000 --- a/modules/kogito-data-index-ephemeral/prod/added/kogito-app-launch.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - - -#import -source "${KOGITO_HOME}"/launch/logging.sh - -if [ "${SCRIPT_DEBUG}" = "true" ] ; then - set -x - SHOW_JVM_SETTINGS="-XshowSettings:properties" - log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed" - log_info "JVM settings debug is enabled." - printenv -fi - -# Configuration scripts -# Any configuration script that needs to run on image startup must be added here. -CONFIGURE_SCRIPTS=( - "${KOGITO_HOME}"/launch/kogito-data-index-common.sh - "${KOGITO_HOME}"/launch/configure-custom-truststore.sh -) -source "${KOGITO_HOME}"/launch/configure.sh -############################################# - -DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)" - -# shellcheck disable=SC2086 -exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_DATA_INDEX_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Djava.library.path="${KOGITO_HOME}"/lib \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar - diff --git a/modules/kogito-data-index-ephemeral/prod/configure b/modules/kogito-data-index-ephemeral/prod/configure deleted file mode 100644 index d24e68683..000000000 --- a/modules/kogito-data-index-ephemeral/prod/configure +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# 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. -# -set -e - -SOURCES_DIR=/tmp/artifacts -SCRIPT_DIR=$(dirname "${0}") -ADDED_DIR="${SCRIPT_DIR}"/added - -mkdir -p "${KOGITO_HOME}"/bin/quarkus-app -unzip "${SOURCES_DIR}"/data-index-service-inmemory-image-build.zip -d "${KOGITO_HOME}"/bin/quarkus-app/ - -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/prod/module.yaml b/modules/kogito-data-index-ephemeral/prod/module.yaml deleted file mode 100644 index f0c0a8ddc..000000000 --- a/modules/kogito-data-index-ephemeral/prod/module.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# -# 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. -# -schema_version: 1 -name: org.kie.kogito.dataindex.prod.ephemeral -version: "1.30.0" - -artifacts: - # data-index-service-inmemory-1.24.0.Final-redhat-00011-image-build.zip -- name: data-index-service-inmemory-image-build.zip - md5: 439ecd6255b9c204e3808e5a35a58463 - -execute: - - script: configure - -packages: - install: - - pam - diff --git a/modules/kogito-swf/builder/runtime/osl/configure.sh b/modules/kogito-swf/builder/runtime/osl/configure.sh deleted file mode 100644 index 70c258fa6..000000000 --- a/modules/kogito-swf/builder/runtime/osl/configure.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -set -e - -SOURCES_DIR=/tmp/artifacts - -mkdir -p "${KOGITO_HOME}"/.m2/repository - -# Unzip Quarkus app and Maven repository -unzip "${SOURCES_DIR}"/kogito-builder-quarkus-app-image-build.zip -d "${KOGITO_HOME}" -unzip "${SOURCES_DIR}"/kogito-builder-maven-repository-image-build.zip -d "${KOGITO_HOME}"/.m2/repository - -chown -R 1001:0 "${KOGITO_HOME}" -chmod -R ug+rwX "${KOGITO_HOME}" diff --git a/modules/kogito-swf/builder/runtime/osl/module.yaml b/modules/kogito-swf/builder/runtime/osl/module.yaml deleted file mode 100644 index b126715ce..000000000 --- a/modules/kogito-swf/builder/runtime/osl/module.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# -# 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. -# -schema_version: 1 -name: org.kie.kogito.swf.builder.runtime.osl -version: "1.30.0" -description: "OpenShift Serverless Logic builder module with required extensions" - -artifacts: - - name: kogito-builder-quarkus-app-image-build.zip - # kogito-builder-quarkus-app-1.38.0.Final-redhat-00002-image-build.zip - md5: e55ce232900dc6ea089813eb8ffe8d93 - - name: kogito-builder-maven-repository-image-build.zip - # kogito-builder-maven-repository-1.38.0.Final-redhat-00002-image-build.zip - md5: 1489b401aa0356ac79fd3aa0e62bacf3 - -execute: - - script: configure.sh diff --git a/modules/kogito-swf/devmode/runtime/osl/configure.sh b/modules/kogito-swf/devmode/runtime/osl/configure.sh deleted file mode 100644 index a72caf961..000000000 --- a/modules/kogito-swf/devmode/runtime/osl/configure.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -set -e - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -SOURCES_DIR=/tmp/artifacts - -# Unzip Quarkus app and Maven repository -unzip "${SOURCES_DIR}"/kogito-devmode-quarkus-app-image-build.zip -d "${KOGITO_HOME}" -unzip "${SOURCES_DIR}"/kogito-devmode-maven-repository-image-build.zip -d "${KOGITO_HOME}"/.m2/repository - -chown -R 1001:0 "${KOGITO_HOME}" -chmod -R ug+rwX "${KOGITO_HOME}" diff --git a/modules/kogito-swf/devmode/runtime/osl/module.yaml b/modules/kogito-swf/devmode/runtime/osl/module.yaml deleted file mode 100644 index 6da3562f7..000000000 --- a/modules/kogito-swf/devmode/runtime/osl/module.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# -# 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. -# -schema_version: 1 -name: org.kie.kogito.swf.devmode.runtime.osl -version: "1.30.0" -description: "OpenShift Serverless Logic devmode with required extensions" - -envs: - - name: QUARKUS_KOGITO_DEVSERVICES_ENABLED - description: Whether to enable Kogito Devservices or not. Default to "false" since Data Index needs Docker. - value: "false" - - name: QUARKUS_DEVSERVICES_ENABLED - description: Whether to enable Quarkus Devservices or not. Default to "false" since the Kafka broker needs Docker. - value: "false" - - name: QUARKUS_KUBERNETES_CLIENT_DEVSERVICES_ENABLED - description: Whether to enable Kogito Devservices or not. Default to "false" since Kubernetes objects are managed by the Kogito Serverless Operator. - value: "false" - - name: QUARKUS_CONTINUOUS_TESTING - description: Whether to enable Quarkus continous testing on DevMode or not. Default to "disabled". - value: "disabled" - - name: KOGITO_CODEGEN_PROCESS_FAILONERROR - description: Boolean flag that will prevent Dev Mode to crash if the provided workflow is wrong. - value: "false" - -artifacts: - - name: kogito-devmode-quarkus-app-image-build.zip - # kogito-devmode-quarkus-app-1.38.0.Final-redhat-00001-image-build.zip - md5: c67fa5b0c78688023a5ac39877415dc7 - - name: kogito-devmode-maven-repository-image-build.zip - # kogito-devmode-maven-repository-1.38.0.Final-redhat-00001-image-build.zip - md5: 5452062f247963d2ef7dbc35fbe29c3b - -execute: - - script: configure.sh