This is the backend companion of the Kaoto project.
This is the API companion for the Kaoto frontend. It is designed as an hexagonal architecture, decoupled and modularized to be able to easily add your own DSL, and with maintainability in mind.
This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
There is a nightly dockerized container for the Kaoto backend. You can run it with the following command:
docker run --rm -d -p 8081:8081 kaotoio/backend
If you want to use it with Kaoto-ui, don't forget to set CORS origins via QUARKUS_HTTP_CORS_ORIGINS env, e.g.:
docker run --rm -d -p 8081:8081 -e QUARKUS_HTTP_CORS_ORIGINS='https://localhost:1337' kaotoio/backend
Kaoto-backend provides OpenTelemetry tracing. By default, OpenTelemetry SDK Autoconfigure is disabled.
It can be enabled by quarkus.otel.sdk.disabled=false
NOTE: When OpenTelemetry is enabled, by default, the OTLP Exporter (e.g. Jaeger) is expected on
https://localhost:4317/
endpoint. That endpoint can be overridden viaquarkus.otel.exporter.otlp.traces.endpoint
configuration property.
For more information and all configuration properties, see Quarkus OpenTelemetry guide.
CORS filter is enabled by default.
For proper functionality with the Kaoto-ui, it is necessary to set quarkus.http.cors.origins
configuration property with Kaoto-ui URL(s).
For more information and all configuration properties, see Quarkus HTTP Reference
NOTE: When you run Kaoto-backend in the dev mode, all origins are accepted. (
origins: /.*/
)
Actual versions of resources:
- Kaoto camel components: 3ee2af43623923a5c5e09df6f3f70657e1ccd09f
- Kaoto view definitions: 94aae37dee4356d51ac34bfb757eb43a85ad2c0a
- Camel-connectors: 3.21.0
- Camel-kamelets: 3.21.0
The repository contains steps repositories zip files which are bundled with Kaoto-backend during building.
For upgrading those resources, run update-resources.sh
script.
Developer documentation is on https://kaotoio.github.io/kaoto-backend/
The API static swagger documentation is on https://kaotoio.github.io/kaoto-backend/api/index.html
You have to install in your machine
- Maven >= 3.6
- JDK >= 17
First you need to build and install the different maven modules.
mvn install
Then you can run your application in dev mode that enables live coding using:
mvn quarkus:dev -pl api
Your app is now deployed on localhost:8081
and you can check the swagger
API on https://localhost:8081/q/swagger-ui/
.
NOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at https://localhost:8081/q/dev/.
NOTE2: During dev mode, the Dev Services for Kubernetes are enabled and require running Docker on your environment. If you don't have Docker, you can disable this functionality by
-Dquarkus.kubernetes-client.devservices.enabled=false
Kaoto can be packaged using:
mvn install
It produces the quarkus-run.jar
file in the api/target/quarkus-app/
directory. Be aware that it’s not an über-jar as
the dependencies are copied into the api/target/quarkus-app/lib/
directory.
If you want to build an über-jar, execute the following command:
mvn install -Dquarkus.package.type=uber-jar
Kaoto backend is now runnable using java -jar api/target/quarkus-app/quarkus-run.jar
.
You can create a native executable using:
mvn install -Pnative
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
mvn install -Pnative -Dquarkus.native.container-build=true
You can then execute your native executable with: .api/target/code-with-quarkus-1.0.0-SNAPSHOT-runner
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html .
Documentation is generated using LeafDoc.
npm install
npm run docs