Mark Bergsma has submitted this change and it was merged.

Change subject: (bug 44041) adapt role::cache::mobile for beta
......................................................................


(bug 44041) adapt role::cache::mobile for beta

* role::cache::mobile now includes the role::cache::configuration to
  properly load the beta configuration.
* setup the varnish filesystem on /dev/vdb
* hack the storage commandline for deployment instances
* disable varnish logging on beta, one can use varnishncsa from the
  command line to get the same results.
* tweak mount varnish::setup_filesystem() mount options for labs: it
  does not support 'logbufs=8' and needs 'comment=cloudconfig'

Change-Id: I198e5ae4cdea89af82901ddc1461ef4701e9e1cc
---
M manifests/role/cache.pp
M manifests/varnish.pp
2 files changed, 20 insertions(+), 7 deletions(-)

Approvals:
  Mark Bergsma: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index b30302c..c878361 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -646,6 +646,7 @@
 
        class mobile {
                include network::constants
+               include role::cache::configuration
 
                $cluster = "cache_mobile"
                $nagios_group = "cache_mobile_${::site}"
@@ -659,7 +660,11 @@
                include standard,
                        nrpe
 
-               varnish::setup_filesystem{ ["sda3", "sdb3"]:
+               $storage_backends = $::realm ? {
+                       'production' => ["sda3", "sdb3"],
+                       'labs' => ["vdb"]
+               }
+               varnish::setup_filesystem{ $storage_backends:
                        before => Varnish::Instance["mobile-backend"]
                }
 
@@ -673,7 +678,10 @@
                        vcl => "mobile-backend",
                        port => 81,
                        admin_port => 6083,
-                       storage => "-s 
sda3=persistent,/srv/sda3/varnish.persist,100G -s 
sdb3=persistent,/srv/sdb3/varnish.persist,100G",
+                       storage => $::realm ? {
+                               'production' => "-s 
sda3=persistent,/srv/sda3/varnish.persist,100G -s 
sdb3=persistent,/srv/sdb3/varnish.persist,100G",
+                               'labs' => '-s 
vdb=persistent,/srv/vdb/varnish.persist,19G',
+                       },
                        directors => {
                                "backend" => 
$role::cache::configuration::backends[$::realm]['apaches'][$::mw_primary],
                                "api" => 
$role::cache::configuration::backends[$::realm]['api'][$::mw_primary],
@@ -720,8 +728,10 @@
                        xff_sources => $network::constants::all_networks,
                }
 
-               varnish::logging { "locke" :           listener_address => 
"208.80.152.138", cli_args => "-m RxRequest:^(?!PURGE\$) -D" }
-               varnish::logging { "emery" :           listener_address => 
"208.80.152.184", cli_args => "-m RxRequest:^(?!PURGE\$) -D" }
-               varnish::logging { "multicast_relay" : listener_address => 
"208.80.154.15", port => "8419", cli_args => "-m RxRequest:^(?!PURGE\$) -D" }
+               if( $::realm == 'production' ) {
+                       varnish::logging { "locke" :           listener_address 
=> "208.80.152.138", cli_args => "-m RxRequest:^(?!PURGE\$) -D" }
+                       varnish::logging { "emery" :           listener_address 
=> "208.80.152.184", cli_args => "-m RxRequest:^(?!PURGE\$) -D" }
+                       varnish::logging { "multicast_relay" : listener_address 
=> "208.80.154.15", port => "8419", cli_args => "-m RxRequest:^(?!PURGE\$) -D" }
+               }
        }
 }
diff --git a/manifests/varnish.pp b/manifests/varnish.pp
index c1b664b..bab7d23 100644
--- a/manifests/varnish.pp
+++ b/manifests/varnish.pp
@@ -181,8 +181,11 @@
                mount { "/srv/${title}":
                        require => File["/srv/${title}"],
                        device => "/dev/${title}",
-                       fstype => "xfs",
-                       options => "noatime,nodiratime,nobarrier,logbufs=8",
+                       fstype => "auto",
+                       options => $::realm ? {
+                               'production' => 
"noatime,nodiratime,nobarrier,logbufs=8",
+                               'labs' => 
"noatime,nodiratime,nobarrier,comment=cloudconfig"
+                       },
                        ensure => mounted
                }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I198e5ae4cdea89af82901ddc1461ef4701e9e1cc
Gerrit-PatchSet: 33
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Mark Bergsma <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to