-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
KOGITO-5508 Data Index Dev Service #21403
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions
54
docs/src/main/asciidoc/kogito-dev-services-build-time-config.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[.configuration-legend] | ||
icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime | ||
[.configuration-reference, cols="80,.^10,.^10"] | ||
|=== | ||
|
||
h|[[quarkus-kogito-dev-services-build-time-config_configuration]]link:#quarkus-kogito-dev-services-build-time-config_configuration[Configuration property] | ||
|
||
h|Type | ||
h|Default | ||
|
||
a|icon:lock[title=Fixed at build time] [[quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.enabled]]`link:#quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.enabled[quarkus.kogito.devservices.enabled]` | ||
|
||
[.description] | ||
-- | ||
If DevServices has been explicitly enabled or disabled. DevServices is generally enabled by default, unless there is an existing configuration present. When DevServices is enabled Quarkus will attempt to automatically configure and start a Data Index when running in Dev mode. | ||
--|boolean | ||
|true | ||
|
||
|
||
a|icon:lock[title=Fixed at build time] [[quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.image-name]]`link:#quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.image-name[quarkus.kogito.devservices.image-name]` | ||
|
||
[.description] | ||
-- | ||
The container image name to use. | ||
--|string | ||
|quay.io/kiegroup/kogito-data-index-ephemeral | ||
|
||
|
||
a|icon:lock[title=Fixed at build time] [[quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.port]]`link:#quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.port[quarkus.kogito.devservices.port]` | ||
|
||
[.description] | ||
-- | ||
Optional fixed port the dev service will listen to. | ||
If not defined, the port will be chosen randomly. | ||
--|int | ||
|8180 | ||
|
||
a|icon:lock[title=Fixed at build time] [[quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.shared]]`link:#quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.shared[quarkus.kogito.devservices.shared]` | ||
|
||
[.description] | ||
-- | ||
Indicates if the Data Index instance managed by Quarkus Dev Services is shared. When shared, Quarkus looks for running containers using label-based service discovery. If a matching container is found, it is used, and so a second one is not started. Otherwise, Dev Services for Kogito starts a new container. The discovery uses the `kogito-dev-service-data-index` label. The value is configured using the service-name property. Container sharing is only used in dev mode. | ||
--|boolean | ||
|true | ||
|
||
a|icon:lock[title=Fixed at build time] [[quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.service-name]]`link:#quarkus-kogito-dev-services-build-time-config_quarkus.kogito.devservices.service-name[quarkus.kogito.devservices.service-name]` | ||
|
||
[.description] | ||
-- | ||
The value of the `kogito-dev-service-data-index` label attached to the started container. This property is used when shared is set to true. In this case, before starting a container, Dev Services for Kogito looks for a container with the `kogito-dev-service-data-index` label set to the configured value. If found, it will use this container instead of starting a new one. Otherwise it starts a new container with the `kogito-dev-service-data-index` label set to the specified value. This property is used when you need multiple shared Data Index instances. | ||
--|string | ||
|kogito-data-index | ||
|
||
|=== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
//// | ||
This guide is maintained in the main Quarkus repository | ||
and pull requests should be submitted there: | ||
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc | ||
//// | ||
= Dev Services for Kogito | ||
|
||
include::./attributes.adoc[] | ||
|
||
If any Kogito process-related extension is present (e.g. `kogito-quarkus` or `kogito-quarkus-processes`), Dev Services for Kogito automatically starts a Data Index in dev mode. | ||
So, you don't have to start it manually or have any other service set-up manually. | ||
The application is configured automatically, meaning that will replicate any | ||
Kogito messaging events related to Process Instances and User Tasks into the provisioned Data Index instance. | ||
|
||
Additionally, link:dev-ui[Dev UI] available at http://localhost:8080/q/dev[/q/dev] complements this feature with a Dev UI page which helps to Query Data Index via its GraphiQL UI. | ||
|
||
image::dev-ui-kogito-data-index-card.png[alt=Dev UI Kogito,role="center"] | ||
|
||
image::dev-ui-kogito-data-index.png[alt=Dev UI Kogito Data Index GraphiQL,role="center"] | ||
|
||
For more details about how to query data about processes and user tasks, please visit https://docs.kogito.kie.org/latest/html_single/#ref-data-index-service-queries_kogito-configuring[Kogito Data Index documentation]. | ||
|
||
== Enabling / Disabling Dev Services for Kogito | ||
|
||
Dev Services for Kogito is automatically enabled unless: | ||
|
||
- `quarkus.kogito.devservices.enabled` is set to `false` | ||
|
||
Dev Services for Kogito relies on Docker to start the broker. | ||
If your environment does not support Docker, you will need to start the broker manually, or connect to an already running Data Index. | ||
|
||
== Shared Data Index | ||
|
||
In case you would like to share the Data Index instance between applications. | ||
Dev Services for Kogito implements a _service discovery_ mechanism for your multiple Quarkus applications running in _dev_ mode to share a single instance. | ||
|
||
NOTE: Dev Services for Kogito starts the container with the `kogito-dev-service-data-index` label which is used to identify the container. | ||
|
||
If you need multiple (shared) Data Index instances, you can configure the `quarkus.kogito.devservices.service-name` attribute and indicate the instance name. | ||
It looks for a container with the same value, or starts a new one if none can be found. | ||
The default service name is `kogito-data-index`. | ||
|
||
Sharing is enabled by default in dev mode. | ||
You can disable the sharing with `quarkus.kogito.devservices.shared=false`. | ||
|
||
== Setting the port | ||
|
||
By default, Dev Services for Kogito starts a Data Index using port 8180. | ||
You can set the port by configuring the `quarkus.kogito.devservices.port` property. | ||
|
||
== Configuring the image | ||
|
||
Dev Services for Kogito uses: `kiegroup/kogito-data-index-ephemeral` images. | ||
You can select any version from https://quay.io/repository/kiegroup/kogito-data-index-ephemeral?tab=tags. | ||
|
||
[source, properties] | ||
---- | ||
quarkus.kogito.devservices.image-name=quay.io/kiegroup/kogito-data-index-ephemeral | ||
---- | ||
|
||
== References | ||
|
||
* link:dev-ui[Dev UI] | ||
* https://docs.kogito.kie.org/latest/html_single/[Kogito Documentation] | ||
* link:kogito.adoc[Quarkus - Kogito] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this file auto-generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is but in this case it comes from an outside extension.