Jump to content
Wikitech

Apache

From Wikitech

Apache on bare metal

Historically, and in the beta cluster, Apache configuration is managed as discussed in Application servers.

Apache on mw-on-k8s

The configuration which will end up on appserver pods in Kubernetes exists in several pieces on the deployment server. One of the puppet modules installed on the deployment server, config.pp, contains configuration for Apache virtual hosts, mcrouter pools, and tlsproxy pools. This file existed to enable configuration to be shared between mw-on-k8s, and bare metal application servers.

The virtual hosts which will populate the apache config are mediawiki::common_sites, and mediawiki::sites, defined in /hieradata/common/mediawiki.yaml. This file is where changes which are intended to affect specific virtual hosts ought to be made.

That configuration will be used by puppet to generate /etc/helmfile-defaults/mediawiki/httpd.yaml on the deployment server, which will be consumed by the site_helpers template in order to generate the virtual hosts files.

In order to see how the output of this process looks in Kubernetes, let's explore an example in mw-experimental. On the deployment server:

kube_env mw-experimental eqiad

kubectl get pods -o yaml | less

In the volumeMounts section of the yaml, we can see the sites files which were generated by the template (e.g. /etc/apache2/sites-enabled/09-wikimedia.conf).

By examining the contents of the configMap for the pod, we can see the actual content of the apache configuration:

kubectl get configMap mediawiki-pinkllama-httpd-sites-config -o yaml

AltStyle によって変換されたページ (->オリジナル) /