Commit 0d286c5d authored by Kirill Smelkov's avatar Kirill Smelkov

gitlab: Redis service

Organize internal Redis service, like with PostgreSQL in the previous
patch, with the help of slapos.cookbook:redis.server recipe.

Like with postgresql, and as we planned, redis listens only on
internal-to-partition unix socket.

The recipe establishes both service and promise to check it is alive;
we only need to setup log rotation manually.

/cc @kazuhiko, @jerome
parent 470719fe
......@@ -8,6 +8,7 @@ parts =
directory
service-postgresql
service-redis
service-cron
......@@ -112,6 +113,42 @@ command-line =
# [logrotate-entry-postgresql]
#############
# Redis #
#############
[redis]
recipe = slapos.cookbook:mkdirectory
srv = ${directory:srv}/redis
log = ${directory:log}/redis
[service-redis]
recipe = slapos.cookbook:redis.server
wrapper = ${directory:service}/redis
promise_wrapper = ${directory:promise}/redis
server_dir = ${redis:srv}
config_file = ${directory:etc}/redis.conf
log_file = ${redis:log}/redis.log
pid_file = ${directory:run}/redis.pid
use_passwd = false
unixsocket = ${:server_dir}/redis.socket
# port = 0 means "don't listen on TCP at all" - listen only on unix socket
ipv6 = ::1
port = 0
server_bin = {{ redis_binprefix }}/redis-server
depend =
${logrotate-entry-redis:recipe}
# NOTE slapos.cookbook:redis.server setups promise automatically
[logrotate-entry-redis]
<= logrotate-entry
log = ${redis:log}/*.log
#############
# cron #
......
......@@ -29,3 +29,4 @@ context =
raw gzip_bin ${gzip:location}/bin/gzip
raw logrotate_bin ${logrotate:location}/usr/sbin/logrotate
raw postgresql_location ${postgresql92:location}
raw redis_binprefix ${redis28:location}/bin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment