Retrieves a JavaScript file from key-value store and executes it
50K+
$ ./vamp-workflow-agent -help
Usage of ./vamp-workflow-agent:
-help
Print usage.
-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.
Using the build.sh script:
./build.sh --make
Alternatively:
go get github.com/tools/godepgodep restorego installCGO_ENABLED=0 go build -v -a -installsuffix cgoDeliverable is in target/go directory.
Released binaries can be also downloaded.
$ ./build.sh -h
Usage of ./build.sh:
-h|--help Help.
-l|--list List built Docker images.
-r|--remove Remove Docker image.
-m|--make Build the binary and copy it to the Docker directories.
-b|--build Build Docker image.
-a|--all Build all binaries, by default only linux:amd64.
Vamp Workflow Agent:
/usr/local/vamp/workflow.jsnode /usr/local/vamp/workflow.jsImportant environment variables:
VAMP_KEY_VALUE_STORE_TYPE <=> confd -backend
VAMP_KEY_VALUE_STORE_CONNECTION <=> confd -node
VAMP_KEY_VALUE_STORE_PATH <=> key used by confd
VAMP_WORKFLOW_EXECUTION_PERIOD <=> $executionPeriod
VAMP_WORKFLOW_EXECUTION_TIMEOUT <=> $executionTimeout
More details: package.json
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 \
magneticio/vamp-workflow-agent:katana
In this example JavaScript is read from /scripts entry.
Content type
Image
Digest
Size
36.4 MB
Last updated
about 6 years ago
docker pull magneticio/vamp-workflow-agent:ci-928-PR-48