BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/275123
Change subject: r::c::config: move to hieradata ...................................................................... r::c::config: move to hieradata This also changes the structure a little bit to accommodate future things. Note that 'misc' cluster never had r::c::configuration data; it hardcodes all of its (eqiad-only) backends in misc.pp. Will update it to match when we start going after misc-cluster backends for codfw support. Bug: T127484 Change-Id: I278c87cc6f7f76d7e98490454762a224e531bff4 --- M hieradata/common/cache/maps.yaml M hieradata/common/cache/text.yaml M hieradata/common/cache/upload.yaml M hieradata/labs.yaml D modules/role/manifests/cache/configuration.pp M modules/role/manifests/cache/maps.pp M modules/role/manifests/cache/text.pp M modules/role/manifests/cache/upload.pp 8 files changed, 91 insertions(+), 89 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/275123/1 diff --git a/hieradata/common/cache/maps.yaml b/hieradata/common/cache/maps.yaml index deafd12..f1efe0e 100644 --- a/hieradata/common/cache/maps.yaml +++ b/hieradata/common/cache/maps.yaml @@ -2,3 +2,7 @@ eqiad: - 'cp1043.eqiad.wmnet' - 'cp1044.eqiad.wmnet' +apps: + kartotherian: + backends: + codfw: 'kartotherian.svc.codfw.wmnet' diff --git a/hieradata/common/cache/text.yaml b/hieradata/common/cache/text.yaml index 3455f27..88d23ea 100644 --- a/hieradata/common/cache/text.yaml +++ b/hieradata/common/cache/text.yaml @@ -41,3 +41,32 @@ - 'cp4016.ulsfo.wmnet' - 'cp4017.ulsfo.wmnet' - 'cp4018.ulsfo.wmnet' +apps: + appservers: + backends: + eqiad: 'appservers.svc.eqiad.wmnet' + codfw: 'appservers.svc.codfw.wmnet' + appservers_debug: + backends: + eqiad: 'appservers-debug.svc.eqiad.wmnet' + api: + backends: + eqiad: 'api.svc.eqiad.wmnet' + codfw: 'api.svc.codfw.wmnet' + rendering: + backends: + eqiad: 'rendering.svc.eqiad.wmnet' + codfw: 'rendering.svc.codfw.wmnet' + restbase: + backends: + eqiad: 'restbase.svc.eqiad.wmnet' + codfw: 'restbase.svc.codfw.wmnet' + cxserver: + backends: + eqiad: 'cxserver.svc.eqiad.wmnet' + citoid: + backends: + eqiad: 'citoid.svc.eqiad.wmnet' + security_audit: + backends: + eqiad: [] diff --git a/hieradata/common/cache/upload.yaml b/hieradata/common/cache/upload.yaml index a1d75c2..d6d6a06 100644 --- a/hieradata/common/cache/upload.yaml +++ b/hieradata/common/cache/upload.yaml @@ -46,3 +46,8 @@ - 'cp4013.ulsfo.wmnet' - 'cp4014.ulsfo.wmnet' - 'cp4015.ulsfo.wmnet' +apps: + swift: + backends: + eqiad: 'ms-fe.svc.eqiad.wmnet' + codfw: 'ms-fe.svc.codfw.wmnet' diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml index 2294065..f488368 100644 --- a/hieradata/labs.yaml +++ b/hieradata/labs.yaml @@ -26,6 +26,8 @@ archiva::proxy::ssl_enabled: false archiva::proxy::certificate_name: ssl-cert-snakeoil statsite::instance::graphite_host: 'labmon1001.eqiad.wmnet' + +# Cache-layer stuff cache::route_table: eqiad: 'direct' cache::text::nodes: @@ -37,6 +39,43 @@ cache::maps::nodes: eqiad: - '127.0.0.1' +cache::text::apps: + appservers: + backends: + eqiad: + - '10.68.17.170' # deployment-mediawiki01 + - '10.68.16.127' # deployment-mediawiki02 + api: + backends: + eqiad: + - '10.68.17.170' # deployment-mediawiki01 + - '10.68.16.127' # deployment-mediawiki02 + rendering: + backends: + eqiad: + - '10.68.17.170' # deployment-mediawiki01 + - '10.68.16.127' # deployment-mediawiki02 + security_audit: + backends: + eqiad: '10.68.17.55' # deployment-mediawiki03 + appservers_debug: + backends: + eqiad: '10.68.17.170' # deployment-mediawiki01 + cxserver: + backends: + eqiad: 'cxserver-beta.wmflabs.org' + citoid: + backends: + eqiad: 'citoid.wmflabs.org' + restbase: + backends: + eqiad: 'deployment-restbase01.eqiad.wmflabs' +cache::upload::apps: + swift: + backends: + # ms emulator set in July 2013. Beta does not have Swift yet. + # instance is an unpuppetized hack with nginx proxy. + eqiad: '10.68.16.189' # deployment-upload.eqiad.wmflabs role::cache::base::zero_site: 'http://zero.wikimedia.beta.wmflabs.org' role::cache::base::purge_host_only_upload_re: '^upload\.beta\.wmflabs\.org$' role::cache::base::purge_host_not_upload_re: '^(?!upload\.beta\.wmflabs\.org)' @@ -48,6 +87,7 @@ - vdb - vdb varnish::dynamic_directors: false + zookeeper_hosts: "${::fqdn}": 1 nrpe::allowed_hosts: '10.68.16.195' diff --git a/modules/role/manifests/cache/configuration.pp b/modules/role/manifests/cache/configuration.pp deleted file mode 100644 index 6a814e8..0000000 --- a/modules/role/manifests/cache/configuration.pp +++ /dev/null @@ -1,79 +0,0 @@ -class role::cache::configuration { - $backends = { - 'production' => { - 'appservers' => { - 'eqiad' => ['appservers.svc.eqiad.wmnet'], - 'codfw' => ['appservers.svc.codfw.wmnet'], - }, - 'api' => { - 'eqiad' => ['api.svc.eqiad.wmnet'], - 'codfw' => ['api.svc.codfw.wmnet'], - }, - 'rendering' => { - 'eqiad' => ['rendering.svc.eqiad.wmnet'], - 'codfw' => ['rendering.svc.codfw.wmnet'], - }, - 'appservers_debug' => { - 'eqiad' => ['appservers-debug.svc.eqiad.wmnet'], - }, - 'cxserver' => { - 'eqiad' => ['cxserver.svc.eqiad.wmnet'], - }, - 'citoid' => { - 'eqiad' => ['citoid.svc.eqiad.wmnet'], - }, - 'restbase' => { - 'eqiad' => ['restbase.svc.eqiad.wmnet'], - 'codfw' => ['restbase.svc.codfw.wmnet'], - }, - 'swift' => { - 'eqiad' => ['ms-fe.svc.eqiad.wmnet'], - 'codfw' => ['ms-fe.svc.codfw.wmnet'], - }, - 'security_audit' => { 'eqiad' => [] }, # no audit backend for prod at this time - 'kartotherian' => { - 'codfw' => ['kartotherian.svc.codfw.wmnet'], - } - }, - 'labs' => { - 'appservers' => { - 'eqiad' => [ - '10.68.17.170', # deployment-mediawiki01 - '10.68.16.127', # deployment-mediawiki02 - ], - }, - 'api' => { - 'eqiad' => [ - '10.68.17.170', # deployment-mediawiki01 - '10.68.16.127', # deployment-mediawiki02 - ], - }, - 'rendering' => { - 'eqiad' => [ - '10.68.17.170', # deployment-mediawiki01 - '10.68.16.127', # deployment-mediawiki02 - ], - }, - 'security_audit' => { - 'eqiad' => [ '10.68.17.55' ], # deployment-mediawiki03 - }, - 'appservers_debug' => { - 'eqiad' => [ '10.68.17.170' ], # deployment-mediawiki01 - }, - 'cxserver' => { - 'eqiad' => ['cxserver-beta.wmflabs.org'], - }, - 'citoid' => { - 'eqiad' => ['citoid.wmflabs.org'], - }, - 'restbase' => { - 'eqiad' => ['deployment-restbase01.eqiad.wmflabs'], - }, - 'swift' => { - # ms emulator set in July 2013. Beta does not have Swift yet. - # instance is an unpuppetized hack with nginx proxy. - 'eqiad' => ['10.68.16.189'], # deployment-upload.eqiad.wmflabs - }, - } - } -} diff --git a/modules/role/manifests/cache/maps.pp b/modules/role/manifests/cache/maps.pp index 22cb01b..5b0b6cd 100644 --- a/modules/role/manifests/cache/maps.pp +++ b/modules/role/manifests/cache/maps.pp @@ -35,6 +35,7 @@ 'probe' => 'varnish', } + $apps = hiera('cache::maps::apps') $app_directors = { 'kartotherian' => { 'dynamic' => 'no', @@ -42,7 +43,7 @@ # XXX note explicit abnormal hack: service only exists in codfw, but eqiad is Tier-1 in general # XXX this means traffic is moving x-dc without crypto! # XXX this also means users mapped to codfw frontends bounce traffic [codfw->eqiad->codfw] on their way in! - 'backends' => $role::cache::configuration::backends[$::realm]['kartotherian']['codfw'], + 'backends' => $apps['kartotherian']['backends']['codfw'], 'be_opts' => { 'port' => 6533, 'connect_timeout' => '5s', diff --git a/modules/role/manifests/cache/text.pp b/modules/role/manifests/cache/text.pp index cb103e1..6bd44de 100644 --- a/modules/role/manifests/cache/text.pp +++ b/modules/role/manifests/cache/text.pp @@ -45,53 +45,54 @@ 'max_connections' => 1000, } + $apps = hiera('cache::text::apps') $app_directors = { 'appservers' => { 'dynamic' => 'no', 'type' => 'random', - 'backends' => $role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary], + 'backends' => $apps['appservers']['backends'][$::mw_primary], 'be_opts' => $app_def_be_opts, }, 'api' => { 'dynamic' => 'no', 'type' => 'random', - 'backends' => $role::cache::configuration::backends[$::realm]['api'][$::mw_primary], + 'backends' => $apps['api']['backends'][$::mw_primary], 'be_opts' => $app_def_be_opts, }, 'rendering' => { 'dynamic' => 'no', 'type' => 'random', - 'backends' => $role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary], + 'backends' => $apps['rendering']['backends'][$::mw_primary], 'be_opts' => $app_def_be_opts, }, 'security_audit' => { 'dynamic' => 'no', 'type' => 'random', - 'backends' => $role::cache::configuration::backends[$::realm]['security_audit'][$::mw_primary], + 'backends' => $apps['security_audit']['backends'][$::mw_primary], 'be_opts' => $app_def_be_opts, }, 'appservers_debug' => { 'dynamic' => 'no', 'type' => 'random', - 'backends' => $role::cache::configuration::backends[$::realm]['appservers_debug'][$::mw_primary], + 'backends' => $apps['appservers_debug']['backends'][$::mw_primary], 'be_opts' => merge($app_def_be_opts, { 'max_connections' => 20 }), }, 'restbase_backend' => { 'dynamic' => 'no', 'type' => 'random', - 'backends' => $role::cache::configuration::backends[$::realm]['restbase'][$::mw_primary], + 'backends' => $apps['restbase']['backends'][$::mw_primary], 'be_opts' => merge($app_def_be_opts, { 'port' => 7231, 'max_connections' => 5000 }), }, 'cxserver_backend' => { # LEGACY: should be removed eventually 'dynamic' => 'no', 'type' => 'random', - 'backends' => $::role::cache::configuration::backends[$::realm]['cxserver'][$::mw_primary], + 'backends' => $apps['cxserver']['backends'][$::mw_primary], 'be_opts' => merge($app_def_be_opts, { 'port' => 8080 }), }, 'citoid_backend' => { # LEGACY: should be removed eventually 'dynamic' => 'no', 'type' => 'random', - 'backends' => $::role::cache::configuration::backends[$::realm]['citoid'][$::mw_primary], + 'backends' => $apps['citoid']['backends'][$::mw_primary], 'be_opts' => merge($app_def_be_opts, { 'port' => 1970 }), }, } diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index 581e9b8..9152917 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -35,11 +35,12 @@ 'probe' => 'varnish', } + $apps = hiera('cache::upload::apps') $app_directors = { 'swift' => { 'dynamic' => 'no', 'type' => 'random', - 'backends' => $role::cache::configuration::backends[$::realm]['swift'][$::mw_primary], + 'backends' => $apps['swift']['backends'][$::mw_primary], 'be_opts' => { 'port' => 80, 'connect_timeout' => '5s', -- To view, visit https://gerrit.wikimedia.org/r/275123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I278c87cc6f7f76d7e98490454762a224e531bff4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack <bbl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits