-
Notifications
You must be signed in to change notification settings - Fork 211
Commands
As of version 0.3.0, Transporter supports the following commands:
- init - Configure Transporter
- about - List available adaptors
- run - Run Transporter
- test - Test Transporter configuration
- xlog - Manage the commit log
- offset - Manage the offsets for sinks (see xlog)
See also command line switches
transporter init [source adaptor name] [sink adaptor name]
Generates a basic pipeline.js file in the current directory.
Example
$ transporter init mongodb elasticsearch
Writing pipeline.js...
$ cat pipeline.js
var source = mongodb({
"uri": "${MONGODB_URI}"
// "timeout": "30s",
// "tail": false,
// "ssl": false,
// "cacerts": ["/path/to/cert.pem"],
// "wc": 1,
// "fsync": false,
// "bulk": false,
// "collection_filters": "{}"
})
var sink = elasticsearch({
"uri": "${ELASTICSEARCH_URI}"
// "timeout": "10s", // defaults to 30s
// "aws_access_key": "ABCDEF", // used for signing requests to AWS Elasticsearch service
// "aws_access_secret": "ABCDEF" // used for signing requests to AWS Elasticsearch service
})
t.Source(source).Save(sink)
// t.Source("source", source).Save("sink", sink)
// t.Source("source", source, "/.*/").Save("sink", sink, "/.*/")
Edit the pipeline.js file to configure the source and sink. Uncomment the version of the pipeline command at the end that best suits the complexity of your use case.
transporter about [adaptor name]
Lists all the adaptors currently available. Given an adaptor name as a parameter, about will provide configuration details for that adaptor.
Example
$ transporter about
elasticsearch - an elasticsearch sink adaptor
file - an adaptor that reads / writes files
mongodb - a mongodb adaptor that functions as both a source and a sink
postgres - a postgres adaptor that functions as both a source and a sink
rabbitmq - an adaptor that handles publish/subscribe messaging with RabbitMQ
rethinkdb - a rethinkdb adaptor that functions as both a source and a sink
$ transporter about rethinkdb
rethinkdb - a rethinkdb adaptor that functions as both a source and a sink
Sample configuration:
{
"uri": "${RETHINKDB_URI}"
// "timeout": "30s",
// "tail": false,
// "ssl": false,
// "cacerts": ["/path/to/cert.pem"]
}
$
transporter run [-log.level "info"] [<application.js>]
Runs the pipeline script file which has its name given as the final parameter. If not given, run defaults to using pipeline.js.
transporter test [-log.level "info"] [<application.js>]
Evaluates and connects the pipeline, sources and sinks. If not given, run defaults to using pipeline.js. Establishes connections but does not run. Prints out the state of connections at the end. Useful for debugging new configurations.
transporter xlog --log_dir=/path/to/log oldest|current|show [OFFSET]
TBD
transporter offset --log_dir=/path/to/log list|show|mark|delete [SINK] [OFFSET]
TBD
-log.level "info" - sets the logging level. Default is info; can be debug or error.
Transporter is open source, built by the good people of Compose (and you, if you want to contribute).