diff --git a/Makefile b/Makefile index 7feb4fe5d..21a496597 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ display-image-version: build: clone-repos _build _build: - @for f in $(shell make list); do make build-image image_name=$${iname}; done + @for f in $(shell make list); do make build-image image_name=$${f}; done .PHONY: build-image diff --git a/README.md b/README.md index f511a8d40..063bf82d3 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,6 @@ Table of Contents - [Kogito Data Index Component Images](#kogito-data-index-component-images) - [Kogito Jobs Service Component Images](#kogito-jobs-service-component-images) - [Jobs Services All-in-one](#jobs-services-all-in-one) - - [Kogito Management Console Component Image](#kogito-management-console-component-image) - - [Kogito Task Console Component Image](#kogito-task-console-component-image) - [Kogito JIT Runner Component Image](#kogito-jit-runner-component-image) - [Using Kogito Images to Deploy Apps on OpenShift](#using-kogito-images-to-deploy-apps-on-openshift) - [Using released images](#using-released-images) @@ -606,8 +604,6 @@ Today we have the following Kogito Component Images: * [quay.io/kiegroup/kogito-jobs-service-ephemeral](https://quay.io/kiegroup/kogito-jobs-service-ephemeral) * [quay.io/kiegroup/kogito-jobs-service-postgresql](https://quay.io/kiegroup/kogito-jobs-service-postgresql) * [quay.io/kiegroup/kogito-jobs-service-allinone](https://quay.io/kiegroup/kogito-jobs-service-allinone) -* [quay.io/kiegroup/kogito-management-console](https://quay.io/kiegroup/kogito-management-console) -* [quay.io/kiegroup/kogito-task-console](https://quay.io/kiegroup/kogito-task-console) * [quay.io/kiegroup/kogito-jit-runner](https://quay.io/kiegroup/kogito-jit-runner) @@ -716,60 +712,6 @@ The above command will spinup the Jobs-service so you can connect your applicati The [Kogito Operator](https://github.com/apache/incubator-kie-kogito-operator) can be used to deploy the Kogito Jobs Service to your Kogito infrastructure on a Kubernetes cluster and provide its capabilities to your Kogito applications - -### Kogito Management Console Component Image - -The Kogito Management Console allows you to have a intuitive way to manage your Kogito processes in execution. -It depends on the Kogito Data Index Service on which the Console will connect to so it can be able to manage it. -Keep in mind that when using the [Process Instance Management Add-on](https://docs.jboss.org/kogito/release/latest/html_single/#con_bpmn-process-instance-management_kogito-developing-process-services) -it will enable your Kogito service be manageable through REST API. - - -To work correctly, the Kogito Management Console needs the Kogito Data Index Service url. If not provided, it will try to connect to the default one (http://localhost:8180). - -Basic usage: - -```bash -$ docker run -it --env KOGITO_DATAINDEX_HTTP_URL=data-index-service-url:9090 quay.io/kiegroup/kogito-management-console:latest -``` - -To enable debug just use this env while running this image: - -```bash -docker run -it --env SCRIPT_DEBUG=true --env KOGITO_DATAINDEX_HTTP_URL=data-index-service-url:9090 quay.io/kiegroup/kogito-management-console:latest -``` -You should notice a few debug messages being printed in the system output. - -To know what configurations this image accepts please take a look [here](kogito-management-console-image.yaml) on the **envs** section. - -The [Kogito Operator](https://github.com/apache/incubator-kie-kogito-operator) can be used to deploy the Kogito Management Console -to your Kogito infrastructure on a Kubernetes cluster and provide its capabilities to your Kogito applications. - -### Kogito Task Console Component Image - -The Kogito Task Console allows you to have an intuitive way to work with User Tasks in Kogito processes. -It depends on the Kogito Data Index Service on which the Console will connect to, so it can be able to manage it. - -To work correctly, the Kogito Task Console needs the Kogito Data Index Service url. If not provided, it will try to connect to the default one (http://localhost:8180). - -Basic usage: - -```bash -$ docker run -it --env KOGITO_DATAINDEX_HTTP_URL=data-index-service-url:9090 quay.io/kiegroup/kogito-task-console:latest -``` - -To enable debug just use this env while running this image: - -```bash -docker run -it --env SCRIPT_DEBUG=true --env KOGITO_DATAINDEX_HTTP_URL=data-index-service-url:9090 quay.io/kiegroup/kogito-task-console:latest -``` -You should notice a few debug messages being printed in the system output. - -To know what configurations this image accepts please take a look [here](kogito-task-console-image.yaml) on the **envs** section. - -The [Kogito Operator](https://github.com/apache/incubator-kie-kogito-operator) can be used to deploy the Kogito Task Console -to your Kogito infrastructure on a Kubernetes cluster and provide its capabilities to your Kogito applications. - ### Kogito JIT Runner Component Image The Kogito JIT Runner provides a tool that allows you to submit a DMN model and evaluate it on the fly with a simple HTTP request. You can find more details on JIT [here](https://github.com/apache/incubator-kie-kogito-apps/tree/main/jitexecutor). @@ -824,7 +766,6 @@ imagestream.image.openshift.io/kogito-data-index-postgresql created imagestream.image.openshift.io/kogito-jobs-service-ephemeral created imagestream.image.openshift.io/kogito-jobs-service-postgresql created imagestream.image.openshift.io/kogito-jobs-service-allinone created -imagestream.image.openshift.io/kogito-management-console created # performing a new build $ oc new-build --name=rules-quarkus-helloworld-builder --image-stream=kogito-s2i-builder:latest \ @@ -1011,7 +952,6 @@ With this Makefile you can: $ make build-image image_name=kogito-jobs-service-ephemeral $ make build-image image_name=kogito-jobs-service-postgresql $ make build-image image_name=kogito-jobs-service-allinone - $ make build-image image_name=kogito-management-console $ make build-image image_name=kogito-jit-runner ``` @@ -1081,7 +1021,6 @@ Below you can find all modules used to build the Kogito Images - [kogito-kubernetes-client](modules/kogito-kubernetes-client): Provides a simple wrapper to interact with Kubernetes API. - [kogito-launch-scripts](modules/kogito-launch-scripts): Main script for all images, it contains the startup script for Kogito Images - [kogito-logging](modules/kogito-logging): Provides common logging functions. -- [kogito-management-console](modules/kogito-management-console): Installs and Configure the management-console jar inside the image - [kogito-jit-runner](modules/kogito-jit-runner): Installs and Configure the jit-runner jar inside the image - [kogito-maven](modules/kogito-maven): Installs and configure Maven on the S2I images, also provides custom configuration script. - [kogito-openjdk](modules/kogito-openjdk): Provides OpenJDK and JRE. @@ -1099,8 +1038,7 @@ Please inspect the image files to learn which modules are being installed on eac - [quay.io/kiegroup/kogito-data-index-postgresql](kogito-data-index-postgresql-image.yaml) - [quay.io/kiegroup/kogito-jobs-service-ephemeral](kogito-jobs-service-ephemeral-image.yaml) - [quay.io/kiegroup/kogito-jobs-service-postgresql](kogito-jobs-service-postgresql-image.yaml) -- [quay.io/kiegroup/kogito-jobs-service-allinone](kogito-jobs-service-allinone-image.yaml) -- [quay.io/kiegroup/kogito-management-console](kogito-management-console-image.yaml) +- [quay.io/kiegroup/kogito-jobs-service-allinone](kogito-jobs-service-allinone-image.yaml) - [quay.io/kiegroup/kogito-jit-runner](kogito-jit-runner-image.yaml) - [quay.io/kiegroup/kogito-runtime-jvm](kogito-runtime-jvm-image.yaml) - [quay.io/kiegroup/kogito-runtime-native](kogito-runtime-native-image.yaml) diff --git a/kogito-management-console-image.yaml b/kogito-management-console-image.yaml deleted file mode 100644 index 62ee22846..000000000 --- a/kogito-management-console-image.yaml +++ /dev/null @@ -1,67 +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: "quay.io/kiegroup/kogito-management-console" -version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" -description: "Runtime image for Kogito Management Console" - -labels: - - name: "org.kie.kogito.version" - value: "999-SNAPSHOT" - - name: "maintainer" - value: "Apache KIE " - - name: "io.k8s.description" - value: "Runtime image for Kogito Management Console, manage your Business Process easily." - - name: "io.k8s.display-name" - value: "Kogito Management Console" - - name: "io.openshift.tags" - value: "kogito,management,management-console" - - name: "io.openshift.expose-services" - value: "8080:http" - -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_DATAINDEX_HTTP_URL" - example: "http://data-index.service:8080" - description: "Data Index service address, defaults to http://localhost:8180." - -modules: - repositories: - - path: modules - install: - - name: org.kie.kogito.system.user - - name: org.kie.kogito.logging - - name: org.kie.kogito.dynamic.resources - - name: org.kie.kogito.launch.scripts - - name: org.kie.kogito.management.console - - name: org.kie.kogito.security.custom.truststores - -ports: - - value: 8080 - -run: - workdir: "/home/kogito" - user: 1001 - cmd: - - "/home/kogito/kogito-app-launch.sh" - diff --git a/kogito-task-console-image.yaml b/kogito-task-console-image.yaml deleted file mode 100644 index 2031de62f..000000000 --- a/kogito-task-console-image.yaml +++ /dev/null @@ -1,66 +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: "quay.io/kiegroup/kogito-task-console" -version: "999-SNAPSHOT" -from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18" -description: "Runtime image for Kogito Task Console" - -labels: - - name: "org.kie.kogito.version" - value: "999-SNAPSHOT" - - name: "maintainer" - value: "Apache KIE " - - name: "io.k8s.description" - value: "Runtime image for Kogito Task Console, manage your Business Process easily." - - name: "io.k8s.display-name" - value: "Kogito Task Console" - - name: "io.openshift.tags" - value: "kogito,task,task-console" - - name: "io.openshift.expose-services" - value: "8080:http" - -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_DATAINDEX_HTTP_URL" - example: "http://data-index.service:8080" - description: "Data Index service address, defaults to http://localhost:8180." - -modules: - repositories: - - path: modules - install: - - name: org.kie.kogito.system.user - - name: org.kie.kogito.logging - - name: org.kie.kogito.dynamic.resources - - name: org.kie.kogito.launch.scripts - - name: org.kie.kogito.task.console - - name: org.kie.kogito.security.custom.truststores - -ports: - - value: 8080 - -run: - workdir: "/home/kogito" - user: 1001 - cmd: - - "/home/kogito/kogito-app-launch.sh" diff --git a/modules/kogito-management-console/added/kogito-app-launch.sh b/modules/kogito-management-console/added/kogito-app-launch.sh deleted file mode 100644 index e5d0f05fd..000000000 --- a/modules/kogito-management-console/added/kogito-app-launch.sh +++ /dev/null @@ -1,48 +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." -fi - - -# Configuration scripts -# Any configuration script that needs to run on image startup must be added here. -CONFIGURE_SCRIPTS=( - "${KOGITO_HOME}"/launch/kogito-management-console.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_MANAGEMENT_CONSOLE_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar \ No newline at end of file diff --git a/modules/kogito-management-console/added/launch/kogito-management-console.sh b/modules/kogito-management-console/added/launch/kogito-management-console.sh deleted file mode 100644 index e0f964139..000000000 --- a/modules/kogito-management-console/added/launch/kogito-management-console.sh +++ /dev/null @@ -1,49 +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 - -function prepareEnv() { - # keep it on alphabetical order - unset KOGITO_DATAINDEX_HTTP_URL -} - -function configure() { - configure_data_index_url -} - -# Exit codes: -# 10 - invalid url -function configure_data_index_url { - url_simple_regex='(https?)://' - local dataIndexURL=${KOGITO_DATAINDEX_HTTP_URL} - if [ "${dataIndexURL}x" != "x" ]; then - if [[ ! "${dataIndexURL}x" =~ $url_simple_regex ]]; then - log_error "URL must start with http or https." - exit 10 - fi - else - log_info "Data index url not set, default will be used: http://localhost:8180" - dataIndexURL="http://localhost:8180" - fi - KOGITO_MANAGEMENT_CONSOLE_PROPS="${KOGITO_MANAGEMENT_CONSOLE_PROPS} -Dkogito.dataindex.http.url=${dataIndexURL}" -} diff --git a/modules/kogito-management-console/configure.sh b/modules/kogito-management-console/configure.sh deleted file mode 100644 index 19b6d5c35..000000000 --- a/modules/kogito-management-console/configure.sh +++ /dev/null @@ -1,32 +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 - -SCRIPT_DIR=$(dirname "${0}") -ADDED_DIR="${SCRIPT_DIR}"/added - -cp -rv "${ADDED_DIR}"/launch/* "${KOGITO_HOME}"/launch/ - -chown -R 1001:0 "${KOGITO_HOME}" -chmod -R ug+rwX "${KOGITO_HOME}" - -cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" -chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh - diff --git a/modules/kogito-management-console/module.yaml b/modules/kogito-management-console/module.yaml deleted file mode 100644 index f00bb9ed0..000000000 --- a/modules/kogito-management-console/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.management.console -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 - dest: /home/kogito/bin - name: quarkus-app - -execute: - - script: configure.sh - - diff --git a/modules/kogito-management-console/tests/bats/kogito-management-console.bats b/modules/kogito-management-console/tests/bats/kogito-management-console.bats deleted file mode 100644 index ee8c95f20..000000000 --- a/modules/kogito-management-console/tests/bats/kogito-management-console.bats +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bats -# -# 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 KOGITO_HOME=/tmp/kogito -export HOME="${KOGITO_HOME}" -mkdir -p "${KOGITO_HOME}"/launch -cp $BATS_TEST_DIRNAME/../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/ - -# imports -load $BATS_TEST_DIRNAME/../../added/launch/kogito-management-console.sh - -teardown() { - rm -rf "${KOGITO_HOME}" -} - -@test "test if the default value for data-index url will be set" { - local expected=" -Dkogito.dataindex.http.url=http://localhost:8180" - configure_data_index_url - echo "Result is [${KOGITO_MANAGEMENT_CONSOLE_PROPS}] and expected is [${expected}]" >&2 - [ "${expected}" = "${KOGITO_MANAGEMENT_CONSOLE_PROPS}" ] -} - -@test "test if KOGITO_DATA_INDEX_URL will be correctly set " { - export KOGITO_DATAINDEX_HTTP_URL="http://10.10.10.10:8080" - local expected=" -Dkogito.dataindex.http.url=http://10.10.10.10:8080" - configure_data_index_url - echo "Result is [${KOGITO_MANAGEMENT_CONSOLE_PROPS}] and expected is [${expected}]" >&2 - [ "${expected}" = "${KOGITO_MANAGEMENT_CONSOLE_PROPS}" ] -} - -@test "test if a invalid value for data-index url will return the expected exit code" { - export KOGITO_DATAINDEX_HTTP_URL="a.b.c" - run configure_data_index_url - [ "${status}" == "10" ] -} - diff --git a/modules/kogito-task-console/added/kogito-app-launch.sh b/modules/kogito-task-console/added/kogito-app-launch.sh deleted file mode 100644 index 538dc5490..000000000 --- a/modules/kogito-task-console/added/kogito-app-launch.sh +++ /dev/null @@ -1,48 +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." -fi - - -# Configuration scripts -# Any configuration script that needs to run on image startup must be added here. -CONFIGURE_SCRIPTS=( - "${KOGITO_HOME}"/launch/kogito-task-console.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_TASK_CONSOLE_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar \ No newline at end of file diff --git a/modules/kogito-task-console/added/launch/kogito-task-console.sh b/modules/kogito-task-console/added/launch/kogito-task-console.sh deleted file mode 100644 index 1b6a600e3..000000000 --- a/modules/kogito-task-console/added/launch/kogito-task-console.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 - -function prepareEnv() { - # keep it on alphabetical order - unset KOGITO_DATAINDEX_HTTP_URL -} - -function configure() { - configure_data_index_url -} - -# Exit codes: -# 10 - invalid url -function configure_data_index_url { - url_simple_regex='(https?)://' - local dataIndexURL=${KOGITO_DATAINDEX_HTTP_URL} - if [ "${dataIndexURL}x" != "x" ]; then - if [[ ! "${dataIndexURL}x" =~ $url_simple_regex ]]; then - log_error "URL must start with http or https." - exit 10 - fi - else - log_info "Data index url not set, default will be used: http://localhost:8180" - dataIndexURL="http://localhost:8180" - fi - KOGITO_TASK_CONSOLE_PROPS="${KOGITO_TASK_CONSOLE_PROPS} -Dkogito.dataindex.http.url=${dataIndexURL}" -} - diff --git a/modules/kogito-task-console/configure b/modules/kogito-task-console/configure deleted file mode 100644 index 19b6d5c35..000000000 --- a/modules/kogito-task-console/configure +++ /dev/null @@ -1,32 +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 - -SCRIPT_DIR=$(dirname "${0}") -ADDED_DIR="${SCRIPT_DIR}"/added - -cp -rv "${ADDED_DIR}"/launch/* "${KOGITO_HOME}"/launch/ - -chown -R 1001:0 "${KOGITO_HOME}" -chmod -R ug+rwX "${KOGITO_HOME}" - -cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" -chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh - diff --git a/modules/kogito-task-console/module.yaml b/modules/kogito-task-console/module.yaml deleted file mode 100644 index 5f45b4668..000000000 --- a/modules/kogito-task-console/module.yaml +++ /dev/null @@ -1,31 +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.task.console -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 - dest: /home/kogito/bin - name: quarkus-app - -execute: - - script: configure diff --git a/modules/kogito-task-console/tests/bats/kogito-task-console.bats b/modules/kogito-task-console/tests/bats/kogito-task-console.bats deleted file mode 100644 index ac1de079f..000000000 --- a/modules/kogito-task-console/tests/bats/kogito-task-console.bats +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bats -# -# 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 KOGITO_HOME=/tmp/kogito -export HOME="${KOGITO_HOME}" -mkdir -p "${KOGITO_HOME}"/launch -cp $BATS_TEST_DIRNAME/../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/ - -# imports -load $BATS_TEST_DIRNAME/../../added/launch/kogito-task-console.sh - -teardown() { - rm -rf "${KOGITO_HOME}" -} - -@test "test if the default value for data-index url will be set" { - local expected=" -Dkogito.dataindex.http.url=http://localhost:8180" - configure_data_index_url - echo "Result is [${KOGITO_TASK_CONSOLE_PROPS}] and expected is [${expected}]" >&2 - [ "${expected}" = "${KOGITO_TASK_CONSOLE_PROPS}" ] -} - -@test "test if KOGITO_DATA_INDEX_URL will be correctly set " { - export KOGITO_DATAINDEX_HTTP_URL="http://10.10.10.10:8080" - local expected=" -Dkogito.dataindex.http.url=http://10.10.10.10:8080" - configure_data_index_url - echo "Result is [${KOGITO_TASK_CONSOLE_PROPS}] and expected is [${expected}]" >&2 - [ "${expected}" = "${KOGITO_TASK_CONSOLE_PROPS}" ] -} - -@test "test if a invalid value for data-index url will return the expected exit code" { - export KOGITO_DATAINDEX_HTTP_URL="a.b.c" - run configure_data_index_url - [ "${status}" == "10" ] -} - diff --git a/scripts/build-kogito-apps-components.sh b/scripts/build-kogito-apps-components.sh index 4c80cd6c1..564506e41 100755 --- a/scripts/build-kogito-apps-components.sh +++ b/scripts/build-kogito-apps-components.sh @@ -51,12 +51,6 @@ if [ ! -z "${CYPRESS_BINARY_URL}" ]; then fi case ${imageName} in - "kogito-management-console") - contextDir="management-console" - ;; - "kogito-task-console") - contextDir="task-console" - ;; "kogito-data-index-ephemeral") contextDir="data-index/data-index-service/data-index-service-inmemory" ;; diff --git a/scripts/common.py b/scripts/common.py index 9398669b7..50cbc38a2 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -46,11 +46,10 @@ CLONE_REPO_SCRIPT = 'tests/test-apps/clone-repo.sh' SETUP_MAVEN_SCRIPT = 'scripts/setup-maven.sh' -SUPPORTING_SERVICES_IMAGES = {"kogito-data-index-ephemeral", - "kogito-data-index-postgresql", +SUPPORTING_SERVICES_IMAGES = {"kogito-data-index-ephemeral", + "kogito-data-index-postgresql", "kogito-jit-runner", "kogito-jobs-service-ephemeral", "kogito-jobs-service-postgresql", "kogito-jobs-service-allinone", - "kogito-management-console", "kogito-task-console" } SWF_BUILDER_IMAGES = {"kogito-swf-builder", "kogito-base-builder", "kogito-swf-devmode"} @@ -463,7 +462,7 @@ def update_env_value(env_name, env_value): for image_name in images: image_filename = "{}-image.yaml".format(image_name) update_env_value_in_file(image_filename, env_name, env_value) - + for module_dir in modules: module_file = os.path.join(module_dir, "module.yaml") update_env_value_in_file(module_file, env_name, env_value) @@ -537,7 +536,7 @@ def update_env_value_in_build_config_modules(env_name, new_value, ignore_empty = def update_label_value(label_name, label_value): """ - Update label value in all module / image files + Update label value in all module / image files :param label_name: label name to update :param label_value: value to set """ @@ -550,7 +549,7 @@ def update_label_value(label_name, label_value): for image_name in images: image_filename = "{}-image.yaml".format(image_name) update_label_value_in_file(image_filename, label_name, label_value) - + for module_dir in modules: module_file = os.path.join(module_dir, "module.yaml") update_label_value_in_file(module_file, label_name, label_name) @@ -566,7 +565,7 @@ def update_label_value_in_file(filename, label_name, label_value): try: with open(filename) as yaml_file: data = yaml_loader().load(yaml_file) - update_label_value_in_data(data, label_name, label_value) + update_label_value_in_data(data, label_name, label_value) with open(filename, 'w') as yaml_file: yaml_loader().dump(data, yaml_file) diff --git a/scripts/run-bats.sh b/scripts/run-bats.sh index c7e1adecc..122a45222 100755 --- a/scripts/run-bats.sh +++ b/scripts/run-bats.sh @@ -38,12 +38,6 @@ echo "----> running bats on kogito-jobs-service-common" echo "----> running bats on kogito-kubernetes-client" ./bats/bin/bats modules/kogito-kubernetes-client/tests/bats/ -echo "----> running bats on kogito-management-console" -./bats/bin/bats modules/kogito-management-console/tests/bats/ - -echo "----> running bats on kogito-task-console" -./bats/bin/bats modules/kogito-task-console/tests/bats/ - echo "----> running bats on kogito-maven" ./bats/bin/bats modules/kogito-maven/tests/bats diff --git a/tests/features/kogito-management-console.feature b/tests/features/kogito-management-console.feature deleted file mode 100644 index ad3aaef74..000000000 --- a/tests/features/kogito-management-console.feature +++ /dev/null @@ -1,29 +0,0 @@ -@quay.io/kiegroup/kogito-management-console -Feature: kogito-management-console feature - - Scenario: verify if all labels are correctly set kogito-management-console image - Given image is built - Then the image should contain label maintainer with value Apache KIE - 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 Management Console, manage your Business Process easily. - And the image should contain label io.k8s.display-name with value Kogito Management Console - And the image should contain label io.openshift.tags with value kogito,management,management-console - - Scenario: Verify if the debug is correctly enabled and test default http port - When container is started with env - | variable | value | - | SCRIPT_DEBUG | true | - Then container log should contain -Dkogito.dataindex.http.url=http://localhost:8180 -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar - And container log should contain Data index url not set, default will be used: http://localhost:8180 - And container log should contain started in - And container log should not contain Application failed to start - - Scenario: Verify if the debug is correctly enabled and set data-index url - When container is started with env - | variable | value | - | SCRIPT_DEBUG | true | - | KOGITO_DATAINDEX_HTTP_URL | http://test:9090 | - Then container log should contain -Dkogito.dataindex.http.url=http://test:9090 -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar - And container log should not contain Data index url not set, default will be used: http://localhost:8180 - And container log should contain started in - And container log should not contain Application failed to start diff --git a/tests/features/kogito-task-console.feature b/tests/features/kogito-task-console.feature deleted file mode 100644 index 78ba03764..000000000 --- a/tests/features/kogito-task-console.feature +++ /dev/null @@ -1,29 +0,0 @@ -@quay.io/kiegroup/kogito-task-console -Feature: kogito-task-console feature - - Scenario: verify if all labels are correctly set on kogito-task-console image - Given image is built - Then the image should contain label maintainer with value Apache KIE - 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 Task Console, manage your Business Process easily. - And the image should contain label io.k8s.display-name with value Kogito Task Console - And the image should contain label io.openshift.tags with value kogito,task,task-console - - Scenario: Verify if the debug is correctly enabled and test default http port - When container is started with env - | variable | value | - | SCRIPT_DEBUG | true | - Then container log should contain -Dkogito.dataindex.http.url=http://localhost:8180 -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar - And container log should contain Data index url not set, default will be used: http://localhost:8180 - And container log should contain started in - And container log should not contain Application failed to start - - Scenario: Verify if the debug is correctly enabled and set data-index url - When container is started with env - | variable | value | - | SCRIPT_DEBUG | true | - | KOGITO_DATAINDEX_HTTP_URL | http://test:9090 | - Then container log should contain -Dkogito.dataindex.http.url=http://test:9090 -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar - And container log should not contain Data index url not set, default will be used: http://localhost:8180 - And container log should contain started in - And container log should not contain Application failed to start