Disable data persistency 41/141/1
authorRolf Badorek <rolf.badorek@nokia.com>
Mon, 13 May 2019 11:51:45 +0000 (14:51 +0300)
committerRolf Badorek <rolf.badorek@nokia.com>
Mon, 13 May 2019 11:54:45 +0000 (14:54 +0300)
Currently the Redis default setting is used, which is that a periodic
snapshot writing to disk is enabled.

Its implementation is quite optimal, but as backup snapshots are not
needed for anything in current configuration, those are disabled in
this commit.

Redis server instance is defined to be an init process in DBaaS service
pod/container. In case of service restart the container will restart
also. There is no external storage for `/var/lib/redis/dump.rdb`
file and thus its content will be lost in service restart.

Redis data persistency over different failure scenarios is a future
feature candidate of RIC.

Change-Id: Ic9216bcb5067ed59c846e2b7805a78ee675bbc35
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
docker/Dockerfile.redis

index fbd5a3a..8d02fe3 100644 (file)
@@ -23,9 +23,10 @@ RUN apt-get update && \
 # Create suitable configuration file
 RUN sed -i 's/^\(bind .*\)$/# \1/' /etc/redis/redis.conf && \
     sed -i 's/^\(daemonize .*\)$/# \1/' /etc/redis/redis.conf && \
-    sed 's/^protected-mode yes/protected-mode no/' -i /etc/redis/redis.conf
+    sed 's/^protected-mode yes/protected-mode no/' -i /etc/redis/redis.conf && \
+    sed -i 's/^\(save .*\)$/# \1/' /etc/redis/redis.conf && \
+    echo 'save ""' >> /etc/redis/redis.conf
 
 EXPOSE 6379
 
 CMD ["redis-server", "/etc/redis/redis.conf"]
-