Mobrovac has uploaded a new change for review.
https://gerrit.wikimedia.org/r/207052
Change subject: mobileapps service: Varnish / parsoidcache configuration
......................................................................
mobileapps service: Varnish / parsoidcache configuration
Bug: T92627
Change-Id: Ida30470ac972d4598dbc18ceab444463c35024c1
---
M modules/role/manifests/cache/configuration.pp
M modules/role/manifests/cache/parsoid.pp
M templates/varnish/parsoid-common.inc.vcl.erb
M templates/varnish/parsoid-frontend.inc.vcl.erb
4 files changed, 30 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/52/207052/1
diff --git a/modules/role/manifests/cache/configuration.pp
b/modules/role/manifests/cache/configuration.pp
index 49e8b2d..21e59c6 100644
--- a/modules/role/manifests/cache/configuration.pp
+++ b/modules/role/manifests/cache/configuration.pp
@@ -24,6 +24,9 @@
'citoid' => {
'eqiad' => 'citoid.svc.eqiad.wmnet',
},
+ 'mobileapps' => {
+ 'eqiad' => 'mobileapps.svc.eqiad.wmnet',
+ },
'restbase' => {
'eqiad' => 'restbase.svc.eqiad.wmnet',
},
diff --git a/modules/role/manifests/cache/parsoid.pp
b/modules/role/manifests/cache/parsoid.pp
index 8aa9910..6de7fde 100644
--- a/modules/role/manifests/cache/parsoid.pp
+++ b/modules/role/manifests/cache/parsoid.pp
@@ -24,10 +24,11 @@
admin_port => 6083,
storage => $::role::cache::2layer::persistent_storage_args,
directors => {
- 'backend' =>
$::role::cache::configuration::backends[$::realm]['parsoid'][$::mw_primary],
- 'cxserver_backend' =>
$::role::cache::configuration::backends[$::realm]['cxserver'][$::site],
- 'citoid_backend' =>
$::role::cache::configuration::backends[$::realm]['citoid'][$::site],
- 'restbase_backend' =>
$::role::cache::configuration::backends[$::realm]['restbase'][$::site],
+ 'backend' =>
$::role::cache::configuration::backends[$::realm]['parsoid'][$::mw_primary],
+ 'cxserver_backend' =>
$::role::cache::configuration::backends[$::realm]['cxserver'][$::site],
+ 'citoid_backend' =>
$::role::cache::configuration::backends[$::realm]['citoid'][$::site],
+ 'mobileapps_backend' =>
$::role::cache::configuration::backends[$::realm]['mobileapps'][$::site],
+ 'restbase_backend' =>
$::role::cache::configuration::backends[$::realm]['restbase'][$::site],
},
director_options => {
'retries' => 2,
@@ -46,6 +47,11 @@
{
'backend_match' => '^citoid',
'port' => 1970,
+ 'probe' => false,
+ },
+ {
+ 'backend_match' => '^mobileapps',
+ 'port' => 6624,
'probe' => false,
},
{
@@ -70,10 +76,11 @@
port => 80,
admin_port => 6082,
directors => {
- 'backend' => $site_parsoid_nodes,
- 'cxserver_backend' =>
$::role::cache::configuration::backends[$::realm]['cxserver'][$::site],
- 'citoid_backend' =>
$::role::cache::configuration::backends[$::realm]['citoid'][$::site],
- 'restbase_backend' =>
$::role::cache::configuration::backends[$::realm]['restbase'][$::site],
+ 'backend' => $site_parsoid_nodes,
+ 'cxserver_backend' =>
$::role::cache::configuration::backends[$::realm]['cxserver'][$::site],
+ 'citoid_backend' =>
$::role::cache::configuration::backends[$::realm]['citoid'][$::site],
+ 'mobileapps_backend' =>
$::role::cache::configuration::backends[$::realm]['mobileapps'][$::site],
+ 'restbase_backend' =>
$::role::cache::configuration::backends[$::realm]['restbase'][$::site],
},
director_type => 'chash',
director_options => {
@@ -95,6 +102,11 @@
'probe' => false,
},
{
+ 'backend_match' => '^mobileapps',
+ 'port' => 6624,
+ 'probe' => false,
+ },
+ {
'backend_match' => '^restbase',
'port' => 7231,
'probe' => false, # TODO: Need probe here
diff --git a/templates/varnish/parsoid-common.inc.vcl.erb
b/templates/varnish/parsoid-common.inc.vcl.erb
index a42b0a1..87145fc 100644
--- a/templates/varnish/parsoid-common.inc.vcl.erb
+++ b/templates/varnish/parsoid-common.inc.vcl.erb
@@ -9,6 +9,10 @@
set req.backend = citoid_backend;
return (pass);
}
+ if (req.http.Host ~ "mobileapps" ) {
+ set req.backend = mobileapps_backend;
+ return (pass);
+ }
if (req.http.Host ~ "restbase" || req.http.Host ~ "rest\." ) {
set req.backend = restbase_backend;
return (pass);
diff --git a/templates/varnish/parsoid-frontend.inc.vcl.erb
b/templates/varnish/parsoid-frontend.inc.vcl.erb
index df212c5..2745fa5 100644
--- a/templates/varnish/parsoid-frontend.inc.vcl.erb
+++ b/templates/varnish/parsoid-frontend.inc.vcl.erb
@@ -25,6 +25,9 @@
if (req.http.Host ~ "citoid") {
return (hit_for_pass);
}
+ if (req.http.Host ~ "mobileapps") {
+ return (hit_for_pass);
+ }
if (req.http.Host ~ "restbase" || req.http.Host ~ "rest\.") {
// Dummy endpoint for eager DNS resolution / TLS handshake.
if (req.url ~ "^/_preconnect") {
--
To view, visit https://gerrit.wikimedia.org/r/207052
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida30470ac972d4598dbc18ceab444463c35024c1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mobrovac <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits