yellowjacket
Scalable task runner
Prerequisites
graphql
- Backend (currently only rethinkdb is included)
Notes
- current documentation has been quickly thrown together and will improve with future releases
- Load balancing tested with a simple NGINX configuration
Example
Simple hello world with a rethinkdb backend
ES6
Setup yellowjacket
let backend = graphql // scheduler: takes a node list in and returns a prioritized list// of acceptable runners via done callbacklet { return // schedule on the current runner} // actions: list of actions that can be completed. returns potential status// in done callback or defaults to SUCCESSlet actions = { console }
If installing
If using as a command line
If using as a function call
let command = target: 'runner' action: 'start' options: host: 'localhost' port: 8080
Commands
Commands are constructed by creating an object with the following structure
target: 'targetName' action: 'actionName' options: optionName: optionValue ...
targets
runner
actions
add
optionshost
{String
} - hostname or IP accessible by other nodesport
{Int
} - port to listen on
start
host
{String
} - host name or IP the runner was added withport
{Int
} - port the runner was added withloglevel
: {LogLevelEnum
} - Level of logginglogfile
: {String
} - Path to a log file
stop
- host/port combo or IDid
{String
} - runner IDhost
{String
} - host name or IP the runner was added withport
{Int
} - port the runner was added with
list
- no options lists all runnershost
{String
} - list runners with hostport
{Int
} - list runners with portstate
{RunnerStateEnum
} - list runner with statezone
{String
} - list runner that belongs to zone with ID
CLI Examples
> cli runner add host localhost port 8080
> cli runner list
> cli runner start host localhost port 8080
> cli runner stop host localhost port 8080
zone
options
list
- lists all zones
queue
options
list
- lists all queued tasks
settings
options
list
- lists all settings
types
LogLevelEnum
"silent" | "fatal" | "error" | "warn" | "info" | "debug" | "trace"
RunnerStateEnum
"ONLINE" | "OFFLINE" | "MAINTENANCE" | "UNKNOWN"