Zenaton white logo

Agents

Installation

To install your Agent on your computer, just type:

curl https://install.zenaton.com | sh
Depending on your configuration, you may be asked for a password to allow global installation of Zenaton.

If you need to deploy the Agent on a particular system like Docker, Heroku, or Clever Cloud, we have some precooked solutions for you.

Update your Agent

To update your Agent to the latest version, just follow the installation instructions above.

Launch

To have your Agent listening for tasks to execute, just type:

zenaton listen <parameters>

Your parameters can be in a .env file, then you just need to provide it:

zenaton listen --env=<path/to/.env/file>

or can be inlined:

zenaton listen --<name>=<value>

If you mix both notations, inlined parameters will be prioritized.

Parameters

NameInlinedDefaultDescription
env./.envlocation of .env file containing configuration
boot- location of boot file containing initialisation needed to be done before executing a task. This typically depends on your language. See Below.
ZENATON_APP_IDapp_id- Your application id - to listen only workflows started by your application (refer to Zenaton API section);
ZENATON_API_TOKENapi_token- your API token - to prove you have rights to access above application (refer to Zenaton API section);
ZENATON_APP_ENVapp_env- your Zenaton environment - to distinguish workflows launched in production from workflows launched during development - typically "production", "staging", "dev" or your first name).
ZENATON_CONCURRENT_MAXconcurrent_max10 Maximum number of tasks that the Agent can execute concurrently
ZENATON_HANDLE_ONLYhandle_onlyall List of classes that the Agent should handle and only them - (comma-separated strings)
ZENATON_HANDLE_EXCEPThandle_exceptnone List of classes that the Agent should NOT handle - (comma-separated strings)

Boot file

The Zenaton Agent will load your boot file before executing required tasks. This boot file should typically require all your workflow definitions. (see the examples-ruby repository on Github.)

If you use a framework, you may also need to add instructions to boot it.

Rails

If you are using Rails, you should create an initializer in config/initializers/zenaton.rb like this one.

Zenaton::Client.init(
  Rails.application.credentials.zenaton[:app_id],
  Rails.application.credentials.zenaton[:api_token],
  Rails.env.production? ? 'production' : 'dev'
)

Then from your rails application directory, you can launch your Zenaton Agent with zenaton listen --rails. This will load your rails application code and your local .env file.