Giuseppe Lavagetto has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/351284 )
Change subject: role::ocg: add local redises
......................................................................
role::ocg: add local redises
For each host in role::ocg, add one redis server and one nutcracker
instance, so that we can just use this to make ocg talk to redis locally
with some redundance. While it's true that server failures will cause
some data loss in this configuration, but it is resilient enough to keep
the service running with minimal interaction while it's being decommissioned.
Change-Id: I92616e9aa76b109aebe523078e125ac9ed202a52
---
M hieradata/role/common/ocg.yaml
M modules/role/manifests/ocg.pp
2 files changed, 48 insertions(+), 1 deletion(-)
Approvals:
Giuseppe Lavagetto: Verified; Looks good to me, approved
diff --git a/hieradata/role/common/ocg.yaml b/hieradata/role/common/ocg.yaml
index 9dc77ee..006f4af 100644
--- a/hieradata/role/common/ocg.yaml
+++ b/hieradata/role/common/ocg.yaml
@@ -5,3 +5,20 @@
debdeploy::grains:
debdeploy-ocg:
value: standard
+profile::redis::master::instances: [6379]
+profile::redis::master::settings:
+ maxmemory: "2gb"
+ save: ""
+ stop-writes-on-bgsave-error: false
+# This must be defined in the private repo
+# profile::redis::master::password:
+role::ocg::redis_servers:
+ "ocg1001":
+ host: "ocg1001.eqiad.wmnet"
+ port: 6379
+ "ocg1002":
+ host: "ocg1002.eqiad.wmnet"
+ port: 6379
+ "ocg1003":
+ host: "ocg1003.eqiad.wmnet"
+ port: 6379
diff --git a/modules/role/manifests/ocg.pp b/modules/role/manifests/ocg.pp
index e4a97c6..ca2fb2f 100644
--- a/modules/role/manifests/ocg.pp
+++ b/modules/role/manifests/ocg.pp
@@ -13,7 +13,37 @@
description => 'offline content generator for MediaWiki Collection
extension',
}
- include passwords::redis
+ # Set up the local redis instance + nutcracker
+ require ::passwords::redis
+
+ # Set the password from the password class
+ class { '::profile::redis::master':
+ password => $::passwords::redis::main_password,
+ }
+
+ $redis_pool = {
+ 'redis_local' => {
+ auto_eject_hosts => true,
+ distribution => 'ketama',
+ redis => true,
+ redis_auth => $passwords::redis::main_password,
+ hash => 'md5',
+ listen => '127.0.0.1:6378',
+ server_connections => 1,
+ server_failure_limit => 3,
+ server_retry_timeout => to_milliseconds('30s'),
+ timeout => 1000,
+ server_map => hiera('role::ocg::redis_servers'),
+ }
+ }
+
+ class { 'nutcracker':
+ mbuf_size => '64k',
+ pools => $redis_pool,
+ }
+
+ class { '::nutcracker::monitoring': }
+
include ::ocg
include ::ocg::nagios
--
To view, visit https://gerrit.wikimedia.org/r/351284
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I92616e9aa76b109aebe523078e125ac9ed202a52
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits