Upgrade to Redis 6.0.9 (#487)
authorRafael dos Santos Silva <xfalcox@gmail.com>
Wed, 11 Nov 2020 15:47:29 +0000 (12:47 -0300)
committerGitHub <noreply@github.com>
Wed, 11 Nov 2020 15:47:29 +0000 (12:47 -0300)
This unlocks using the new I/O Threads feature of Redis 6.X.

In order to support it the redis template file now accepts a parameter
allowing an operator to enable it and pick how many threads.

By default sets threads to 1, which disables the feature and acts like
redis 5.

image/base/install-redis
templates/redis.template.yml

index 00c40e6c97cfc07a6df1570467842d1d11b494ed..7a3cf22bd4c96f2175feee54bfc6be64b69d37c1 100755 (executable)
@@ -2,8 +2,8 @@
 set -e
 
 # version check: https://redis.io/
-REDIS_VERSION=5.0.9
-REDIS_HASH="53d0ae164cd33536c3d4b720ae9a128ea6166ebf04ff1add3b85f1242090cb85"
+REDIS_VERSION=6.0.9
+REDIS_HASH="dc2bdcf81c620e9f09cfd12e85d3bc631c897b2db7a55218fd8a65eaa37f86dd"
 
 cd /tmp
 # Prepare Redis source.
index 44bbca1fd80f968107d2b55e82903d89b9124ee4..b5d2a2b1069e2f35cee4104109a7541b8d457778 100644 (file)
@@ -1,3 +1,6 @@
+params:
+  redis_io_threads: "1"
+
 run:
   - file:
      path: /etc/service/redis/run
@@ -53,6 +56,11 @@ run:
       from: /^protected-mode yes/
       to: "protected-mode no"
 
+  - replace:
+      filename: "/etc/redis/redis.conf"
+      from: "# io-threads 4"
+      to: "io-threads $redis_io_threads"
+
   - exec:
       cmd: echo redis installed
       hook: redis