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

Fix kie-issues #1217 Remove infinispan based images from a few examples #1927

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pipeline {
String[] versionSplit = getKogitoVersion().split("\\.")
String reducedTag = "${versionSplit[0]}.${versionSplit[1]}"
sh """
grep -r -l --exclude-dir=.ci 'quay.io/kiegroup' | xargs -I{} sed -i 's|quay.io/kiegroup/\\(.*\\):.*|quay.io/kiegroup/\\1:${reducedTag}|g' {}
grep -r -l --exclude-dir=.ci 'docker.io/apache/incubator-kie-' | xargs -I{} sed -i 's|docker.io/apache/incubator-kie-\\(.*\\):.*|docker.io/apache/incubator-kie-\\1:${reducedTag}|g' {}
"""
}
}
Expand Down
31 changes: 0 additions & 31 deletions kogito-quarkus-examples/dmn-tracing-quarkus/Dockerfile

This file was deleted.

3 changes: 1 addition & 2 deletions kogito-quarkus-examples/dmn-tracing-quarkus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,5 @@ Example response:
## Integration example with Trusty Service

When the tracing addon is enabled, the tracing events are emitted and pushed to a Kafka broker. The [Trusty Service](https://github.com/apache/incubator-kie-kogito-apps/tree/main/trusty) can consume such events and store them on a storage. The Trusty Service exposes then some api to consume the information that has been collected.
A `docker-compose` example is provided in the current folder. In particular, when `docker-compose up` is run, a Kafka broker, an Infinispan container and the latest build of the trusty service configured to use Infinispan are deployed.
Once the services are up and running, after a decision has been evaluated, you can access the trusty service API to list the evaluations at `localhost:8081/executions` for example.


77 changes: 0 additions & 77 deletions kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose.yml

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion kogito-quarkus-examples/kogito-travel-agency/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and to start any any place.
Consists of single service that has both business logic and decision logic included.

[Travel agency and visa services with persistence](extended) - deals with all the basic steps to book flight and hotel.
Consists of two services that have both business logic and decision logic included. Preserves data between service restarts and requires Infinispan server to be available.
Consists of two services that have both business logic and decision logic included. Preserves data between service restarts and requires PostgreSQL server to be available.

## Contribution

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Kogito and Infrastructure services

To allow a quick setup of all services required to run this demo, we provide a docker compose template that starts the following services:
- Infinispan
- PostgreSQL
- Kafka
- Prometheus
- Grafana
Expand Down Expand Up @@ -33,7 +33,7 @@ In order to use it, please ensure you have Docker Compose installed on your mach
docker-compose up

Once all services bootstrap, the following ports will be assigned on your local machine:
- Infinispan: 11222
- PostgreSQL: 5432
- Kafka: 9092
- Prometheus: 9090
- Grafana: 3000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,31 @@ version: '2.1'

services:

infinispan:
image: infinispan/server:14.0.4.Final
container_name: infinispan
postgres:
image: postgres:13.4-alpine3.14
ports:
- "11222:11222"
command: "-c infinispan-demo.xml"
- "5432:5432"
volumes:
- ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml:z
- ./sql:/docker-entrypoint-initdb.d/
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:11222/rest/v2/cache-managers/default/health/status" ]
interval: 1s
timeout: 1s
test: [ "CMD", "pg_isready", "-q", "-d", "kogito", "-U", "kogito-user" ]
timeout: 45s
interval: 10s
retries: 50
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres

pgadmin-compose:
image: dpage/pgadmin4:5.0
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: pass
ports:
- 8055:80
depends_on:
- postgres
container_name: pgadmin-container

zookeeper:
container_name: zookeeper
Expand Down Expand Up @@ -110,26 +122,27 @@ services:

data-index:
container_name: data-index
image: quay.io/kiegroup/kogito-data-index-infinispan:${KOGITO_VERSION}
image: docker.io/apache/incubator-kie-kogito-data-index-postgresql:${KOGITO_VERSION}
ports:
- "8180:8080"
depends_on:
kafka:
condition: service_started
infinispan:
postgres:
condition: service_healthy
volumes:
- ./target/protobuf:/home/kogito/data/protobufs/
environment:
QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222
QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false"
QUARKUS_HTTP_CORS_ORIGINS: "/.*/"
QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kogito"
QUARKUS_DATASOURCE_USERNAME: kogito-user
QUARKUS_DATASOURCE_PASSWORD: kogito-pass
KAFKA_BOOTSTRAP_SERVERS: kafka:29092
KOGITO_DATA_INDEX_PROPS: -Dkogito.protobuf.folder=/home/kogito/data/protobufs/
QUARKUS_HTTP_CORS_ORIGINS: "/.*/"
KOGITO_DATA_INDEX_PROPS: -Dquarkus.hibernate-orm.database.generation=update

management-console:
container_name: management-console
image: quay.io/kiegroup/kogito-management-console:${KOGITO_VERSION}
image: docker.io/apache/incubator-kie-kogito-management-console:${KOGITO_VERSION}
ports:
- 8280:8080
depends_on:
Expand All @@ -146,7 +159,7 @@ services:

task-console:
container_name: task-console
image: quay.io/kiegroup/kogito-task-console:${KOGITO_VERSION}
image: docker.io/apache/incubator-kie-kogito-task-console:${KOGITO_VERSION}
ports:
- 8380:8080
depends_on:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CREATE ROLE "kogito-user" WITH
LOGIN
SUPERUSER
INHERIT
CREATEDB
CREATEROLE
NOREPLICATION
PASSWORD 'kogito-pass';

CREATE DATABASE kogito
WITH
OWNER = "kogito-user"
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;

GRANT ALL PRIVILEGES ON DATABASE kogito TO "kogito-user";
GRANT ALL PRIVILEGES ON DATABASE kogito TO postgres;
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ sh ./startServices.sh

Once all services bootstrap, the following ports will be assigned on your local machine:

- Infinispan: 11222
- PostgreSQL: 5432
- Kafka: 9092
- Data Index: 8180
- Keycloak server: 8480
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-monitoring-prometheus</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-persistence-infinispan</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-events-process</artifactId>
Expand Down Expand Up @@ -147,6 +143,35 @@
<artifactId>kie-addons-quarkus-source-files</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>postgresql</id>
<properties>
<quarkus.profile>postgresql</quarkus.profile>
<skipTests>true</skipTests>
</properties>
<dependencies>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<build>
<finalName>${project.artifactId}</finalName>
<resources>
Expand Down
Loading
Loading