Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: role::scb: use role::lvs::realserver
......................................................................

role::scb: use role::lvs::realserver

Change-Id: I10cc378aa0573d397e3703dfa3b28d560ac14ff0
---
D hieradata/role/codfw/scb.yaml
M hieradata/role/common/scb.yaml
D hieradata/role/eqiad/scb.yaml
M manifests/role/apertium.pp
M manifests/role/citoid.pp
M manifests/role/cxserver.pp
M manifests/role/graphoid.pp
M manifests/role/mathoid.pp
M manifests/role/mobileapps.pp
M manifests/role/scb.pp
M modules/role/manifests/ores/web.pp
11 files changed, 11 insertions(+), 68 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/316346/1

diff --git a/hieradata/role/codfw/scb.yaml b/hieradata/role/codfw/scb.yaml
deleted file mode 100644
index 4995d8b..0000000
--- a/hieradata/role/codfw/scb.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-lvs::realserver::realserver_ips:
-- 10.2.1.10 # changeprop.svc.codfw.wmnet
-- 10.2.1.11 # apertium.svc.codfw.wmnet
-- 10.2.1.14 # mobileapps.svc.codfw.wmnet
-- 10.2.1.15 # graphoid.svc.codfw.wmnet
-- 10.2.1.18 # cxserver.svc.codfw.wmnet
-- 10.2.1.19 # citoid.svc.codfw.wmnet
-- 10.2.1.20 # mathoid.svc.codfw.wmnet
-
diff --git a/hieradata/role/common/scb.yaml b/hieradata/role/common/scb.yaml
index 6a16c13..53a04ee 100644
--- a/hieradata/role/common/scb.yaml
+++ b/hieradata/role/common/scb.yaml
@@ -11,6 +11,14 @@
 - mobileapps-admin
 - changeprop-admin
 - ores-admin
+role::lvs::realserver::pools:
+  ores: {}
+  apertium: {}
+  mobileapps: {}
+  graphoid: {}
+  cxserver: {}
+  citoid: {}
+  mathoid: {}
 graphoid::allowed_domains:
   https:
     - mediawiki.org
diff --git a/hieradata/role/eqiad/scb.yaml b/hieradata/role/eqiad/scb.yaml
deleted file mode 100644
index d53990e..0000000
--- a/hieradata/role/eqiad/scb.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-lvs::realserver::realserver_ips:
-- 10.2.2.10 # ores.svc.eqiad.wmnet
-- 10.2.2.11 # apertium.svc.eqiad.wmnet
-- 10.2.2.14 # mobileapps.svc.eqiad.wmnet
-- 10.2.2.15 # graphoid.svc.eqiad.wmnet
-- 10.2.2.18 # cxserver.svc.eqiad.wmnet
-- 10.2.2.19 # citoid.svc.eqiad.wmnet
-- 10.2.2.20 # mathoid.svc.eqiad.wmnet
-
diff --git a/manifests/role/apertium.pp b/manifests/role/apertium.pp
index 5ab7043..ba208e1 100644
--- a/manifests/role/apertium.pp
+++ b/manifests/role/apertium.pp
@@ -6,13 +6,6 @@
         description => 'Apertium APY server'
     }
 
-    # LVS pooling/depoling scripts
-    include ::lvs::configuration
-    conftool::scripts::service { 'apertium':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
-    }
-
     include ::apertium
 
     ferm::service { 'apertium_http':
diff --git a/manifests/role/citoid.pp b/manifests/role/citoid.pp
index f30066d..5fa0c69f 100644
--- a/manifests/role/citoid.pp
+++ b/manifests/role/citoid.pp
@@ -3,12 +3,5 @@
 
     system::role { 'role::citoid': }
 
-    # LVS pooling/depoling scripts
-    include ::lvs::configuration
-    conftool::scripts::service { 'citoid':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
-    }
-
     include ::citoid
 }
diff --git a/manifests/role/cxserver.pp b/manifests/role/cxserver.pp
index 124749e..ef77efb 100644
--- a/manifests/role/cxserver.pp
+++ b/manifests/role/cxserver.pp
@@ -4,12 +4,6 @@
     system::role { 'role::cxserver':
         description => 'content translation server'
     }
-    # LVS pooling/depoling scripts
-    include ::lvs::configuration
-    conftool::scripts::service { 'cxserver':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
-    }
 
     include ::passwords::cxserver
     $yandex_api_key = $::passwords::cxserver::yandex_api_key
diff --git a/manifests/role/graphoid.pp b/manifests/role/graphoid.pp
index 655e974..2c04e77 100644
--- a/manifests/role/graphoid.pp
+++ b/manifests/role/graphoid.pp
@@ -5,12 +5,5 @@
         description => 'node.js service converting graph definitions into PNG'
     }
 
-    # LVS pooling/depoling scripts
-    include ::lvs::configuration
-    conftool::scripts::service { 'graphoid':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
-    }
-
     include ::graphoid
 }
diff --git a/manifests/role/mathoid.pp b/manifests/role/mathoid.pp
index da8de0e..e695b25 100644
--- a/manifests/role/mathoid.pp
+++ b/manifests/role/mathoid.pp
@@ -5,12 +5,5 @@
         description => 'mathoid server'
     }
 
-    # LVS pooling/depoling scripts
-    include ::lvs::configuration
-    conftool::scripts::service { 'mathoid':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
-    }
-
     include ::mathoid
 }
diff --git a/manifests/role/mobileapps.pp b/manifests/role/mobileapps.pp
index c05ede8..7044b7a 100644
--- a/manifests/role/mobileapps.pp
+++ b/manifests/role/mobileapps.pp
@@ -5,11 +5,5 @@
         description => 'A service for use by mobile apps. Provides DOM 
manipulation, aggregation, JSON flattening'
     }
 
-    include ::lvs::configuration
-    conftool::scripts::service { 'mobileapps':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
-    }
-
     include ::mobileapps
 }
diff --git a/manifests/role/scb.pp b/manifests/role/scb.pp
index 7d26679..aec5fb9 100644
--- a/manifests/role/scb.pp
+++ b/manifests/role/scb.pp
@@ -10,10 +10,10 @@
     include role::ores::web
     include role::ores::worker
     include role::apertium
-
     include standard
     include base::firewall
-    if $::realm == 'production' {
-        include lvs::realserver
+
+    if hiera('has_lvs', true) {
+        include role::lvs::realserver
     }
 }
diff --git a/modules/role/manifests/ores/web.pp 
b/modules/role/manifests/ores/web.pp
index 4b9ff77..c140e1f 100644
--- a/modules/role/manifests/ores/web.pp
+++ b/modules/role/manifests/ores/web.pp
@@ -1,10 +1,3 @@
 class role::ores::web {
-    # LVS pooling/depoling scripts
-    include ::lvs::configuration
-    conftool::scripts::service { 'ores':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
-    }
-
     include ::ores::web
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10cc378aa0573d397e3703dfa3b28d560ac14ff0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>

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

Reply via email to