Filippo Giunchedi has submitted this change and it was merged.

Change subject: restbase: add internal LVS configuration
......................................................................


restbase: add internal LVS configuration

note: as a followup to this we'll need a role or variable not to deploy LVS
realserver during testing

Bug: T89636
Change-Id: I85d70c5b2aded256ab808789e9ec0e6b8ca3bd8b
---
M hieradata/role/common/restbase.yaml
M manifests/role/lvs.pp
M manifests/role/restbase.pp
M modules/lvs/manifests/configuration.pp
M modules/lvs/manifests/monitor.pp
5 files changed, 27 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  Alexandros Kosiaris: Looks good to me, approved



diff --git a/hieradata/role/common/restbase.yaml 
b/hieradata/role/common/restbase.yaml
index 78cd234..03bd901 100644
--- a/hieradata/role/common/restbase.yaml
+++ b/hieradata/role/common/restbase.yaml
@@ -24,3 +24,6 @@
 restbase::logstash_host: logstash1002.eqiad.wmnet
 restbase::cassandra_defaultConsistency: localQuorum
 restbase::statsd_host: statsd.eqiad.wmnet
+
+lvs::realserver::realserver_ips:
+  - '10.2.2.17' # restbase.svc.eqiad.wmnet
diff --git a/manifests/role/lvs.pp b/manifests/role/lvs.pp
index 7692336..9123a1b 100644
--- a/manifests/role/lvs.pp
+++ b/manifests/role/lvs.pp
@@ -44,6 +44,7 @@
             $sip['citoid'][$::site],
             $sip['cxserver'][$::site],
             $sip['search'][$::site],
+            $sip['restbase'][$::site],
             ],
 
         # codfw (should mirror eqiad above, eventually, and become merged with 
it via regex
diff --git a/manifests/role/restbase.pp b/manifests/role/restbase.pp
index e003194..2e92652 100644
--- a/manifests/role/restbase.pp
+++ b/manifests/role/restbase.pp
@@ -1,9 +1,14 @@
 # == Class role::restbase
 #
 
+@monitoring::group { 'restbase_eqiad': description => 'Restbase eqiad' }
+@monitoring::group { 'restbase_codfw': description => 'Restbase codfw' }
+
 # Config should be pulled from hiera
 class role::restbase {
     system::role { 'restbase': description => "Restbase ${::realm}" }
 
     include ::restbase
+
+    include lvs::realserver
 }
diff --git a/modules/lvs/manifests/configuration.pp 
b/modules/lvs/manifests/configuration.pp
index 9ee3141..7733f36 100644
--- a/modules/lvs/manifests/configuration.pp
+++ b/modules/lvs/manifests/configuration.pp
@@ -173,6 +173,9 @@
             'cxserver' => {
                 'eqiad' => "10.2.2.18",
             },
+            'restbase' => {
+                'eqiad' => "10.2.2.17",
+            },
         },
         'labs' => {
             'text' => {
@@ -204,6 +207,7 @@
             'parsoidcache' => {},
             'search' => {},
             'stream' => {},
+            'restbase' => {},
         }
     }
 
@@ -696,6 +700,19 @@
                 'ProxyFetch' => { 'url' => [ 'http://cxserver.svc.eqiad.wmnet' 
] },
                 'IdleConnection' => $idleconnection_monitor_options,
             }
+        },
+        'restbase' => {
+            'description' => 'RESTBase, restbase.svc.eqiad.wmnet',
+            'class' => 'low-traffic',
+            'sites' => [ 'eqiad' ],
+            'ip' => $service_ips['restbase'][$::site],
+            'port' => 7231,
+            'bgp' => 'yes',
+            'depool-threshold' => '.5',
+            'monitors' => {
+                'ProxyFetch' => { 'url' => [ 'http://restbase.svc.eqiad.wmnet' 
] },
+                'IdleConnection' => $idleconnection_monitor_options,
+            }
         }
     }
 }
diff --git a/modules/lvs/manifests/monitor.pp b/modules/lvs/manifests/monitor.pp
index 487fff0..cd5493d 100644
--- a/modules/lvs/manifests/monitor.pp
+++ b/modules/lvs/manifests/monitor.pp
@@ -17,6 +17,7 @@
     lvs::monitor_service_http { 'mathoid.svc.eqiad.wmnet': ip_address => 
$ip['mathoid']['eqiad'], check_command => 
"check_http_lvs_on_port!mathoid.svc.eqiad.wmnet!10042!/" }
     lvs::monitor_service_http { 'citoid.svc.eqiad.wmnet': ip_address => 
$ip['citoid']['eqiad'], check_command => 
"check_http_lvs_on_port!citoid.svc.eqiad.wmnet!1970!/", contact_group => 
"admins,parsoid" }
     lvs::monitor_service_http { 'cxserver.svc.eqiad.wmnet': ip_address => 
$ip['cxserver']['eqiad'], check_command => 
"check_http_lvs_on_port!citoid.svc.eqiad.wmnet!8080!/" }
+    lvs::monitor_service_http { 'restbase.svc.eqiad.wmnet': ip_address => 
$ip['restbase']['eqiad'], check_command => 
"check_http_lvs_on_port!restbase.svc.eqiad.wmnet!7231!/" }
 
     # INTERNAL CODFW
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85d70c5b2aded256ab808789e9ec0e6b8ca3bd8b
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@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