Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync main branch with Apache main branch #51

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,9 @@ services:
depends_on:
data-index:
condition: service_started
keycloak:
condition: service_healthy
volumes:
- ./svg/:/home/kogito/data/svg/
environment:
KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql
KOGITO_MANAGEMENT_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration -Dkogito.svg.folder.path=/home/kogito/data/svg
QUARKUS_HTTP_CORS_ORIGINS: "/.*/"

task-console:
container_name: task-console
image: quay.io/kiegroup/kogito-task-console:${KOGITO_VERSION}
ports:
- 8380:8080
depends_on:
data-index:
condition: service_started
keycloak:
condition: service_healthy
environment:
KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql
KOGITO_TASK_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration
QUARKUS_HTTP_CORS_ORIGINS: "/.*/"
Original file line number Diff line number Diff line change
Expand Up @@ -816,15 +816,14 @@
},
{
"clientId": "kogito-console-quarkus",
"rootUrl": "http://localhost:8380",
"adminUrl": "http://localhost:8380/",
"baseUrl": "http://localhost:8380/",
"rootUrl": "http://localhost:8280",
"adminUrl": "http://localhost:8280/",
"baseUrl": "http://localhost:8280/",
"surrogateAuthRequired": false,
"enabled": true,
"clientAuthenticatorType": "client-secret",
"secret": "**********",
"redirectUris": [
"http://localhost:8380/*",
"http://localhost:8280/*"
],
"webOrigins": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ the response with the visa processing outcome - approved or rejected.
* Create project using Quarkus Maven plugin with following extensions
* Kogito
* OpenApi
* Import project into Eclipse IDE - requires BPMN modeller plugin installed
* Create data model
* Traveller
* Hotel
Expand Down Expand Up @@ -134,16 +133,16 @@ You should start all the services before you execute any of the **Hiring** examp
For Linux and MacOS:

1. Open a Terminal
2. Go to the process-usertasks-quarkus-with-console folder at kogito-examples
2. Go to the kogito-travel-agency folder at kogito-examples

```bash
cd <path_to_process-usertasks-quarkus-with-console>/docker-compose
cd <path_to_kogito-travel-agency>/docker-compose
```

3. Run the ```startServices.sh``` script

```bash
sh ./startServices.sh
./startServices.sh
```

Once all services bootstrap, the following ports will be assigned on your local machine:
Expand Down Expand Up @@ -173,6 +172,12 @@ It will install the *Kogito Realm* that comes with a predefined set of users:

Once Keycloak is started, you should be able to access your *Keycloak Server* at [localhost:8480/auth](http://localhost:8480/auth) with *admin* user.

### Compile and Start the process

```
mvn clean package
java -jar target/quarkus-app/quarkus-run.jar
```

### Compile and Run in Local Dev Mode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ will add additional handling to the approved or rejected visa applications _(by
* Create project using Quarkus Maven plugin with following extensions
* Kogito
* OpenApi
* Import project into Eclipse IDE - requires BPMN modeller plugin installed
* Create data model
* VisaApplication
* Create decision logic
Expand Down Expand Up @@ -78,16 +77,16 @@ You should start all the services before you execute any of the **Hiring** examp
For Linux and MacOS:

1. Open a Terminal
2. Go to the process-usertasks-quarkus-with-console folder at kogito-examples
2. Go to the kogito-travel-agency folder at kogito-examples

```bash
cd <path_to_process-usertasks-quarkus-with-console>/docker-compose
cd <path_to_kogito-travel-agency>/docker-compose
```

3. Run the ```startServices.sh``` script

```bash
sh ./startServices.sh
./startServices.sh
```

Once all services bootstrap, the following ports will be assigned on your local machine:
Expand Down Expand Up @@ -117,6 +116,13 @@ It will install the *Kogito Realm* that comes with a predefined set of users:

Once Keycloak is started, you should be able to access your *Keycloak Server* at [localhost:8480/auth](http://localhost:8480/auth) with *admin* user.

### Compile and Start the process

```
mvn clean package
java -jar target/quarkus-app/quarkus-run.jar
```

### Compile and Run in Local Dev Mode

```
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions kogito-quarkus-examples/ocp-tryout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Installation from pre-build images
- [Data Index](https://docs.jboss.org/kogito/release/1.15.0/html_single/#con-data-index-service_kogito-configuring)
- [Management console](https://docs.jboss.org/kogito/release/1.15.0/html_single/#con-management-console_kogito-developing-process-services)
- [Jobs service](https://docs.jboss.org/kogito/release/latest/html_single/#con-jobs-service_kogito-configuring)
- [Task console](https://docs.jboss.org/kogito/release/latest/html_single/#con-task-console_kogito-developing-process-services)

## Architecture
![](./architecture.png)
Expand Down Expand Up @@ -86,8 +85,6 @@ All configuration required to make those connections as well as initializations
- `kogito.dataindex.wsurl` - the dataindex url, protocol: ws
### Kogito Management Console Configurations
- `kogito.managementconsole.props` - command line properties for the management console
### Kogito Task Console Configurations
- `kogito.taskconsole.props` - command line properties for the task console
### Kogito Job Service Configurations
- `kogito.jobsservice.props` - command line properties for the job service

Expand All @@ -103,7 +100,6 @@ if marked `-` then namespace defaults are applied
|keycloak|-|-|-|-|
|kogito-data-index-infinispan|-|-|-|500Mi|
|kogito-management-console|-|-|-|500Mi|
|kogito-task-console|-|-|-|500Mi|
|kogito-jobs-service|-|-|-|500Mi|
|kogito-travel-agency-travels-jvm|-|-|-|500Mi|
|kogito-travel-agency-visas-jvm|-|-|-|500Mi|
Expand Down
1 change: 0 additions & 1 deletion kogito-quarkus-examples/ocp-tryout/installer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ KAFKA=N
KEYCLOAK=N
KOGITO_DATA_INDEX=N
KOGITO_MANAGEMENT_CONSOLE=N
KOGITO_TASK_CONSOLE=N
KOGITO_JOBS_SERVICE=N
TEST_APP=N

3 changes: 1 addition & 2 deletions kogito-quarkus-examples/ocp-tryout/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ source common-functions.sh
action=install

components=(SHARED_CONFIG INFINISPAN KAFKA KEYCLOAK \
KOGITO_DATA_INDEX KOGITO_MANAGEMENT_CONSOLE KOGITO_TASK_CONSOLE KOGITO_JOBS_SERVICE \
KOGITO_DATA_INDEX KOGITO_MANAGEMENT_CONSOLE KOGITO_JOBS_SERVICE \
TEST_APP)
# override the installer properties configuration if needed
function overrideEnvVariables(){
Expand Down Expand Up @@ -111,7 +111,6 @@ function install(){

componentAction "${KOGITO_DATA_INDEX}" "kogito-data-index" "${dbType}"
componentAction "${KOGITO_MANAGEMENT_CONSOLE}" "kogito-management-console"
componentAction "${KOGITO_TASK_CONSOLE}" "kogito-task-console"
componentAction "${KOGITO_JOBS_SERVICE}" "kogito-jobs-service" "${dbType}"

componentAction "${TEST_APP}" "testapp"
Expand Down
3 changes: 1 addition & 2 deletions kogito-quarkus-examples/ocp-tryout/keycloak/keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ action=$1
# NOTE: if need to update kogito_realm.json, edit content of kogito-realm-orig.json here
function updateClientRedirectUrls(){
mngConsole=\"http://kogito-management-console-$(getProjectName).$(getClusterAppsHostname)/*\"
taskConsole=\"http://kogito-task-console-$(getProjectName).$(getClusterAppsHostname)/*\"
additionalRedirectUris=["${mngConsole}","${taskConsole}"]
additionalRedirectUris=["${mngConsole}"]
(jq '(.clients[] | select(.clientId=="kogito-console-quarkus") | .redirectUris) |= . + '${additionalRedirectUris} kogito-realm-orig.json) > kogito-realm.json
}
updateClientRedirectUrls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,15 +816,14 @@
},
{
"clientId": "kogito-console-quarkus",
"rootUrl": "http://localhost:8380",
"adminUrl": "http://localhost:8380/",
"baseUrl": "http://localhost:8380/",
"rootUrl": "http://localhost:8280",
"adminUrl": "http://localhost:8280/",
"baseUrl": "http://localhost:8280/",
"surrogateAuthRequired": false,
"enabled": true,
"clientAuthenticatorType": "client-secret",
"secret": "**********",
"redirectUris": [
"http://localhost:8380/*",
"http://localhost:8280/*"
],
"webOrigins": [
Expand Down
2 changes: 0 additions & 2 deletions kogito-quarkus-examples/ocp-tryout/kogito-shared/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,5 @@ There is one config map per infrastructure component.
- `kogito.dataindex.wsurl` - the dataindex url, protocol: ws
#### Kogito Management Console Config
- `kogito.managementconsole.props` - command line properties for the management console
#### Kogito Task Console Config
- `kogito.taskconsole.props` - command line properties for the task console
#### Kogito Job Service Config
- `kogito.jobsservice.props` - command line properties for the job service
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ data:
kogito.dataindex.httpurl.with.graphql: 'http://kogito-data-index-infinispan-${project_name}.${apps_cluster_host}/graphql'
kogito.dataindex.wsurl: 'ws://kogito-data-index-infinispan-${project_name}.${apps_cluster_host}'
kogito.managementconsole.props: '-Dkogito.svg.folder.path=/home/kogito/data/svg -Dkogito.consoles.keycloak.config.url=http://keycloak-${project_name}.${apps_cluster_host}/auth/ -Dkogito.consoles.keycloak.config.health-check-url=http://keycloak-${project_name}.${apps_cluster_host}/auth/realms/kogito/.well-known/openid-configuration'
kogito.taskconsole.props: '-Dkogito.test.user-system.enabled=true -Dkogito.consoles.keycloak.config.url=http://keycloak-${project_name}.${apps_cluster_host}/auth/ -Dkogito.consoles.keycloak.config.health-check-url=http://keycloak-${project_name}.${apps_cluster_host}/auth/realms/kogito/.well-known/openid-configuration'
kogito.jobsservice.props: '-Dquarkus-profile=events-support -D%events-support.kafka.bootstrap.servers=kafka.${project_name}.svc.cluster.local:9092 -D%events-support.mp.messaging.outgoing.kogito-job-service-job-status-events.bootstrap.servers=kafka.${project_name}.svc.cluster.local:9092'
3 changes: 1 addition & 2 deletions kogito-quarkus-examples/ocp-tryout/uninstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ source common-functions.sh
action=uninstall

components=(SHARED_CONFIG INFINISPAN KAFKA KEYCLOAK \
KOGITO_DATA_INDEX KOGITO_MANAGEMENT_CONSOLE KOGITO_TASK_CONSOLE KOGITO_JOBS_SERVICE \
KOGITO_DATA_INDEX KOGITO_MANAGEMENT_CONSOLE KOGITO_JOBS_SERVICE \
TEST_APP)
# override the installer properties configuration if needed
function overrideEnvVariables(){
Expand Down Expand Up @@ -74,7 +74,6 @@ function uninstall(){

componentAction "${KOGITO_DATA_INDEX}" "kogito-data-index" "${dbType}"
componentAction "${KOGITO_MANAGEMENT_CONSOLE}" "kogito-management-console"
componentAction "${KOGITO_TASK_CONSOLE}" "kogito-task-console"
componentAction "${KOGITO_JOBS_SERVICE}" "kogito-jobs-service" "${dbType}"

componentAction "${INFINISPAN}" "infinispan"
Expand Down
2 changes: 1 addition & 1 deletion kogito-quarkus-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<module>pmml-event-driven-quarkus</module>
<module>pmml-incubation-api-quarkus</module>
<module>pmml-quarkus-example</module>
<module>process-business-calendar-example</module>
<module>process-business-calendar-quarkus-example</module>
<module>process-business-rules-quarkus</module>
<module>process-decisions-quarkus</module>
<module>process-decisions-rest-quarkus</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<version>999-SNAPSHOT</version>
</parent>

<artifactId>process-business-calendar-example</artifactId>
<artifactId>process-business-calendar-quarkus-example</artifactId>
<name>Kogito Example :: Process Business Calendar</name>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The Development Mode will embed all the needed Infrastructure Services (PostgreS
require any extra step.

The `development` profile includes the **Runtime Tools Quarkus Extension** that exposes a new section in the **Quarkus Dev-UI**
unifying the **Management Console** & **Task Console** functionalities. **Quarkus Dev-UI** is available at http://localhost:8080/q/dev
with the **Management Console** functionalities. **Quarkus Dev-UI** is available at http://localhost:8080/q/dev

> **_NOTE:_** For more information about how to work with Kogito Runtime Tools Quarkus Extension, please refer to the [Kogito Documentation](https://docs.kogito.kie.org/latest/html_single/#con-runtime-tools-dev-ui_kogito-developing-process-services) page.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,4 @@
# under the License.
#

spec:
template:
spec:
containers:
- name: kogito-task-console
env:
- name: KOGITO_DATAINDEX_HTTP_URL
valueFrom:
configMapKeyRef:
name: kogito-configs
key: kogito.dataindex.httpurl.with.graphql
- name: KOGITO_TASK_CONSOLE_PROPS
valueFrom:
configMapKeyRef:
name: kogito-configs
key: kogito.taskconsole.props
resources:
limits:
cpu: '1'
memory: 500Mi
requests:
cpu: 10m
memory: 64Mi
quarkus.kafka.devservices.image-name=${container.image.kafka}
Loading
Loading