Skip to content

Scheduling

piveau-consus-scheduling

Scheduling APIs#

The scheduling component provides a REST API for managing triggers. The API description as html rendered is accessible through the root context. The OpenAPI itself can be downloaded via

http://piveau-consus-scheduling:8080/openapi.yaml

Note

It is not yet necessary to make this endpoint external if you just use it for maintenance. As soon as a front end is available, this could change.

The REST API also provides a health endpoint for cluster deployments to support liveness and startup probes:

http://piveau-consus-scheduling:8080/health

The scheduler needs to communicate with all other consus components. This is especially true in regard to the pipe starting modules, usually the importers.

Note

In a cluster environment it makes sense to make the trigger endpoint and/or the CLI interfaces accessible from the outside of the cluster.

Mounting Points#

Trigger Persistence#

The scheduling component contains a build in persistence db for triggers. The mounting point is

/usr/verticles/db

Pipes#

The mounting point for additional pipes is

/usr/verticles/pipes

Configuration#

The following environment variables can be used to configure the scheduling component.

Variable Description Default Value
PORT Port this service will run on. 8080
PIVEAU_CLUSTER_CONFIG Json object describing the mapping between service name and endpoint. No default value
PIVEAU_SHELL_CONFIG Json object describing shell endpoints. No default value
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

Command Line Interface#

You can enable a CLI access for scheduling:

telnet

$ telnet localhost 5000
html
http://piveau-consus-schduling:8085/shell.html

The access point can be configured via the following environment variable that takes a JSON object:

env PIVEAU_SHELL_CONFIG={}

This JSON object should look like this:

{
  "http": {
    "host": "0.0.0.0",
    "port": 8085
  },
  "telnet": {
    "host": "0.0.0.0",
    "port": 5000    
  }
}

The example shows both available options, a simple http access and a telnet access, with the default values. E.g. if you just want to have telnet access enabled with default values (port 5000 on all network interfaces) you can just set { "telnet": {} }.

Warning

The access points are not secured!