coren has submitted this change and it was merged.
Change subject: Add initial role for redis server for tool labs
......................................................................
Add initial role for redis server for tool labs
Change-Id: I016fc22752980224d083bc8aec5fc9d6f8f9dca5
---
M manifests/role/labs.pp
M manifests/role/labsbeta.pp
A modules/toollabs/manifests/redis.pp
3 files changed, 45 insertions(+), 0 deletions(-)
Approvals:
Andrew Bogott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 97e6864..0d6cf65 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -61,6 +61,10 @@
class { 'toollabs::syslog': }
}
+ class redis inherits role::labs::tools::config {
+ system_role { "role::labs::tools::redis": description => "Server that
hosts shared Redis instance" }
+ class { 'toollabs::redis': }
+ }
} # class role::labs::tools
diff --git a/manifests/role/labsbeta.pp b/manifests/role/labsbeta.pp
index c5343dc..10d54d7 100644
--- a/manifests/role/labsbeta.pp
+++ b/manifests/role/labsbeta.pp
@@ -61,6 +61,10 @@
class { 'toollabs::syslog': }
}
+ class redis inherits role::labs::toolsbeta::config {
+ system_role { "role::labs::toolsbeta::redis": description => "Server that
hosts shared Redis instance" }
+ class { 'toollabs::redis': }
+ }
} # class role::labs::tools
diff --git a/modules/toollabs/manifests/redis.pp
b/modules/toollabs/manifests/redis.pp
new file mode 100644
index 0000000..e7e44c0
--- /dev/null
+++ b/modules/toollabs/manifests/redis.pp
@@ -0,0 +1,37 @@
+# Class: toollabs::execnode
+#
+# This role sets up a redis node for use by tool-labs
+# Restricts usage of certain commands, to prevent
+# people from trampling on others' keys
+# Uses default amount of RAM (1G) specified by redis class
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class toollabs::redis inherits toollabs {
+ include toollabs::infrastructure
+
+ class { '::redis':
+ persist => "aof",
+ dir => "/var/lib/redis",
+ # Disable the following commands, to try to limit people from
+ # Trampling on each others' keys
+ rename_commands => {
+ "CONFIG" => "",
+ "FLUSHALL" => "",
+ "FLUSHDB" => "",
+ "KEYS" => "",
+ "SHUTDOWN" => "",
+ "SLAVEOF" => "",
+ "CLIENT" => "",
+ "RANDOMKEY" => "",
+ "DEBUG" => ""
+ },
+ monitor => false # Monitoring isn't setup for labs / tool labs, IIRC
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/70212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I016fc22752980224d083bc8aec5fc9d6f8f9dca5
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Ryan Lane <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits