Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/208924

Change subject: standard: ability to disable diamond
......................................................................

standard: ability to disable diamond

The continuous integration isolated instances are one time use only with
random hostnames.  There is no need to collect diamond metrics for them
and pollute the statsd hierarchy on labmon1001.

In standard, introduce a `$has_diamond` feature switch (default to true)
exactly like `$has_default_mail_relay`.

Set it false via hiera by creating a common data file for the
'contintcloud' project.

Bug: T98121
Change-Id: Ifb46a853322c00edd1e2be17b31fdb283555e5cb
---
A hieradata/labs/contintcloud/common.yaml
M manifests/site.pp
2 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/208924/1

diff --git a/hieradata/labs/contintcloud/common.yaml 
b/hieradata/labs/contintcloud/common.yaml
new file mode 100644
index 0000000..6d7f270
--- /dev/null
+++ b/hieradata/labs/contintcloud/common.yaml
@@ -0,0 +1,2 @@
+# There is no need to collect metrics on ephemeral instances
+standard::has_diamond: false
diff --git a/manifests/site.pp b/manifests/site.pp
index 02363d9..7bdc5ee 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -22,11 +22,18 @@
 # Class for *most* servers, standard includes
 class standard(
     $has_default_mail_relay = true,
+    $has_diamond = true,
     $has_admin = true,
 ) {
     include base
     include role::ntp
-    include role::diamond
+
+    # So we can disable diamond on the contintcloud labs project which spawns
+    # ephemeral instances
+    if $has_diamond {
+        include role::diamond
+    }
+
     if $::realm == 'production' {
         include ganglia # No ganglia in labs
     }

-- 
To view, visit https://gerrit.wikimedia.org/r/208924
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb46a853322c00edd1e2be17b31fdb283555e5cb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to