add bundle:redis, add redis support to pretalx
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-01-29 15:58:54 +01:00
parent ce76430b4d
commit fd421bf6f8
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 104 additions and 0 deletions

View file

@ -22,3 +22,13 @@ user =
password =
tls = False
ssl = False
% if node.has_bundle('redis'):
[celery]
backend = redis://127.0.0.1/1
broker = redis://127.0.0.1/2
[redis]
location = redis://@127.0.0.1:6379/3
session = True
% endif

View file

@ -0,0 +1,50 @@
activerehashing yes
aof-load-truncated yes
aof-rewrite-incremental-fsync yes
appendfilename "appendonly.aof"
appendfsync everysec
appendonly ${node.metadata.get('redis', {}).get('appendonly', "no")}
auto-aof-rewrite-min-size 64mb
auto-aof-rewrite-percentage 100
bind ${node.metadata.get('redis', {}).get('bind', "127.0.0.1")}
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit pubsub 32mb 8mb 60
client-output-buffer-limit slave 256mb 64mb 60
daemonize yes
databases 16
dbfilename dump.rdb
dir /var/lib/redis
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
hll-sparse-max-bytes 3000
hz 10
latency-monitor-threshold 0
list-max-ziplist-entries 512
list-max-ziplist-value 64
logfile /var/log/redis/redis-server.log
loglevel notice
lua-time-limit 5000
no-appendfsync-on-rewrite no
notify-keyspace-events ""
pidfile /var/run/redis/redis-server.pid
port 6379
rdbchecksum yes
rdbcompression yes
repl-disable-tcp-nodelay no
repl-diskless-sync no
repl-diskless-sync-delay 5
save 300 10
save 60 10000
save 900 1
set-max-intset-entries 512
slave-priority 100
slave-read-only yes
slave-serve-stale-data yes
slowlog-log-slower-than 10000
slowlog-max-len 128
stop-writes-on-bgsave-error yes
tcp-backlog 511
tcp-keepalive 0
timeout 0
zset-max-ziplist-entries 128
zset-max-ziplist-value 64

22
bundles/redis/items.py Normal file
View file

@ -0,0 +1,22 @@
svc_systemd = {
'redis-server': {
'needs': {
'file:/etc/redis/redis.conf',
},
},
}
files = {
'/etc/redis/redis.conf': {
'content_type': 'mako',
'mode': '0640',
'owner': 'redis',
'group': 'redis',
'needs': {
'pkg_apt:redis-server',
},
'triggers': {
'svc_systemd:redis-server:restart',
},
},
}

21
bundles/redis/metadata.py Normal file
View file

@ -0,0 +1,21 @@
defaults = {
'apt': {
'packages': {
'redis-server': {},
},
},
'backups': {
'paths': {
'/var/lib/redis',
},
},
'icinga2_api': {
'redis': {
'services': {
'REDIS PROCESS': {
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -C redis-server -c 1:',
},
}
},
},
}

View file

@ -10,6 +10,7 @@ nodes['voc.pretalx'] = {
'pretalx',
'postfix',
'postgresql',
'redis',
'sshmon',
},
'metadata': {