Ottomata has uploaded a new change for review.

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

Change subject: Configure eventstreams in codfw backed by analytics-eqiad Kafka
......................................................................

Configure eventstreams in codfw backed by analytics-eqiad Kafka

Bug: T143925
Change-Id: Ie119438edb66300cd4658514a8da74b16815cf32
---
M conftool-data/nodes/codfw.yaml
M conftool-data/services/services.yaml
M hieradata/common/lvs/configuration.yaml
M modules/role/manifests/eventstreams.pp
M modules/role/manifests/lvs/balancer.pp
5 files changed, 29 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/35/322935/1

diff --git a/conftool-data/nodes/codfw.yaml b/conftool-data/nodes/codfw.yaml
index a15e317..805d57d 100644
--- a/conftool-data/nodes/codfw.yaml
+++ b/conftool-data/nodes/codfw.yaml
@@ -257,10 +257,10 @@
   sca2003.codfw.wmnet: [zotero]
   sca2004.codfw.wmnet: [zotero]
 scb:
-  scb2001.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores]
-  scb2002.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores]
-  scb2003.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores]
-  scb2004.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores]
+  scb2001.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams]
+  scb2002.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams]
+  scb2003.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams]
+  scb2004.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams]
 eventbus:
   kafka2001.codfw.wmnet: [eventbus]
   kafka2002.codfw.wmnet: [eventbus]
diff --git a/conftool-data/services/services.yaml 
b/conftool-data/services/services.yaml
index c5e6c94..a281bd3 100644
--- a/conftool-data/services/services.yaml
+++ b/conftool-data/services/services.yaml
@@ -63,6 +63,7 @@
     port: 8092
     datacenters:
     - eqiad
+    - codfw
     default_values:
       pooled: 'yes'
       weight: 10
diff --git a/hieradata/common/lvs/configuration.yaml 
b/hieradata/common/lvs/configuration.yaml
index 2ac06d2..95a71dd 100644
--- a/hieradata/common/lvs/configuration.yaml
+++ b/hieradata/common/lvs/configuration.yaml
@@ -133,6 +133,7 @@
     eqiad: 10.2.2.33
   eventstreams: &ip_block033
     eqiad: 10.2.2.34
+    codfw: 10.2.1.34
 lvs::configuration::lvs_services:
   text:
     description: "Main wiki platform LVS service, text.%{::site}.wikimedia.org 
(Varnish)"
@@ -1048,6 +1049,7 @@
     class: low-traffic
     sites:
     - eqiad
+    - codfw
     ip: *ip_block033
     port: 8092
     bgp: 'yes'
@@ -1061,6 +1063,8 @@
       sites:
         eqiad:
           hostname: eventstreams.svc.eqiad.wmnet
+        codfw:
+          hostname: eventstreams.svc.codfw.wmnet
     monitors:
       ProxyFetch:
         url:
diff --git a/modules/role/manifests/eventstreams.pp 
b/modules/role/manifests/eventstreams.pp
index b7eed97..3dbf1c9 100644
--- a/modules/role/manifests/eventstreams.pp
+++ b/modules/role/manifests/eventstreams.pp
@@ -4,6 +4,23 @@
 # This class includes the ::eventstreams role, and configures
 # it to consume only specific topics from a specific Kafka cluster.
 #
+# NOTE: eventstreams is configured to use the 'analytics-eqiad' Kafka cluster
+# in both eqiad and codfw.  This means that codfw eventstreams will be doing
+# cross DC consumption.  Since we don't have a beefy non critical 
'aggregate/analytics'
+# Kafka cluster in codfw (yet), we don't have a good Kafka cluster that can 
back
+# eventstreams in codfw.  We could back it with the main-codfw cluster, but 
there
+# are issues with doing that:
+#
+# 1. main Kafka clusters are for critical prod services, and we don't want 
some unknown
+#    bug/exploit taking down the main clusters.  This service 'exposes' Kafka 
to the internet.
+#
+# 2. change-prop requires that topics have only one partition, which means we 
can't spread
+#    consumer load for a given topic across multiple brokers.  change-prop 
uses the main
+#    Kafka clusters.  In the analytics/aggregate cluster, we can add 
partitions to the topics.
+#
+# In the future, we would like to rename analytics-eqiad to something more 
appropriate, perhaps
+# aggregate-eqiad, and also set up an aggregate-codfw Kafka cluster.
+#
 # == Hiera Variables
 # [*role::eventstreams::kafka_cluster_name*]
 #   Default: 'analytics' in production, 'main' in labs.
@@ -22,8 +39,9 @@
         description => 'Exposes configured event streams from Kafka to public 
internet via HTTP SSE',
     }
 
+    # Default to analytics-eqiad in production, for both eqiad and codfw 
eventstreams.
     $default_kafka_cluster_name = $::realm ? {
-        'production' => 'analytics',
+        'production' => 'analytics-eqiad',
         'labs'       => 'main'
     }
 
diff --git a/modules/role/manifests/lvs/balancer.pp 
b/modules/role/manifests/lvs/balancer.pp
index 9d978aa..dcb9e54 100644
--- a/modules/role/manifests/lvs/balancer.pp
+++ b/modules/role/manifests/lvs/balancer.pp
@@ -80,6 +80,7 @@
             $sip['thumbor'][$::site],
             $sip['prometheus'][$::site],
             $sip['wdqs'][$::site],
+            $sip['eventstreams'][$::site],
             ],
 
         # esams + ulsfo

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie119438edb66300cd4658514a8da74b16815cf32
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>

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

Reply via email to