jenkins-bot has submitted this change and it was merged. Change subject: Rationalize services definitions for labs too. ......................................................................
Rationalize services definitions for labs too. Change-Id: I61fab8cf3d69586a53279d35a9bd0142cdd9f7d9 --- M wmf-config/CommonSettings-labs.php M wmf-config/CommonSettings.php A wmf-config/LabsServices.php M wmf-config/ProductionServices.php 4 files changed, 48 insertions(+), 45 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index dd45a6b..1d9e989 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -45,10 +45,6 @@ // Experimental! See <https://gerrit.wikimedia.org/r/#/c/86867/>. $wgResourceLoaderStorageEnabled = true; -if ( $wmgUseEventLogging ) { - $wgEventLoggingFile = 'udp://deployment-eventlogging03.eqiad.wmflabs:8421/EventLogging'; -} - $wgLocalVirtualHosts = array( 'wikipedia.beta.wmflabs.org', 'wiktionary.beta.wmflabs.org', @@ -101,11 +97,6 @@ $wgMediaViewerNetworkPerformanceSamplingFactor = $wmgMediaViewerNetworkPerformanceSamplingFactor; } -if ( $wmgUseParsoid ) { - $wmgParsoidURL = 'http://10.68.16.120:8000'; // deployment-parsoid05 - // Re-link now it's been set to a new value - $wgVirtualRestConfig['modules']['parsoid']['url'] = $wmgParsoidURL; -} if ( $wmgUseFlow ) { $wgFlowParsoidURL = $wmgParsoidURL; // Re-link now it's been set to a new value @@ -193,16 +184,6 @@ ); } -if ( $wmgUseApiFeatureUsage ) { - // Override server list for Labs - $wgApiFeatureUsageQueryEngineConf['serverList'] = array( - 'deployment-elastic05', - 'deployment-elastic06', - 'deployment-elastic07', - 'deployment-elastic08', - ); -} - // Labs override for BounceHandler if ( $wmgUseBounceHandler ) { //$wgVERPsecret = ''; // This was set in PrivateSettings.php by Legoktm @@ -241,7 +222,6 @@ if ( $wmgUseMath ) { $wgMathFileBackend = false; $wgMathDirectory = '/data/project/upload7/math'; - $wgMathMathMLUrl = 'http://deployment-mathoid.eqiad.wmflabs:10042'; } if ( $wmgUseScore ) { @@ -263,8 +243,6 @@ } if ( $wmgUseCollection ) { - // Use the beta/labs OCG service - $wgCollectionMWServeURL = 'http://deployment-pdf01:8000'; $wgCollectionPortletFormats[] = 'rdf2text'; // Don't use production proxy to reach PediaPress $wgCollectionCommandToServeURL[ 'zip_post' ] = 'https://pediapress.com/wmfup/'; @@ -342,11 +320,6 @@ require_once( "$IP/extensions/Sentry/Sentry.php" ); $wgSentryDsn = $wmgSentryDsn; $wgSentryLogPhpErrors = false; -} - -if ( $wmgUseEventBus ) { - wfLoadExtension( 'EventBus' ); - $wgEventServiceUrl = 'http://deployment-eventlogging04.deployment-prep.eqiad.wmflabs:8085/v1/events'; } if ( $wmgUseEcho && $wmgUseCentralAuth ) { diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index b8e05bf..baacc62 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -86,19 +86,17 @@ # Include all the service definitions # TODO: only include if in production, set up beta separately -require "$wmfConfigDir/ProductionServices.php"; +switch( $wmfRealm ) { +case 'labs': + require "$wmfConfigDir/LabsServices.php"; + break; +case 'production': +default: + require "$wmfConfigDir/ProductionServices.php"; +} # Must be set before InitialiseSettings.php: -switch( $wmfRealm ) { -case 'production': - $wmfUdp2logDest = $wmfLocalServices['udp2log']; - break; -case 'labs': - $wmfUdp2logDest = 'deployment-fluorine.eqiad.wmflabs:8420'; - break; -default: - $wmfUdp2logDest = '127.0.0.1:8420'; -} +$wmfUdp2logDest = $wmfLocalServices['udp2log']; # Initialise wgConf require( "$wmfConfigDir/wgConf.php" ); @@ -467,14 +465,13 @@ # Squid Configuration ####################################################################### +$wgStatsdServer = $wmfLocalServices['statsd']; if ( $wmfRealm === 'production' ) { - $wgStatsdServer = $wmfLocalServices['statsd']; if ( $wmgUseClusterSquid ) { $wgUseSquid = true; require( "$wmfConfigDir/squid.php" ); } } elseif ( $wmfRealm === 'labs' ) { - $wgStatsdServer = 'labmon1001.eqiad.wmnet'; $wgStatsdMetricPrefix = 'BetaMediaWiki'; if ( $wmgUseClusterSquid ) { $wgUseSquid = true; @@ -1313,9 +1310,7 @@ require_once "$IP/extensions/ApiFeatureUsage/ApiFeatureUsage.php"; $wgApiFeatureUsageQueryEngineConf = array( 'class' => 'ApiFeatureUsageQueryEngineElastica', - 'serverList' => array( - $wmfLocalServices['search'], - ), + 'serverList' => $wmfLocalServices['search'], ); } diff --git a/wmf-config/LabsServices.php b/wmf-config/LabsServices.php new file mode 100644 index 0000000..404d204 --- /dev/null +++ b/wmf-config/LabsServices.php @@ -0,0 +1,35 @@ +<?php +# WARNING: This file is publically viewable on the web. Do not put private data here. + +####################################################################### +# LabsServices.php should include all the service hostnames/ips +# for any service used in labs +# +# It is included by CommonSettings.php +# +####################################################################### + +$wmfAllServices = array(); + +$wmfAllServices['eqiad'] = array( + 'udp2log' => 'deployment-fluorine.eqiad.wmflabs:8420', + 'statsd' => 'labmon1001.eqiad.wmnet', + 'search' => array( + 'deployment-elastic05', + 'deployment-elastic06', + 'deployment-elastic07', + 'deployment-elastic08', + ), + 'ocg' => 'http://deployment-pdf01:8000', + 'urldownloader' => 'http://deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080', + 'parsoid' => 'http://10.68.16.120:8000', + 'mathoid' => 'http://deployment-mathoid.eqiad.wmflabs:10042', + 'eventlogging' => 'udp://deployment-eventlogging03.eqiad.wmflabs:8421', + 'eventbus' => 'http://deployment-eventlogging04.deployment-prep.eqiad.wmflabs:8085', +); + + +# Shorthand when we have no master-slave situation to keep into account +$wmfLocalServices = $wmfAllServices[$wmfDatacenter]; + +$wmfMasterServices = $wmfAllServices[$wmfMasterDatacenter]; diff --git a/wmf-config/ProductionServices.php b/wmf-config/ProductionServices.php index c89a274..88e7838 100644 --- a/wmf-config/ProductionServices.php +++ b/wmf-config/ProductionServices.php @@ -14,7 +14,7 @@ $wmfAllServices['eqiad'] = array( 'udp2log' => 'fluorine.eqiad.wmnet:8420', 'statsd' => 'statsd.eqiad.wmnet', - 'search' => '10.2.2.30', # search.svc.eqiad.wmnet + 'search' => array( '10.2.2.30' ), # search.svc.eqiad.wmnet 'ocg' => 'http://ocg.svc.eqiad.wmnet:8000', 'urldownloader' => 'http://url-downloader.wikimedia.org:8080', 'parsoid' => 'http://parsoid.svc.eqiad.wmnet:8000', @@ -26,7 +26,7 @@ $wmfAllServices['codfw'] = array( 'udp2log' => 'fluorine.eqiad.wmnet:8420', 'statsd' => 'statsd.eqiad.wmnet', - 'search' => '10.2.1.30', # search.svc.codfw.wmnet + 'search' => array( '10.2.1.30' ), # search.svc.codfw.wmnet 'ocg' => 'http://ocg.svc.eqiad.wmnet:8000', 'urldownloader' => 'http://url-downloader.wikimedia.org:8080', 'parsoid' => 'http://parsoid.svc.eqiad.wmnet:8000', # Change this once parsoid is up and running in codfw -- To view, visit https://gerrit.wikimedia.org/r/269955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61fab8cf3d69586a53279d35a9bd0142cdd9f7d9 Gerrit-PatchSet: 6 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto <[email protected]> Gerrit-Reviewer: Aaron Schulz <[email protected]> Gerrit-Reviewer: Alex Monk <[email protected]> Gerrit-Reviewer: Chad <[email protected]> Gerrit-Reviewer: Florianschmidtwelzow <[email protected]> Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]> Gerrit-Reviewer: Ori.livneh <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
