magneticio / vamp-workflow-agent

Vamp Workflow Agent
Apache License 2.0
2 stars 0 forks source link

Vamp Workflow Agent

Join the chat at https://gitter.im/magneticio/vamp Docker Build Status Download

Usage

$ ./vamp-workflow-agent -help

Usage of ./vamp-workflow-agent:
  -help
        Print usage.
  -httpPort int
        HTTP port. (default 8080)
  -uiPath string
        Path to UI static content. (default "./ui/")
  -workflow string
        Path to workflow file. (default "/usr/local/vamp/workflow.js")
  -executionPeriod int
        Period between successive executions in seconds (0 if disabled).
  -executionTimeout int
        Maximum allowed execution time in seconds (0 if no timeout).

Some arguments are mandatory and if they are not provided, agent will try to get them from environment variables. For environment variable names check out Executing Workflow.

Building Binary

Using make:

make vamp-workflow-agent

Alternatively:

go get -d ./...
go install
CGO_ENABLED=0 go build -v -a -installsuffix cgo

Released binaries can be also downloaded.

Building Docker Images

Building the vamp-workflow-agent Docker image includes building the Go binary, downloading the vamp-node-client and building the workflow UI.

make

Docker images after the build: magneticio/vamp-workflow-agent:katana

For more details on available targets see the contents of the Makefile.

Executing Workflow

Vamp Workflow Agent:

Important environment variables:

Parameters related to Vamp Node.js client:

Vamp JavaScript API vamp-node-client

More details: package.json

Docker Images

Docker Hub repo.

Example:

docker run -e VAMP_KEY_VALUE_STORE_TYPE=zookeeper \
           -e VAMP_KEY_VALUE_STORE_CONNECTION=localhost:2181 \
           -e VAMP_KEY_VALUE_STORE_PATH=/scripts \
           -e VAMP_WORKFLOW_EXECUTION_PERIOD=0 \
           -e VAMP_WORKFLOW_EXECUTION_TIMEOUT=10 \
           -e VAMP_ELASTICSEARCH_URL=http://localhost:9200 \
           magneticio/vamp-workflow-agent:katana

In this example JavaScript is read from /scripts entry.