Name: transporter
Owner: appbase.io
Description: Sync data between persistence engines, like ETL only not stodgy
Created: 2016-05-15 08:42:38.0
Updated: 2016-06-03 16:49:05.0
Pushed: 2016-06-10 10:09:40.0
Homepage: null
Size: 3715
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Compose helps with database transformations from one store to another. It can also sync from one to another or several stores.
go get github.com/compose/transporter
cd $GOPATH/src/github.com/compose/transporter
git remote add fork https://github.com/appbaseio/transporter
git pull fork master
make sure godep is installed, go get github.com/tools/godep
and then build with
godep restore
godep go build -a ./cmd/...
Create a build
godep go install ./cmd/...
There is a sample config in test/config.yaml. The config defines the endpoints, (either sources or sinks) that are available to the application.
terval: 60s # time interval between metrics posts to the api endpoint
i: "http://requestb.in/1a0zlf11"
s:
calmongo:
type: mongo
uri: mongodb://localhost/boom
pernick:
type: elasticsearch
uri: http://10.0.0.1,10.0.0.2:9200/indexname
bug:
type: file
uri: stdout://
ofile:
type: file
uri: file:///tmp/foo
dout:
type: file
uri: stdout://
There is also a sample 'application.js' in test/application.js. The application is responsible for building transporter pipelines. Given the above config, this Transporter application.js will copy from a file (in /tmp/foo) to stdout.
ce({name:"foofile"}).save({name:"stdout"})
This application.js will copy from the local mongo to a file on the local disk
ce({name:"localmongo", namespace: "boom.foo"}).save({name:"tofile"})
Transformers can also be configured in the application.js as follows
pipeline = Source({name:"mongodb-production", namespace: "compose.milestones2"})
line = pipeline.transform("transformers/transform1.js").transform("transformers/transform2.js")
line.save({name:"supernick", namespace: "something/posts2"});
transporter list --config ./test/config.yaml
transporter run --config ./test/config.yaml ./test/application.js
transporter eval --config ./test/config.yaml 'Source({name:"localmongo", namespace: "boom.foo"}).save({name:"tofile"})'
transporter test --config ./test/config.yaml test/application.js
brew install hg
Homebrew Guide/Installgo help gopath
in terminal.cd $GOPATH; mkdir src pkg bin
mkdir -p src/github.com/compose; cd src/github.com/compose
git clone https://github.com/compose/transporter; cd transporter
go get -a ./cmd/...
go build -a ./cmd/...
At this point you should be able to run transporter via $GOPATH/bin/transporter
, you may need to add $GOPATH to your PATH environment variable. Something along the lines of export PATH="$GOPATH/bin:$PATH"
should work.
transporter
grant up
grant ssh
ant> ./run-test
See READMEWINDOWS.md
Want to help out with Transporter? Great! There are instructions to get you started here.
Want to talk about Transporter? Join us in #compose on irc.freenode.net!
Transporter is licensed under the New BSD License. See LICENSE for full license text.