Transforming JavaScript
piveau-consus-transforming-js
Transforming JavaScript APIs#
The transforming js component just have the pipe endpoint to receive pipe descriptions /pipe
.
The API description of this endpoint, as html rendered documentation, is accessible through the root context.
The OpenAPI itself can be downloaded via
The REST API also provides a health endpoint for cluster deployments to support liveness and startup probes:
The transforming js component needs to communicate with other consus components.
Note
In case of a container deployment there is not need to route the endpoints to the outside as long as the rest is also running inside the same cluster.
Docker Image#
Run docker image:
$ docker run -it -p 8080:8080 https://registry.gitlab.com/piveau/consus/piveau-consus-transforming-js:latest
Helm Chart#
Note
There is also a consus helm chart available.
It is important to verify the JVM heap size in javaOpts and to set the CPU/Memory resources to something suitable for your cluster.
$ helm repo add paca https://paca.fokus.fraunhofer.de/repository/helm-charts
$ helm install <release-name> paca/piveau-consus-transforming-js
You can adjust your release by using the --set parameter=value
parameter:
Or by passing a value file, e.g.:
Container Mounting Points#
Scripts#
You can mount additional scripts via
Configuration#
The following environment variables can be used to configure the transforming js component.
Variable | Description | Default Value |
---|---|---|
PIVEAU_PIPE_ENDPOINT_PORT |
The service port to use. | 8080 |
PIVEAU_FAVICON_PATH |
Path to favicon, used in OpenAPI rendering. | webroot/images/favicon.png |
PIVEAU_LOGO_PATH |
Path to logo, used in OpenAPI rendering. | webroot/images/logo.png |
Logging:
Variable | Description | Default Value |
---|---|---|
PIVEAU_PIPE_LOG_APPENDER |
Configures the log appender for the pipe context | STDOUT |
LOGSTASH_HOST |
The host of the logstash service | logstash |
LOGSTASH_PORT |
The port the logstash service is running | 5044 |
PIVEAU_PIPE_LOG_PATH |
Path to the file for the file appender | logs/piveau-pipe.%d{yyyy-MM-dd}.log |
PIVEAU_PIPE_LOG_LEVEL |
The log level for the pipe context | INFO |
PIVEAU_LOG_LEVEL |
The log level for the service console. | INFO |