One Ring has a standalone REST-ish service that provides documentation and can run Spark tasks in local and TeamCity integrated mode.
One Ring REST is configurable via command line and configuration file.
java -jar ./REST/target/one-ring-rest.jar -h
usage: One Ring
-c,--configPath <arg> Path to configuration file
-e,--iface <arg> Server interface. By default, 0.0.0.0 (all interfaces)
-p,--port <arg> Server port. By default, 9996
Default configuration file path is /etc/one-ring/one-ring-rest.conf
and the settings are pretty much straightforward:
tc.instance=http://<host>:<port>
tc.user=<user>
tc.password=<password>
tc.buildType=<build_configuration_ID>
local.driver.memory=<#G or ####M>
aws.profile=default
s3.bucket=<S3_bucket>
If configuration isn't available, One Ring REST will print help and exit.
Endpoints are grouped by their purpose.
For the service status itself.
Get the description of all endpoints as a WADL document, optionally detailed.
Returns just string 'Ok' if service is up and running.
All built-in documentation in mostly Markdown format is served under the path /docs
. It is generated at compile time and describes everything that is available at that moment.
Entry point to docs.
Index of all Package {package.name}
Operations and Adapters.
Description of {operationName}
, generated from Operation's metadata.
Auto-generated example config for Operation {operationName}
in .ini
format.
Auto-generated example config for Operation {operationName}
in JSON format.
Description of Adapter {AdapterName}
, generated from Adapter's metadata.
These endpoints dynamically represent everything that is available to local instance of One Ring at run time, and return JSON object.
List of all Packages.
Lists all Operations in Package {package.name}
.
Returns full TDL descriptions of all operations in Package {package.name}
.
Lists all Adapters in Package {package.name}
.
These endpoints perform tasks.ini
or JSON Process validation and execution.
Consumes JSON Process definition and performs its formal validation. If valid, returns same task converted to .ini
, or HTTP Error 400 otherwise.
Consumes tasks.ini
with optional task prefix and performs its formal validation. If valid, returns same task converted to JSON, or HTTP Error 400 otherwise.
Consumes JSON Process definition and optionally Variables encoded as Base64, and enqueues it into local execution queue. Returns local task ID as a simple string.
Consumes tasks.ini
with optional task prefix and Variables encoded as Base64, and enqueues it into local execution queue. Returns local task ID as a simple string.
Consumes JSON Process definition and optionally Variables encoded as Base64, and passes it to TeamCity. Returns TeamCity task ID as a simple string.
Consumes tasks.ini
with optional task prefix and Variables encoded as Base64, and passes it to TeamCity. Returns TeamCity task ID as a simple string.
Returns current status of a Task with specified local or TeamCity ID taskID
. Might be one of NOT_FOUND
, QUEUED
, RUNNING
, SUCCESS
, or FAILURE
.