Aegis documentation

#Cube: redis

Redis 8 listening on loopback, with its own data directory and a Unix socket for local clients.

In the panel: Database → Redis. Every write there is a task.

#Configuration

toml
[redis]port = 6379user = "redis"                    # operating-system accountconfig_dir = "/aegis/config/redis"data_dir = "/aegis/data/redis"run_dir = "/aegis/run/redis"log_dir = "/aegis/logs/redis"maxmemory = "256mb"maxmemory_policy = "allkeys-lru"
KeyDefaultMeaning
port6379TCP port, bound to 127.0.0.1
userredissystem account, created if missing
config_dir/aegis/config/redisaegis-redis.conf
data_dir/aegis/data/redisRDB snapshots
run_dir/aegis/run/redispid file and redis.sock
log_dir/aegis/logs/redisredis.log
maxmemory256mbcache ceiling; eviction starts here
maxmemory_policyallkeys-lruwhat to evict under pressure

#Files

text
<redis.config_dir>/└── aegis-redis.conf          server configuration (0640)<redis.data_dir>/             RDB dumps (``dir`` in the configuration)<redis.run_dir>/├── redis.pid└── redis.sock<redis.log_dir>/└── redis.log

#Commands

bash
aegis cubes redis configure      # directories, configuration, startaegis cubes redis validate       # redis-cli pingaegis cubes redis reload         # restart: configuration is read at startupaegis cubes redis start|stop|restart|statusaegis cubes redis expose

#Process

toml
[services.redis]command  = <prefix>/bin/redis-server <config_dir>/aegis-redis.confpid_file = <run_dir>/redis.piduser     = redis

Redis runs with daemonize no, so the keeper owns the process and Redis writes its own pid file.

#expose

bash
aegis cubes redis exposecube           redisinstalled      /aegis/apps/data/redis/8.10configuration  /aegis/config/redisstate          running pid 888811log            /aegis/logs/redis/redis.logconfig         /aegis/config/redis/aegis-redis.confdata           /aegis/data/redisport           6379socket         /aegis/run/redis/redis.sockpublished      /aegis/bin/redis-server /aegis/bin/redis-cli 

#Notes

  • The account redis is created on the first configure.
  • Every directory the server touches is owned by that account: Redis opens its
  • log file itself and fails with Can't open the log file: Permission denied otherwise.

  • redis-cli in the published wrapper needs LD_LIBRARY_PATH, like every other
  • built binary.