Ori.livneh has submitted this change and it was merged.
Change subject: redis: make /srv/redis the default directory
......................................................................
redis: make /srv/redis the default directory
* Pass through the $dir parameter from the role class to the module.
* Set the default to be /srv/redis, rather than /a/redis.
* Declare /a/redis for the currently-provisioned clusters.
Change-Id: Id1143c3355867ec7a8daae413c03beb81a649226
---
M manifests/role/redisdb.pp
M manifests/site.pp
M modules/redis/manifests/init.pp
M modules/redis/templates/redis.conf.erb
4 files changed, 9 insertions(+), 10 deletions(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/redisdb.pp b/manifests/role/redisdb.pp
index c9923ce..d2e15db 100644
--- a/manifests/role/redisdb.pp
+++ b/manifests/role/redisdb.pp
@@ -10,8 +10,9 @@
}
class role::db::redis (
- $maxmemory = inline_template("<%= (Float(memorysize.split[0]) *
0.82).round %>Gb"),
- $redis_replication = undef
+ $maxmemory = inline_template("<% = (Float(memorysize.split[0]) *
0.82).round %>Gb"),
+ $redis_replication = undef,
+ $dir = '/srv/redis'
) {
system::role { 'db::redis':
@@ -25,6 +26,7 @@
class { '::redis':
maxmemory => $maxmemory,
+ dir => $dir,
persist => 'aof',
redis_replication => $redis_replication,
password => $passwords::redis::main_password,
@@ -40,7 +42,7 @@
persist => 'aof',
redis_replication => undef,
password => $::passwords::redis::main_password,
- dir => '/var/lib/redis/',
+ dir => $dir,
auto_aof_rewrite_min_size => '64mb',
}
}
diff --git a/manifests/site.pp b/manifests/site.pp
index f5d8187..f257dd5 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1884,6 +1884,7 @@
class { 'redis':
maxmemory => '500Mb',
+ dir => '/a/redis',
password => $passwords::redis::main_password,
}
include redis::ganglia
@@ -1903,6 +1904,7 @@
class { 'role::db::redis':
redis_replication => $redis_replication,
+ dir => '/a/redis',
}
}
@@ -1911,12 +1913,8 @@
include admin
- $redis_replication = {
- 'rbf1002' => 'rbf1001',
- }
-
class { 'role::db::redis':
- redis_replication => $redis_replication,
+ redis_replication => { 'rbf1002' => 'rbf1001' },
}
}
diff --git a/modules/redis/manifests/init.pp b/modules/redis/manifests/init.pp
index 32bc104..f6d83f0 100644
--- a/modules/redis/manifests/init.pp
+++ b/modules/redis/manifests/init.pp
@@ -1,7 +1,7 @@
# application server base class
class redis (
$port = 6379,
- $dir = '/a/redis',
+ $dir = '/srv/redis',
$maxmemory = '1GB',
$maxmemory_policy = 'volatile-lru',
$maxmemory_samples = 5,
diff --git a/modules/redis/templates/redis.conf.erb
b/modules/redis/templates/redis.conf.erb
index 0edfcb9..386c13b 100644
--- a/modules/redis/templates/redis.conf.erb
+++ b/modules/redis/templates/redis.conf.erb
@@ -145,7 +145,6 @@
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
-# dir /a/redis
dir <%= @dir %>
################################# REPLICATION #################################
--
To view, visit https://gerrit.wikimedia.org/r/158815
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id1143c3355867ec7a8daae413c03beb81a649226
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits