Page MenuHomePhabricator

beta apache configs need a public remote repo
Closed, ResolvedPublic

Description

It would seem that the apache configs on labs (seen at deployment-bastion:/etc/apache2/wmf) are a fork of operations/apache-config that is quite behind/diverged.

It also seems that this repo is an orphan on this cluster, not replicated to anywhere remote (ie gerrit)

This latter issue really needs addressing and the config going into a public repo


Version: unspecified
Severity: enhancement

Details

Reference
bz56395

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:23 AM
bzimport set Reference to bz56395.

I was wondering whether we could somehow reuse the configuration from production but use an environment variable to tweak the settings when in labs. Not sure how we can do it with Apache though.

Hmm, would that be something like cloning from operations/apache-config and then running some sed/awk on it to replace ServerNames with *.beta.* in them and that would be pretty much the difference or do all the redirect rules also have to be touched?

I thought about passing to apache -DREALM_LABS then tweak the configuration inline using <IfDefine> http://httpd.apache.org/docs/2.2/en/mod/core.html#ifdefine

But that might be too nasty.

We could have a per realm configuration that would define a bunch of well known constants such as the top level domain name (prod: '.org', labs: '.beta.wmflabs.org') and then expand them in the configuration.

operations/apache-config.git now has a "betacluster" branch

I have imported the files from /data/project/apache/conf to the betacluster branch

I have added the Gerrit URL as a git remote and checked it out as the local branch 'betacluster'.

http://git.wikimedia.org/log/operations%2Fapache-config.git/refs%2Fheads%2Fbetacluster

Change 116858 had a related patch set uploaded by Hashar:
operations-apache-config-lint only on master branch

https://gerrit.wikimedia.org/r/116858

Change 116858 merged by jenkins-bot:
operations-apache-config-lint only on master branch

https://gerrit.wikimedia.org/r/116858

The confs are now in operations/apache-config.git in the 'betacluster' branch.