Alexandros Kosiaris has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404319 )

Change subject: Simplify profile::grafana::production
......................................................................

Simplify profile::grafana::production

Instead of declaring profile::grafana, require it and let hiera work.
Populate the corresponding hieradata under role::webserver_misc_apps
This leaves us with only some grafana::dashboard rules that need some
refactoring before the profile migration is fully done

Bug: T170150
Change-Id: Ie0092374f24f25a532b3443ed4c50fbf720f80a2
---
M hieradata/role/common/webserver_misc_apps.yaml
M modules/profile/manifests/grafana/production.pp
2 files changed, 13 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/404319/1

diff --git a/hieradata/role/common/webserver_misc_apps.yaml 
b/hieradata/role/common/webserver_misc_apps.yaml
index 7818b94..859e345 100644
--- a/hieradata/role/common/webserver_misc_apps.yaml
+++ b/hieradata/role/common/webserver_misc_apps.yaml
@@ -6,3 +6,15 @@
   - eventlogging_consumer_mysql_00
   - eventlogging_consumer_mysql_eventbus_00
   - eventlogging_consumer_files_00
+
+profile::grafana::readonly_domain: grafana.wikimedia.org
+profile::grafana::admin_domain: grafana-admin.wikimedia.org
+profile::grafana::ldap_editor_description: nda/ops/wmf/grafana-admin
+profile::grafana::ldap_edit_groups:
+  - cn=ops,ou=groups,dc=wikimedia,dc=org
+  - cn=nda,ou=groups,dc=wikimedia,dc=org
+  - cn=wmf,ou=groups,dc=wikimedia,dc=org
+  - cn=grafana-admin,ou=groups,dc=wikimedia,dc=org
+# In private repo
+#profile::grafana::secret_key:
+#profile::grafana::admin_password:
diff --git a/modules/profile/manifests/grafana/production.pp 
b/modules/profile/manifests/grafana/production.pp
index b3cc1ce..984d88a 100644
--- a/modules/profile/manifests/grafana/production.pp
+++ b/modules/profile/manifests/grafana/production.pp
@@ -4,21 +4,7 @@
 # It powers <https://grafana.wikimedia.org>.
 #
 class profile::grafana::production {
-    include ::passwords::grafana::production
-
-    class { '::profile::grafana':
-        readonly_domain         => 'grafana.wikimedia.org',
-        admin_domain            => 'grafana-admin.wikimedia.org',
-        secret_key              => $passwords::grafana::production::secret_key,
-        admin_password          => 
$passwords::grafana::production::admin_password,
-        ldap_editor_description => 'nda/ops/wmf/grafana-admin',
-        ldap_editor_groups      => [
-            'cn=ops,ou=groups,dc=wikimedia,dc=org',
-            'cn=nda,ou=groups,dc=wikimedia,dc=org',
-            'cn=wmf,ou=groups,dc=wikimedia,dc=org',
-            'cn=grafana-admin,ou=groups,dc=wikimedia,dc=org',
-        ]
-    }
+    require ::profile::grafana
 
     grafana::dashboard { 'varnish-http-errors':
         source => 'puppet:///modules/grafana/dashboards/varnish-http-errors',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0092374f24f25a532b3443ed4c50fbf720f80a2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>

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

Reply via email to