Filippo Giunchedi has submitted this change and it was merged.

Change subject: prometheus: add to LVS
......................................................................


prometheus: add to LVS

Also deploy service ip on prometheus eqiad/codfw.

Note that lvs::realserver is applied to the hosts individually, not the
"prometheus server" role. Many such roles can coexist on the same host,
irrespectively of LVS, also not every prometheus server is behind LVS.

Bug: T126785
Change-Id: Ibf89504a06a69aca62af3f200d93dc4615e05023
---
M conftool-data/nodes/codfw.yaml
M conftool-data/nodes/eqiad.yaml
M conftool-data/services/misc.yaml
M hieradata/common/lvs/configuration.yaml
A hieradata/hosts/prometheus1001.yaml
A hieradata/hosts/prometheus1002.yaml
A hieradata/hosts/prometheus2001.yaml
A hieradata/hosts/prometheus2002.yaml
M manifests/site.pp
M modules/role/manifests/lvs/balancer.pp
10 files changed, 57 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, approved
  Alexandros Kosiaris: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/conftool-data/nodes/codfw.yaml b/conftool-data/nodes/codfw.yaml
index 123a7e2..d9d59a3 100644
--- a/conftool-data/nodes/codfw.yaml
+++ b/conftool-data/nodes/codfw.yaml
@@ -276,3 +276,6 @@
 eventbus:
   kafka2001.codfw.wmnet: [eventbus]
   kafka2002.codfw.wmnet: [eventbus]
+prometheus:
+  prometheus2001.codfw.wmnet: [prometheus]
+  prometheus2002.codfw.wmnet: [prometheus]
diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml
index 50cbb5d..6ee15e9 100644
--- a/conftool-data/nodes/eqiad.yaml
+++ b/conftool-data/nodes/eqiad.yaml
@@ -302,3 +302,6 @@
 thumbor:
   thumbor1001.eqiad.wmnet: [thumbor]
   thumbor1002.eqiad.wmnet: [thumbor]
+prometheus:
+  prometheus1001.eqiad.wmnet: [prometheus]
+  prometheus1002.eqiad.wmnet: [prometheus]
diff --git a/conftool-data/services/misc.yaml b/conftool-data/services/misc.yaml
index e533379..9ccfe81 100644
--- a/conftool-data/services/misc.yaml
+++ b/conftool-data/services/misc.yaml
@@ -17,3 +17,12 @@
       "weight": 10
     datacenters:
       - eqiad
+prometheus:
+  prometheus:
+    port: 80
+    default_values:
+      "pooled": "no"
+      "weight": 10
+    datacenters:
+      - eqiad
+      - codfw
diff --git a/hieradata/common/lvs/configuration.yaml 
b/hieradata/common/lvs/configuration.yaml
index d87425f..c67c41f 100644
--- a/hieradata/common/lvs/configuration.yaml
+++ b/hieradata/common/lvs/configuration.yaml
@@ -126,6 +126,9 @@
   thumbor: &ip_block029
     eqiad: 10.2.2.24
     codfw: 10.2.1.24
+  prometheus: &ip_block030
+    eqiad: 10.2.2.25
+    codfw: 10.2.1.25
 lvs_services:
   text:
     description: "Main wiki platform LVS service, text.%{::site}.wikimedia.org 
(Varnish)"
@@ -955,3 +958,30 @@
       sites:
         eqiad:
           hostname: thumbor.svc.eqiad.wmnet
+  prometheus:
+    description: Prometheus monitoring
+    class: low-traffic
+    sites:
+    - eqiad
+    - codfw
+    ip: *ip_block030
+    port: 80
+    bgp: 'yes'
+    depool-threshold: '.5'
+    monitors:
+      ProxyFetch:
+        url:
+        - http://localhost/
+      IdleConnection:
+        timeout-clean-reconnect: 3
+        max-delay: 300
+    conftool:
+      cluster: prometheus
+      service: prometheus
+    icinga:
+      check_command: 
"check_http_lvs_on_port!prometheus.svc.%{::site}.wmnet!80!/"
+      sites:
+        eqiad:
+          hostname: prometheus.svc.eqiad.wmnet
+        codfw:
+          hostname: prometheus.svc.codfw.wmnet
diff --git a/hieradata/hosts/prometheus1001.yaml 
b/hieradata/hosts/prometheus1001.yaml
new file mode 100644
index 0000000..b0b1342
--- /dev/null
+++ b/hieradata/hosts/prometheus1001.yaml
@@ -0,0 +1,2 @@
+lvs::realserver::realserver_ips:
+  - 10.2.2.25
diff --git a/hieradata/hosts/prometheus1002.yaml 
b/hieradata/hosts/prometheus1002.yaml
new file mode 100644
index 0000000..b0b1342
--- /dev/null
+++ b/hieradata/hosts/prometheus1002.yaml
@@ -0,0 +1,2 @@
+lvs::realserver::realserver_ips:
+  - 10.2.2.25
diff --git a/hieradata/hosts/prometheus2001.yaml 
b/hieradata/hosts/prometheus2001.yaml
new file mode 100644
index 0000000..4fd4e98
--- /dev/null
+++ b/hieradata/hosts/prometheus2001.yaml
@@ -0,0 +1,2 @@
+lvs::realserver::realserver_ips:
+  - 10.2.1.25
diff --git a/hieradata/hosts/prometheus2002.yaml 
b/hieradata/hosts/prometheus2002.yaml
new file mode 100644
index 0000000..4fd4e98
--- /dev/null
+++ b/hieradata/hosts/prometheus2002.yaml
@@ -0,0 +1,2 @@
+lvs::realserver::realserver_ips:
+  - 10.2.1.25
diff --git a/manifests/site.pp b/manifests/site.pp
index e7ab86d..50f01bc 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2425,6 +2425,7 @@
 
     include base::firewall
     include standard
+    include lvs::realserver
 }
 
 node /^prometheus100[12]\.eqiad\.wmnet$/ {
@@ -2432,6 +2433,7 @@
 
     include base::firewall
     include standard
+    include lvs::realserver
 }
 
 # pybal-test200X VMs are used for pybal testing/development
diff --git a/modules/role/manifests/lvs/balancer.pp 
b/modules/role/manifests/lvs/balancer.pp
index 50ae67d..e251e4a 100644
--- a/modules/role/manifests/lvs/balancer.pp
+++ b/modules/role/manifests/lvs/balancer.pp
@@ -42,6 +42,7 @@
             $sip['apertium'][$::site],
             $sip['ores'][$::site],
             $sip['thumbor'][$::site],
+            $sip['prometheus'][$::site],
             ],
 
         # codfw (should mirror eqiad above, eventually, and become merged with 
it via regex
@@ -73,6 +74,7 @@
             $sip['eventbus'][$::site],
             $sip['ores'][$::site],
             $sip['thumbor'][$::site],
+            $sip['prometheus'][$::site],
             ],
 
         # esams + ulsfo

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf89504a06a69aca62af3f200d93dc4615e05023
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to