Puppet Class: profile::kubernetes::deployment_server::mediawiki::config
- Defined in:
- modules/profile/manifests/kubernetes/deployment_server/mediawiki/config.pp
Summary
This profile handles installing the mediawiki configuration generated from puppet into mw on k8sOverview
SPDX-License-Identifier: Apache-2.0 tlsproxy pools. The reason to have this profile is to keep stuff in sync between the legacy and k8s worlds.
Note:
This class generates yaml files under $general_dir/mediawiki to handle apache virtual hosts, mcrouter pools,
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'modules/profile/manifests/kubernetes/deployment_server/mediawiki/config.pp', line 6
class profile::kubernetes::deployment_server::mediawiki::config(
String $deployment_server = lookup('deployment_server'),
Array[Mediawiki::SiteCollection] $common_sites = lookup('mediawiki::common_sites'),
Array[Mediawiki::SiteCollection] $mediawiki_sites = lookup('mediawiki::sites'),
String $domain_suffix = lookup('mediawiki::web::sites::domain_suffix', {'default_value' => 'org'}),
Stdlib::Unixpath $general_dir = lookup('profile::kubernetes::deployment_server::global_config::general_dir', {default_value => '/etc/helmfile-defaults'}),
Hash $servers_by_datacenter_category = lookup('profile::mediawiki::mcrouter_wancache::shards'),
Stdlib::Port $memcached_notls_port = lookup('profile::mediawiki::mcrouter_wancache::memcached_notls_port'),
Stdlib::Port $memcached_tls_port = lookup('profile::mediawiki::mcrouter_wancache::memcached_tls_port'),
Optional[Array[String]] $enabled_listeners = lookup('profile::services_proxy::envoy::enabled_listeners', {'default_value' => undef}),
String $statsd_server = lookup('statsd'),
String $udp2log_aggregator = lookup('udp2log_aggregator')
){
# Generate the apache-config defining yaml, and save it to
# $general_dir/mediawiki/httpd.yaml
# Beware: here we manually set the fcgi proxy, it should be changed
# if it gets changed on kubernetes.
# Uncomment if using FCGI_UNIX #T350770
$fcgi_proxy = 'unix:/run/shared/fpm-www.sock|fcgi://localhost'
# Uncomment if using FCGI_TCP
# $fcgi_proxy = 'fcgi://127.0.0.1:9000'
$all_sites = $mediawiki_sites + $common_sites
class { '::mediawiki::web::yaml_defs':
path => "${general_dir}/mediawiki/httpd.yaml",
siteconfigs => $all_sites,
fcgi_proxy => $fcgi_proxy,
domain_suffix => $domain_suffix,
statsd => $statsd_server,
}
# logging.
# TODO: use codfw logging pipeline for codfw once it's ready
$kafka_config = kafka_config('logging-eqiad')
$kafka_brokers = $kafka_config['brokers']['array']
class { 'mediawiki::logging::yaml_defs':
path => "${general_dir}/mediawiki/logging.yaml",
udp2log => $udp2log_aggregator,
kafka_brokers => $kafka_brokers,
rsyslog_max_message_size => '64k',
}
class { 'mediawiki::mcrouter::yaml_defs':
path => "${general_dir}/mediawiki/mcrouter_pools.yaml",
memcached_notls_port => $memcached_notls_port,
memcached_tls_port => $memcached_tls_port,
servers_by_datacenter_category => $servers_by_datacenter_category,
}
class { 'mediawiki::tlsproxy::yaml_defs':
path => "${general_dir}/mediawiki/tlsproxy.yaml",
listeners => $enabled_listeners,
}
}
|