Skip to content

Commit

Permalink
Merge branch 'main' into renovate/major-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
damacus authored Apr 3, 2024
2 parents 9e9f3a0 + 63bf361 commit 073c7f2
Show file tree
Hide file tree
Showing 10 changed files with 222 additions and 345 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ jobs:
- ubuntu-2204
suite:
- "default"
- "redis-package"
- "sentinel"
- "multisentinel"
redis_version:
- "6.2.14"
- "7.0.15"
- "7.2.4"
fail-fast: false

steps:
Expand All @@ -48,6 +51,7 @@ jobs:
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
REDIS_VERSION: ${{ matrix.redis_version }}
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ This file is used to list changes made in each version of the redisio cookbook.

## Unreleased

- Breaking: support only Redis v6+
- Removed obsolete version checks
- Removed option to configure Virtual Memory, deprecated in 2.4
- Removed deprecated options `list-max-ziplist-entries`, `list-max-ziplist-value`
- Renamed references from "slave" to "replica" across configuration attribute names to align with Redis terminology updates
- Removed redis-package test suite, most of Linux distributions does not provide packages for Redis v6+
- Set default Redis version to 6.2.14
- Extend CI workflow to verify multiple Redis versions
- Upgrade suidelines:
- Ensure all Redis instances are upgraded to version 6.2.14 or higher.
- Update configuration files to reflect the terminology change from "slave" to "replica."
- Remove any references to deprecated options `list-max-ziplist-entries` and `list-max-ziplist-value`.
- Test the compatibility of your Chef cookbook with Redis v6+ before deploying the upgrade.

## 6.7.1 - *2024-01-11*

- Add `includes` option to sentinel configuration file.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ default_attributes({
'redisio' => {
'servers' => [
{'port' => '6379'},
{'port' => '6380', 'slaveof' => { 'address' => '127.0.0.1', 'port' => '6379' }}
{'port' => '6380', 'replicaof' => { 'address' => '127.0.0.1', 'port' => '6379' }}
]
}
})
Expand Down Expand Up @@ -340,16 +340,16 @@ Available options and their defaults
'rdbcompression' => 'yes',
'rdbchecksum' => 'yes',
'dbfilename' => nil,
'slaveof' => nil,
'replicaof' => nil,
'masterauth' => nil,
'slaveservestaledata' => 'yes',
'slavereadonly' => 'yes',
'replicaservestaledata' => 'yes',
'replicareadonly' => 'yes',
'repldisklesssync' => 'no', # Requires redis 2.8.18+
'repldisklesssyncdelay' => '5', # Requires redis 2.8.18+
'replpingslaveperiod' => '10',
'replpingreplicaperiod' => '10',
'repltimeout' => '60',
'repldisabletcpnodelay => 'no',
'slavepriority' => '100',
'replicapriority' => '100',
'requirepass' => nil,
'rename_commands' => nil, or a hash where each key is a redis command and the value is the command's new name.
'maxclients' => 10000,
Expand All @@ -376,7 +376,7 @@ Available options and their defaults
'activerehasing' => 'yes',
'clientoutputbufferlimit' => [
%w(normal 0 0 0),
%w(slave 256mb 64mb 60),
%w(replica 256mb 64mb 60),
%w(pubsub 32mb 8mb 60)
],
'hz' => '10',
Expand Down
18 changes: 8 additions & 10 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@
'rdbcompression' => 'yes',
'rdbchecksum' => 'yes',
'dbfilename' => nil,
'slaveof' => nil,
'replicaof' => nil,
'protected_mode' => nil, # unspecified by default but could be set explicitly to 'yes' or 'no'
'masterauth' => nil,
'slaveservestaledata' => 'yes',
'slavereadonly' => 'yes',
'replicaservestaledata' => 'yes',
'replicareadonly' => 'yes',
'repldisklesssync' => 'no',
'repldisklesssyncdelay' => '5',
'replpingslaveperiod' => '10',
'replpingreplicaperiod' => '10',
'repltimeout' => '60',
'repldisabletcpnodelay' => 'no',
'replbacklogsize' => '1mb',
'replbacklogttl' => 3600,
'slavepriority' => '100',
'replicapriority' => '100',
'requirepass' => nil,
'rename_commands' => nil,
'maxclients' => 10000,
Expand All @@ -127,16 +127,14 @@
'notifykeyspaceevents' => '',
'hashmaxziplistentries' => '512',
'hashmaxziplistvalue' => '64',
'listmaxziplistentries' => '512',
'listmaxziplistvalue' => '64',
'setmaxintsetentries' => '512',
'zsetmaxziplistentries' => '128',
'zsetmaxziplistvalue' => '64',
'hllsparsemaxbytes' => '3000',
'activerehasing' => 'yes',
'clientoutputbufferlimit' => [
%w(normal 0 0 0),
%w(slave 256mb 64mb 60),
%w(replica 256mb 64mb 60),
%w(pubsub 32mb 8mb 60),
],
'hz' => '10',
Expand All @@ -149,8 +147,8 @@
'data_bag_name' => nil,
'data_bag_item' => nil,
'data_bag_key' => nil,
'minslavestowrite' => nil,
'minslavesmaxlag' => nil,
'minreplicastowrite' => nil,
'minreplicasmaxlag' => nil,
'breadcrumb' => true,
}

Expand Down
20 changes: 4 additions & 16 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,15 @@ suites:
- recipe[redisio::enable]
attributes:
redisio:
version: "<%= ENV['REDIS_VERSION'] || '6.2.3' %>"
servers:
- port: 6379
- port: 16379
permissions: '0640'
name: 'savetest'
save: "a\nb\nc"
save: "3600 1\n300 100\n60 10000"
logfile: '/var/log/redis/redis-16379.log'

- name: redis-package
run_list:
- recipe[redisio::default]
- recipe[redisio::install]
- recipe[redisio::disable_os_default]
- recipe[redisio::configure]
- recipe[redisio::enable]
attributes:
redisio:
bypass_setup: true
servers:
- port: 6379
package_install: true
version:

- name: sentinel
run_list:
- recipe[redisio::default]
Expand All @@ -63,6 +49,7 @@ suites:
- recipe[redisio::sentinel_enable]
attributes:
redisio:
version: "<%= ENV['REDIS_VERSION'] || '6.2.3' %>"
servers:
- port: 6379

Expand All @@ -74,6 +61,7 @@ suites:
- recipe[redisio::sentinel_enable]
attributes:
redisio:
version: "<%= ENV['REDIS_VERSION'] || '6.2.3' %>"
servers:
- port: 6379
- port: 6380
Expand Down
16 changes: 7 additions & 9 deletions providers/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,17 @@
rdbcompression: current['rdbcompression'],
rdbchecksum: current['rdbchecksum'],
dbfilename: current['dbfilename'],
slaveof: current['slaveof'],
replicaof: current['replicaof'],
protected_mode: current['protected_mode'],
masterauth: current['masterauth'],
slaveservestaledata: current['slaveservestaledata'],
slavereadonly: current['slavereadonly'],
replpingslaveperiod: current['replpingslaveperiod'],
replicaservestaledata: current['replicaservestaledata'],
replicareadonly: current['replicareadonly'],
replpingreplicaperiod: current['replpingreplicaperiod'],
repltimeout: current['repltimeout'],
repldisabletcpnodelay: current['repldisabletcpnodelay'],
replbacklogsize: current['replbacklogsize'],
replbacklogttl: current['replbacklogttl'],
slavepriority: current['slavepriority'],
replicapriority: current['replicapriority'],
requirepass: current['requirepass'],
rename_commands: current['rename_commands'],
maxclients: current['maxclients'],
Expand All @@ -249,8 +249,6 @@
notifykeyspaceevents: current['notifykeyspaceevents'],
hashmaxziplistentries: current['hashmaxziplistentries'],
hashmaxziplistvalue: current['hashmaxziplistvalue'],
listmaxziplistentries: current['listmaxziplistentries'],
listmaxziplistvalue: current['listmaxziplistvalue'],
setmaxintsetentries: current['setmaxintsetentries'],
zsetmaxziplistentries: current['zsetmaxziplistentries'],
zsetmaxziplistvalue: current['zsetmaxziplistvalue'],
Expand All @@ -264,8 +262,8 @@
clusternodetimeout: current['clusternodetimeout'],
includes: current['includes'],
aclfile: current['aclfile'],
minslavestowrite: current['minslavestowrite'],
minslavesmaxlag: current['minslavesmaxlag'],
minreplicastowrite: current['minreplicastowrite'],
minreplicasmaxlag: current['minreplicasmaxlag'],
repldisklesssync: current['repldisklesssync'],
repldisklesssyncdelay: current['repldisklesssyncdelay']
)
Expand Down
Loading

0 comments on commit 073c7f2

Please sign in to comment.