Filippo Giunchedi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/366459 )

Change subject: Cassandra: Switch metrics-collector to use Scap3
......................................................................


Cassandra: Switch metrics-collector to use Scap3

Bug: T137371
Depends-On: I0bea05b02d8f22d68b886cd28e58fb20362eddaf
Change-Id: Ib9e9c039fc35a0ca9d6492a3665ed11ed73acc8d
---
M hieradata/common/role/deployment.yaml
M hieradata/labs/deployment-prep/common.yaml
M hieradata/role/common/deployment_server.yaml
M modules/cassandra/manifests/metrics.pp
4 files changed, 11 insertions(+), 7 deletions(-)

Approvals:
  jenkins-bot: Verified
  Filippo Giunchedi: Looks good to me, approved



diff --git a/hieradata/common/role/deployment.yaml 
b/hieradata/common/role/deployment.yaml
index 80d8fa1..712ba72 100644
--- a/hieradata/common/role/deployment.yaml
+++ b/hieradata/common/role/deployment.yaml
@@ -21,9 +21,6 @@
   dropwizard/metrics:
     gitfat_enabled: true
     upstream: 
https://gerrit.wikimedia.org/r/operations/software/dropwizard-metrics
-  cassandra/metrics-collector:
-    gitfat_enabled: true
-    upstream: 
https://gerrit.wikimedia.org/r/operations/software/cassandra-metrics-collector
   sentry/sentry:
     upstream: https://gerrit.wikimedia.org/r/operations/software/sentry
   wikimedia/discovery/analytics:
diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 953c7a8..5771a6e 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -325,6 +325,10 @@
   # Recommendation API
   recommendation-api/deploy: {}
 
+  # Cassandra metrics collection
+  cassandra/metrics-collector:
+    repository: operations/software/cassandra-metrics-collector
+
   # Cassandra logback encoder for Logstash
   cassandra/logstash-logback-encoder:
     repository: operations/software/logstash-logback-encoder
diff --git a/hieradata/role/common/deployment_server.yaml 
b/hieradata/role/common/deployment_server.yaml
index 3c864dc..ba38195 100644
--- a/hieradata/role/common/deployment_server.yaml
+++ b/hieradata/role/common/deployment_server.yaml
@@ -152,6 +152,9 @@
   # Time-window compaction strategy for Cassandra
   cassandra/twcs:
     repository: operations/software/cassandra-twcs
+  # Cassandra metrics collection
+  cassandra/metrics-collector:
+    repository: operations/software/cassandra-metrics-collector
   # Prometheus JMX exporter
   prometheus/jmx_exporter:
     repository: operations/software/prometheus_jmx_exporter
diff --git a/modules/cassandra/manifests/metrics.pp 
b/modules/cassandra/manifests/metrics.pp
index ba0c477..dc9f7a4 100644
--- a/modules/cassandra/manifests/metrics.pp
+++ b/modules/cassandra/manifests/metrics.pp
@@ -57,9 +57,9 @@
         $collector_version = '4.0.1'
     }
 
-    package { 'cassandra/metrics-collector':
-        ensure   => present,
-        provider => 'trebuchet',
+    scap::target { 'cassandra/metrics-collector':
+        deploy_user => 'deploy-service',
+        manage_user => true,
     }
 
     file { '/etc/cassandra-metrics-collector':
@@ -87,7 +87,7 @@
     file { $collector_jar:
         ensure  => 'link',
         target  => 
"/srv/deployment/cassandra/metrics-collector/lib/cassandra-metrics-collector-${collector_version}-jar-with-dependencies.jar",
-        require => Package['cassandra/metrics-collector'],
+        require => Scap::Target['cassandra/metrics-collector'],
     }
 
     cron { 'cassandra-metrics-collector':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9e9c039fc35a0ca9d6492a3665ed11ed73acc8d
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: Eevans <eev...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: Thcipriani <tcipri...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to