Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: role::mediawiki::webserver: convert to role::lvs::realserver
......................................................................

role::mediawiki::webserver: convert to role::lvs::realserver

Change-Id: I6ac5347ed415b94204de65a866cf8268abe8b85f
---
M hieradata/labs/deployment-prep/common.yaml
M hieradata/role/common/mediawiki/appserver.yaml
M hieradata/role/common/mediawiki/appserver/api.yaml
M hieradata/role/common/mediawiki/appserver/canary_api.yaml
M hieradata/role/common/mediawiki/canary_appserver.yaml
M hieradata/role/common/mediawiki/imagescaler.yaml
M modules/role/manifests/mediawiki/appserver.pp
M modules/role/manifests/mediawiki/webserver.pp
8 files changed, 17 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/316347/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 216c65e..40f35ff 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -155,7 +155,6 @@
 "mediawiki::jobrunner::runners_upload": 2
 "hhvm::base_jit_size": 183500800
 "role::logging::mediawiki::log_directory": /data/project/logs
-"role::mediawiki::webserver::pool": one-pool-to-rule-them-all
 "beta::syncsiteresources::user": www-data
 "role::url_downloader::url_downloader_ip": 10.68.16.135 # 
deployment-urldownloader
 "zotero::http_proxy": 
deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080
diff --git a/hieradata/role/common/mediawiki/appserver.yaml 
b/hieradata/role/common/mediawiki/appserver.yaml
index 03552ea..7a8efa8 100644
--- a/hieradata/role/common/mediawiki/appserver.yaml
+++ b/hieradata/role/common/mediawiki/appserver.yaml
@@ -1,5 +1,7 @@
 cluster: appserver
-role::mediawiki::webserver::pool: apaches
+role::lvs::realserver::pools:
+  hhvm:
+    lvs_name: apaches
 admin::groups:
   - deployment
   - perf-roots
@@ -15,4 +17,3 @@
       connect_timeout: 3000
 apache::logrotate::rotate: 12
 nutcracker::verbosity: "4"
-
diff --git a/hieradata/role/common/mediawiki/appserver/api.yaml 
b/hieradata/role/common/mediawiki/appserver/api.yaml
index 7be1eed..7b1c70d 100644
--- a/hieradata/role/common/mediawiki/appserver/api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/api.yaml
@@ -1,5 +1,7 @@
 cluster: api_appserver
-role::mediawiki::webserver::pool: api
+role::lvs::realserver::pools:
+  hhvm:
+    lvs_name: api
 admin::groups:
   - deployment
   - perf-roots
@@ -15,4 +17,3 @@
       connect_timeout: 3000
 apache::logrotate::rotate: 12
 nutcracker::verbosity: "4"
-
diff --git a/hieradata/role/common/mediawiki/appserver/canary_api.yaml 
b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
index f9682b5..fb7b2e3 100644
--- a/hieradata/role/common/mediawiki/appserver/canary_api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
@@ -1,5 +1,7 @@
 cluster: api_appserver
-role::mediawiki::webserver::pool: api
+role::lvs::realserver::pools:
+  hhvm:
+    lvs_name: api
 apache::mpm::mpm: worker
 mediawiki::web::mpm_config::mpm: worker
 admin::groups:
@@ -20,4 +22,3 @@
       connect_timeout: 3000
 apache::logrotate::rotate: 12
 nutcracker::verbosity: "4"
-
diff --git a/hieradata/role/common/mediawiki/canary_appserver.yaml 
b/hieradata/role/common/mediawiki/canary_appserver.yaml
index e33094b..faf43a1 100644
--- a/hieradata/role/common/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/common/mediawiki/canary_appserver.yaml
@@ -1,5 +1,7 @@
 cluster: appserver
-role::mediawiki::webserver::pool: apaches
+role::lvs::realserver::pools:
+  hhvm:
+    lvs_name: apaches
 apache::mpm::mpm: worker
 mediawiki::web::mpm_config::mpm: worker
 admin::groups:
diff --git a/hieradata/role/common/mediawiki/imagescaler.yaml 
b/hieradata/role/common/mediawiki/imagescaler.yaml
index eafe98d..4211200 100644
--- a/hieradata/role/common/mediawiki/imagescaler.yaml
+++ b/hieradata/role/common/mediawiki/imagescaler.yaml
@@ -1,8 +1,10 @@
 cluster: imagescaler
+role::lvs::realserver::pools:
+  hhvm:
+    lvs_name: rendering
 admin::groups:
   - deployment
   - perf-roots
-role::mediawiki::webserver::pool: rendering
 mediawiki::web::mpm_config::workers_limit: 100
 nutcracker::verbosity: "4"
 hhvm::extra::fcgi:
diff --git a/modules/role/manifests/mediawiki/appserver.pp 
b/modules/role/manifests/mediawiki/appserver.pp
index 6ab52f7..0dc2aa5 100644
--- a/modules/role/manifests/mediawiki/appserver.pp
+++ b/modules/role/manifests/mediawiki/appserver.pp
@@ -4,4 +4,3 @@
     include ::role::mediawiki::webserver
 
 }
-
diff --git a/modules/role/manifests/mediawiki/webserver.pp 
b/modules/role/manifests/mediawiki/webserver.pp
index bc270e2..6d47a9b 100644
--- a/modules/role/manifests/mediawiki/webserver.pp
+++ b/modules/role/manifests/mediawiki/webserver.pp
@@ -1,4 +1,4 @@
-class role::mediawiki::webserver($pool) {
+class role::mediawiki::webserver {
     include ::role::mediawiki::common
     include ::apache::monitoring
     include ::mediawiki::web
@@ -12,20 +12,10 @@
     }
 
     if hiera('has_lvs', true) {
-        include ::lvs::configuration
-        $ips = $lvs::configuration::service_ips[$pool][$::site]
-
-        class { 'lvs::realserver':
-            realserver_ips => $ips,
-        }
+        include ::role::lvs::realserver
 
         # Conftool config
         include ::mediawiki::conftool
-        conftool::scripts::service { 'hhvm':
-            lvs_name            => $pool,
-            lvs_class_hosts     => $lvs::configuration::lvs_class_hosts,
-            lvs_services_config => $lvs::configuration::lvs_services
-        }
     }
 
     ferm::service { 'mediawiki-http':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ac5347ed415b94204de65a866cf8268abe8b85f
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