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

kie-issues#1599: Remove Task Console usage from kogito-examples #2033

Merged
merged 10 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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 @@ -143,7 +143,7 @@ cd <path_to_process-usertasks-quarkus-with-console>/docker-compose
3. Run the ```startServices.sh``` script

```bash
sh ./startServices.sh
ljmotta marked this conversation as resolved.
Show resolved Hide resolved
./startServices.sh
```

Once all services bootstrap, the following ports will be assigned on your local machine:
Expand Down Expand Up @@ -173,6 +173,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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this additional instruction. It helped me to run the UI (localhost:8080), unfortunately, I was not able to see travels in the board, once I clicked Book your trip, Here is the form screenshot that I submitted.
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the example is very outdated using the old quay.io images. Currently we should use the docker.io/apache images. Additionally, I'm not sure why the example isn't working, it would take further debugging that is out of the scope of this PR. I'll create a new issues to tackle these problems.

```

### Compile and Run in Local Dev Mode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ cd <path_to_process-usertasks-quarkus-with-console>/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 +117,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
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'

This file was deleted.

This file was deleted.

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
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
ljmotta marked this conversation as resolved.
Show resolved Hide resolved
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
Loading
Loading