Aegis documentation

#Cube: beanstalkd

Beanstalkd 1.13 as a local job queue. It has no configuration file, so the cube renders a small .env file and turns it into command-line flags — the file is still the thing you edit.

#Configuration

toml
[beanstalkd]port = 11300user = "aegis"                    # operating-system accountconfig_dir = "/aegis/config/beanstalkd"binlog_dir = "/aegis/data/beanstalkd"
KeyDefaultMeaning
port11300TCP port, bound to 127.0.0.1
useraegisaccount the daemon drops to
config_dir/aegis/config/beanstalkdrendered .env file the command is built from
binlog_dir/aegis/data/beanstalkdpersistent job log

The .env file is the real input: edit it, run configure, and the daemon is started with the new flags (-l, -p, -b, -u).

#Files

text
<beanstalkd.config_dir>/├── aegis-beanstalkd.env      options, one KEY=VALUE per line└── beanstalkd.pid            written by the keeper<beanstalkd.binlog_dir>/      persistent job log (``-b``)<aegis.root>/logs/beanstalkd/└── beanstalkd.log

#Commands

bash
aegis cubes beanstalkd configure   # options file, start, stats checkaegis cubes beanstalkd validate    # ``stats`` over TCPaegis cubes beanstalkd reload      # restart: options are read at startupaegis cubes beanstalkd start|stop|restart|statusaegis cubes beanstalkd expose

#Options file

ini
BEANSTALKD_LISTEN_ADDR=127.0.0.1BEANSTALKD_LISTEN_PORT=11300BEANSTALKD_BINLOG_DIR=/aegis/data/beanstalkdBEANSTALKD_USER=aegis

The cube maps these to -l, -p, -b and -u. Editing the file and running configure is the whole configuration workflow; server() builds the command from it on every start.

#Process

toml
[services.beanstalkd]command  = <prefix>/bin/beanstalkd -l 127.0.0.1 -p 11300 -b <binlog> -u aegispid_file = <config_dir>/beanstalkd.pid

Beanstalkd writes no pid file, so the keeper records the pid of the process it started; status and stop then work like for any other service.

#expose

bash
aegis cubes beanstalkd exposecube           beanstalkdinstalled      /aegis/apps/data/beanstalkd/1.13configuration  /aegis/config/beanstalkdstate          running pid 889483options        /aegis/config/beanstalkd/aegis-beanstalkd.envbinlog         /aegis/data/beanstalkdport           11300

#Notes

  • validate opens a TCP connection and sends stats, which is exactly what a
  • client does before using the queue.

  • The binlog directory is chowned to the service account; without it the daemon
  • starts and silently loses the persistent queue.