diff --git a/modules/prod/kogito-data-index-ephemeral/added/kogito-app-launch.sh b/modules/prod/kogito-data-index-ephemeral/added/kogito-app-launch.sh new file mode 100644 index 000000000..aa15cda21 --- /dev/null +++ b/modules/prod/kogito-data-index-ephemeral/added/kogito-app-launch.sh @@ -0,0 +1,50 @@ +#!/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/prod/kogito-data-index-ephemeral/configure b/modules/prod/kogito-data-index-ephemeral/configure new file mode 100644 index 000000000..d24e68683 --- /dev/null +++ b/modules/prod/kogito-data-index-ephemeral/configure @@ -0,0 +1,31 @@ +#!/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/prod/kogito-data-index-ephemeral/module.yaml b/modules/prod/kogito-data-index-ephemeral/module.yaml new file mode 100644 index 000000000..8fd1aecc4 --- /dev/null +++ b/modules/prod/kogito-data-index-ephemeral/module.yaml @@ -0,0 +1,34 @@ +# +# 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.32.0" + +artifacts: + # data-index-service-inmemory-1.44.0.Final-redhat-00005-image-build.zip +- name: data-index-service-inmemory-image-build.zip + md5: 0a20dc69640c479331de64c9ae237b79 + +execute: + - script: configure + +packages: + install: + - pam + diff --git a/modules/prod/kogito-maven/3.9.x-prod/module.yaml b/modules/prod/kogito-maven/3.9.x-prod/module.yaml new file mode 100644 index 000000000..302413a52 --- /dev/null +++ b/modules/prod/kogito-maven/3.9.x-prod/module.yaml @@ -0,0 +1,31 @@ +# +# 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.maven.prod +version: "3.9.3" + +envs: + - name: "MAVEN_VERSION" + value: "3.9.3" + +artifacts: + - name: apache-maven-3.9.3-bin.tar.gz + url: https://download.devel.redhat.com/brewroot/packages/org.apache.maven-apache-maven/3.9.3/1/maven/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.tar.gz + md5: f3fbff830d9a0dc2c6c99a76e27d0c01 + diff --git a/modules/prod/kogito-swf-builder-runtime/configure.sh b/modules/prod/kogito-swf-builder-runtime/configure.sh new file mode 100644 index 000000000..70c258fa6 --- /dev/null +++ b/modules/prod/kogito-swf-builder-runtime/configure.sh @@ -0,0 +1,32 @@ +#!/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/prod/kogito-swf-builder-runtime/module.yaml b/modules/prod/kogito-swf-builder-runtime/module.yaml new file mode 100644 index 000000000..86346b330 --- /dev/null +++ b/modules/prod/kogito-swf-builder-runtime/module.yaml @@ -0,0 +1,33 @@ +# +# 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.32.0" +description: "OpenShift Serverless Logic builder module with required extensions" + +artifacts: + - name: kogito-builder-quarkus-app-image-build.zip + # kogito-builder-quarkus-app-1.44.0.Final-redhat-00005-image-build.zip + md5: d892071be9df1426a6233bf95a777a43 + - name: kogito-builder-maven-repository-image-build.zip + # kogito-builder-maven-repository-1.44.0.Final-redhat-00005-image-build.zip + md5: 5e6f90ef7e6f9cc15dd87146e55e708f + +execute: + - script: configure.sh diff --git a/modules/prod/kogito-swf-devmode-runtime/configure.sh b/modules/prod/kogito-swf-devmode-runtime/configure.sh new file mode 100644 index 000000000..a72caf961 --- /dev/null +++ b/modules/prod/kogito-swf-devmode-runtime/configure.sh @@ -0,0 +1,31 @@ +#!/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/prod/kogito-swf-devmode-runtime/module.yaml b/modules/prod/kogito-swf-devmode-runtime/module.yaml new file mode 100644 index 000000000..901515c44 --- /dev/null +++ b/modules/prod/kogito-swf-devmode-runtime/module.yaml @@ -0,0 +1,50 @@ +# +# 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.32.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.44.0.Final-redhat-00005-image-build.zip + md5: af446cec2a7da68c1d1565b7a804e50c + - name: kogito-devmode-maven-repository-image-build.zip + # kogito-devmode-maven-repository-1.44.0.Final-redhat-00005-image-build.zip + md5: 8d8bf6b104da6b6dc0dd81c415231c39 + +execute: + - script: configure.sh diff --git a/prod-logic-data-index-ephemeral-rhel8-image.yaml b/prod-logic-data-index-ephemeral-rhel8-image.yaml new file mode 100644 index 000000000..b86a68b26 --- /dev/null +++ b/prod-logic-data-index-ephemeral-rhel8-image.yaml @@ -0,0 +1,94 @@ +# +# 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: "openshift-serverless-1-tech-preview/logic-data-index-ephemeral-rhel8" +version: "1.32.0" +from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +description: "Red Hat build of Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider" + +labels: +- name: "com.redhat.component" + value: "openshift-serverless-1-logic-data-index-ephemeral-rhel8-container" +- name: "maintainer" + value: "serverless-logic " +- name: "io.k8s.description" + value: "Red Hat build of Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider" +- name: "io.k8s.display-name" + value: "Red Hat build of Kogito Data Index Service - ephemeral PostgreSQL" +- name: "io.openshift.tags" + value: "logic-data-index,kogito,data-index,data-index-ephemeral" +- name: "io.openshift.expose-services" + value: "8080:http" +- name: "org.kie.kogito.version" + value: "999-SNAPSHOT" + +envs: + - name: "SCRIPT_DEBUG" + 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." + - name: "KOGITO_DATA_INDEX_QUARKUS_PROFILE" + value: "http-events-support" + description: "Allows to change the event connection type. The possible values are :`kafka-events-support` or `http-events-support`(default)" + +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.prod.ephemeral + version: "1.32.0" + - name: org.kie.kogito.dataindex.common + - name: org.kie.kogito.security.custom.truststores + - name: org.kie.kogito.pkg-update + +packages: + manager: microdnf + content_sets_file: content_sets.yaml + +osbs: + configuration: + container: + platforms: + only: + - x86_64 + - aarch64 + - ppc64le + compose: + pulp_repos: true + extra_dir: osbs-extra/logic-data-index-ephemeral-rhel8 + repository: + name: containers/openshift-serverless-1-logic-data-index-ephemeral + branch: openshift-serverless-1.32-rhel-8 + +ports: + - value: 8080 + +run: + workdir: "/home/kogito" + user: 1001 + cmd: + - "/home/kogito/kogito-app-launch.sh" + diff --git a/prod-logic-swf-builder-rhel8-image.yaml b/prod-logic-swf-builder-rhel8-image.yaml new file mode 100644 index 000000000..1591890e4 --- /dev/null +++ b/prod-logic-swf-builder-rhel8-image.yaml @@ -0,0 +1,91 @@ +# +# 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: "openshift-serverless-1-tech-preview/logic-swf-builder-rhel8" +version: "1.32.0" +from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +description: "Red Hat build of Runtime image for Kogito Serverless Workflow builder with Quarkus extensions libraries preinstalled" + +labels: + - name: "io.openshift.s2i.scripts-url" + value: "image:///usr/local/s2i" + - name: "io.openshift.s2i.destination" + value: "/tmp" + - name: "io.quarkus.platform.version" + value: "3.2.9.Final" + - name: "org.kie.kogito.version" + value: "999-SNAPSHOT" + - name: "com.redhat.component" + value: "openshift-serverless-1-logic-swf-builder-rhel8-container" + - name: "maintainer" + value: "serverless-logic " + - name: "io.k8s.description" + value: "Red Hat build of Runtime image for Kogito Serverless Workflow builder with Quarkus extensions libraries preinstalled" + - name: "io.k8s.display-name" + value: "Red Hat OpenShift Serverless Logic Builder image" + - name: "io.openshift.tags" + value: "logic-swf-builder,kogito,swf-builder" + - name: "io.openshift.expose-services" + value: "8080:http" + +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.prod + 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.runtime.osl + version: "1.32.0" + +run: + workdir: "/home/kogito/${PROJECT_ARTIFACT_ID}" + user: 1001 + +ports: + - value: 8080 + - value: 5005 + +packages: + manager: microdnf + content_sets_file: content_sets.yaml + +osbs: + configuration: + container: + platforms: + only: + - x86_64 + - ppc64le + - aarch64 + compose: + pulp_repos: true + extra_dir: osbs-extra/logic-swf-builder-rhel8 + repository: + name: containers/openshift-serverless-1-logic-swf-builder + branch: openshift-serverless-1.32-rhel-8 diff --git a/prod-logic-swf-devmode-rhel8-image.yaml b/prod-logic-swf-devmode-rhel8-image.yaml new file mode 100644 index 000000000..a6d5ca991 --- /dev/null +++ b/prod-logic-swf-devmode-rhel8-image.yaml @@ -0,0 +1,90 @@ +# +# 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: "openshift-serverless-1-tech-preview/logic-swf-devmode-rhel8" +from: "registry.access.redhat.com/ubi8/ubi-minimal:latest" +version: "1.32.0" +description: "Red Hat build of Kogito Serverless Workflow development mode image with Quarkus extensions libraries preinstalled" + +labels: + - name: "io.quarkus.platform.version" + value: "3.2.9.Final" + - name: "org.kie.kogito.version" + value: "999-SNAPSHOT" + - name: "io.k8s.description" + value: "Red Hat build of Kogito Serverless Workflow development mode image with Quarkus extensions libraries preinstalled." + - name: "io.k8s.display-name" + value: "Red Hat OpenShift Serverless Logic SWF Devmode" + - name: "io.openshift.tags" + value: "logic,devmode,kogito,kogito,development,serverless,workflow" + - name: "io.openshift.expose-services" + value: "8080:http,5005:http" + - name: "com.redhat.component" + value: "openshift-serverless-1-logic-swf-devmode-rhel8-container" + - name: "maintainer" + value: "serverless-logic " + +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.prod + 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.devmode.runtime.common + - name: org.kie.kogito.swf.devmode.runtime.osl + version: "1.32.0" + +ports: + - value: 8080 + - value: 5005 + +run: + workdir: "/home/kogito/${PROJECT_ARTIFACT_ID}" + user: 1001 + cmd: + - "/home/kogito/launch/run-app-devmode.sh" + +packages: + manager: microdnf + content_sets_file: content_sets.yaml + +osbs: + configuration: + container: + platforms: + only: + - x86_64 + - ppc64le + - aarch64 + compose: + pulp_repos: true + extra_dir: osbs-extra/logic-swf-devmode-rhel8 + repository: + name: containers/openshift-serverless-1-logic-swf-devmode + branch: openshift-serverless-1.32-rhel-8