Ori.livneh has uploaded a new change for review.

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

Change subject: Initial commit of statsv
......................................................................

Initial commit of statsv

This will eventually be a separate module, but for now it can be nested in
webperf.

StatsV is a Web request -> Varnish -> VarnishKafka -> Kafka -> StatsD gateway.
It allows client-side code to report metrics via a URL endpoint that translates
query strings to statsd format and sends them to a statsd server for
aggregation.

Change-Id: I0886b46d8a4a9115ab077b48ed538ef7e9e9cbca
---
M manifests/role/deployment.pp
M manifests/role/webperf.pp
A modules/webperf/files/statsv.conf
A modules/webperf/manifests/statsv.pp
4 files changed, 41 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/178703/1

diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp
index 638d17b..0a5f36a 100644
--- a/manifests/role/deployment.pp
+++ b/manifests/role/deployment.pp
@@ -66,6 +66,9 @@
         'fluoride/fluoride'              => {
             'upstream' => 
'https://gerrit.wikimedia.org/r/mediawiki/tools/fluoride',
         },
+        'statsv/statsv'                  => {
+            'upstream' => 'https://gerrit.wikimedia.org/r/analytics/statsv',
+        },
         'mwprof/mwprof'                  => {
             'upstream' => 
'https://gerrit.wikimedia.org/r/operations/software/mwprof',
         },
diff --git a/manifests/role/webperf.pp b/manifests/role/webperf.pp
index 92b1205..985f5d5 100644
--- a/manifests/role/webperf.pp
+++ b/manifests/role/webperf.pp
@@ -4,6 +4,8 @@
 # into StatsD.
 #
 class role::webperf {
+    include ::webperf::statsv
+
     $statsd_host = 'statsd.eqiad.wmnet'
 
     # Aggregate client-side latency measurements collected via the
diff --git a/modules/webperf/files/statsv.conf 
b/modules/webperf/files/statsv.conf
new file mode 100644
index 0000000..f3dcffb
--- /dev/null
+++ b/modules/webperf/files/statsv.conf
@@ -0,0 +1,12 @@
+# statsv
+description "Kafka-to-StatsD bridge"
+
+start on (local-filesystems and net-device-up IFACE!=lo)
+
+setuid webperf
+setgid webperf
+
+respawn
+respawn limit unlimited
+
+exec /usr/bin/python /srv/statsv/statsv/statsv.py
diff --git a/modules/webperf/manifests/statsv.pp 
b/modules/webperf/manifests/statsv.pp
new file mode 100644
index 0000000..7b4f954
--- /dev/null
+++ b/modules/webperf/manifests/statsv.pp
@@ -0,0 +1,24 @@
+# == Class: webperf::statsv
+#
+# Sets up StatsV, a Web request -> Kafka -> StatsD bridge.
+#
+class webperf::statsv {
+    include ::webperf
+
+    package { 'statsv':
+        ensure   => present,
+        provider => 'trebuchet',
+    }
+
+    file { '/etc/init/statsv.conf':
+        ensure  => present,
+        source  => 'puppet:///modules/webperf/statsv.conf',
+        require => Package['statsv'],
+        notify  => Service['statsv'],
+    }
+
+    service { 'statsv':
+        ensure   => running,
+        provider => 'upstart',
+    }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0886b46d8a4a9115ab077b48ed538ef7e9e9cbca
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to