Configuration¶
To get started, the Ponos agent uses a YAML configuration file. Below are the different expected keys and their default value.
url
¶
URL of the Arkidnex instance to which the Ponos agent must register.
farm_id
¶
ID of the Arkindex farm to which the Ponos agent belongs. To retrieve this ID please use the admin interface of the Arkindex instance or contact an administrator.
Note
A farm can have several Ponos agents.
seed
¶
Seed of the Arkindex farm to which the Ponos agent belongs. To retrieve this seed please use the admin interface of the Arkindex instance or contact an administrator.
data_dir
¶
Directory that will be used to store various files later to enable Arkindex tasks to be processed. Defaults to /usr/share/ponos/data
.
Warning
The Ponos agent must have write access rights to this directory.
Note
This key expands environment variables.
pid_file
¶
Unique file used to store the PID of the Ponos agent currently running. Used to ensure that there is only one Ponos agent running on the host. Defaults to /tmp/ponos.pid
.
Note
This key expands environment variables.
logging
¶
Logging parameters.
logging.level
¶
Level used to display logs. Can be one of the available levels: NOTSET
, DEBUG
, INFO
(recommended in production), WARNING
, ERROR
or CRITICAL
. Defaults to INFO
.
logging.path
¶
File where logs will be stored.
Note
This key expands environment variables.
sentry
¶
Sentry parameters. This is used to track errors from the Ponos agent on a Sentry account.
sentry.dsn
¶
Sentry DNS to use to recover errors related to the execution of the Ponos agent.
sentry.environment
¶
Sentry environment to use to identify errors related to the execution of the Ponos agent. Defaults to production
.
Example¶
Below is an example of a YAML configuration file to start a Ponos agent.
url: http://localhost:8000/ # Required
farm_id: farm_ID # Required
seed: seed_ID # Required
data_dir: /tmp # Defaults to `/usr/share/ponos/data`
pid_file: /var/run/ponos.pid # Defaults to `/tmp/ponos.pid`
logging: # Defaults to `{}`
level: DEBUG # Defaults to `INFO`
path: /var/log/ponos.log # Defaults to `None`
sentry:
dsn: https://xxx.sentry.io/yyy # Defaults to `None`
environment: dev # Defaults to `production`
Generic Ponos agent¶
The configuration described above is as generic as possible. We have currently implemented two agents for that configuration: using Docker engine for standard hardware, and Slurm for super-computers.
Info
Either the docker
or slurm
section can be defined. If neither is defined, Ponos agent will start in a Docker mode by default.