Page MenuHomePhabricator

Re-organize the apache configuration for MediaWiki in puppet
Closed, ResolvedPublic

Assigned To
Authored By
Joe
Jun 12 2018, 7:30 AM
Referenced Files
None
Tokens
"Mountain of Wealth" token, awarded by Krenair."Barnstar" token, awarded by Dzahn."Love" token, awarded by elukey."Orange Medal" token, awarded by Krinkle.

Description

At the moment, mediawiki virtual hosts are written down with a lot of repetitiveness inside huge files. We should change that so that each change is more transparent and more manageable and less error-prone, especially since we're going to transition to PHP7 shortly and we want to be able to change things quickly.

Since all mediawiki vhosts are very similar to each other, we could codify most of what we have right now within a mediawiki::vhost define, which will need to allow various parameters, such as:

  • ServerName / ServerAliases
  • the docroot
  • secure redirect

this will also allow us to unify beta and production sites once an for all (see T1256)

We can then have all these site definition lie in the sites-available directory of apache2, and have one large file including all of them in site-enabled, for now.

Details

SubjectRepoBranchLines +/-
operations/puppetproduction+1 -0
operations/puppetproduction+8 -36
operations/puppetproduction+24 -98
operations/puppetproduction+13 -51
operations/puppetproduction+9 -49
operations/puppetproduction+6 -63
operations/puppetproduction+16 -83
operations/puppetproduction+16 -83
operations/puppetproduction+16 -83
operations/puppetproduction+14 -77
operations/puppetproduction+16 -81
operations/puppetproduction+17 -82
operations/puppetproduction+16 -66
operations/puppetproduction+22 -88
operations/puppetproduction+26 -68
operations/puppetproduction+11 -65
operations/puppetproduction+14 -39
operations/puppetproduction+16 -83
operations/puppetproduction+14 -40
operations/puppetproduction+10 -72
operations/puppetproduction+3 -48
operations/puppetproduction+29 -330
operations/puppetproduction+25 -50
operations/puppetproduction+4 -59
operations/puppetproduction+62 -134
operations/puppetproduction+252 -16
operations/puppetproduction+182 -17
operations/puppetproduction+453 -19
operations/puppetproduction+115 -3
operations/puppetproduction+18 -130
operations/puppetproduction+3 -0
operations/puppetproduction+53 -1
operations/puppetproduction+8 -3
operations/puppetproduction+148 -0
operations/puppetproduction+22 -490
operations/puppetproduction+73 -368
operations/puppetproduction+29 -150
operations/puppetproduction+785 -0
operations/puppetproduction+91 -63
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Some of them are so similar to each other I believe we can do a huge merge: https://gerrit.wikimedia.org/r/#/c/operations/puppet/+/322425/

@Krenair I think I will just reproduce the patches I did to the mediawiki_test environment in the main one, that looks safer given we already know those patches are ok.

Change 449721 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki: copy all individual wiki templates over from mediawiki_test

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

Change 449722 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikimedia.conf, wikimania.conf

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

Change 449724 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki: convert remnant.conf to use one file per vhost

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

Change 449725 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki: prepare the transition for the main sites

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

Change 449721 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: copy all individual wiki templates over from mediawiki_test

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

Change 449722 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikimedia.conf, wikimania.conf

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

Change 449724 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: convert remnant.conf to use one file per vhost

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

Change 449725 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: prepare the transition for the main sites

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

Change 450586 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki: serve small private wikis with mediawiki::web::vhost

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

Change 439893 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: add vhost define

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

Change 450586 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: serve small private wikis with mediawiki::web::vhost

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

Change 451206 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] httpd: fix mpm_event module conflict with mpm_prefork for php7.0

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

Change 451258 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert loginwiki, chapterwiki

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

Change 451259 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: expand include everywhere in remnant.conf

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

Change 451260 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: expand the includes in sites in main.conf (1/2)

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

Change 452322 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: expand the includes in sites in main.conf (2/2)

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

Change 452323 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert simple wikis in remnant.conf

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

Change 452330 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] wikimaniateam: expand all includes preparing for transition

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

Change 452330 merged by Giuseppe Lavagetto:
[operations/puppet@production] wikimaniateam: expand all includes preparing for transition

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

Change 452374 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::vhost: add the domain_suffix variable

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

Change 452374 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::vhost: add the domain_suffix variable

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

Change 451255 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: move the other private wikis to the define

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

Change 451257 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: make includes explicit in more wikis

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

Change 452635 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert usability wiki

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

Change 452636 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: migrate wikispecies

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

Change 451255 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: move the other private wikis to the define

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

Change 451257 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: make includes explicit in more wikis

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

Change 451259 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: expand include everywhere in remnant.conf

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

Change 451260 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: expand the includes in sites in main.conf (1/2)

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

Change 452322 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: expand the includes in sites in main.conf (2/2)

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

Change 461394 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert foundation.w.o to use vhost

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

Change 461395 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert commons.w.o

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

Change 461396 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert meta.w.o

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

Change 461397 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikisource.org

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

Change 461866 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert login.w.o

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

Change 451258 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert chapterwiki

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

Change 461976 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikivoyage.org

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

Change 461866 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert login.w.o

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

Change 461394 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert foundation.w.o to use vhost

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

Change 452323 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert simple wikis in remnant.conf

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

Change 452635 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert usability wiki

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

Change 452636 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: migrate wikispecies

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

Change 462424 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikiversity.org

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

Change 462425 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert mediawiki.org

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

Change 462477 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wiktionary.org

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

Change 462478 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikiquote.org

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

Change 462479 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert donate.w.o

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

Change 462480 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikinews.org

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

Change 462486 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikisource.org

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

Change 462487 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikibooks.org

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

Change 462492 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert vote.w.o

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

Change 462493 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert test.wikidata.org

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

Change 462494 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikidata.org

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

Change 462495 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki::web::prod_sites: convert wikipedia.org

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

Change 461395 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert commons.w.o

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

Change 461396 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert meta.w.o

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

Change 443843 abandoned by Giuseppe Lavagetto:
mediawiki::web: convert mediawiki.org to mediawiki::vhost

Reason:
This is superseded by other patches.

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

Change 461397 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikisource.org

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

Change 461976 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikivoyage.org

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

Change 462424 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikiversity.org

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

Change 462425 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert mediawiki.org

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

Change 462477 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wiktionary.org

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

Change 462478 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikiquote.org

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

Change 462479 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert donate.w.o

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

Change 462480 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikinews.org

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

Change 462486 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikisource.org

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

Change 462487 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikibooks.org

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

Change 462492 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert vote.w.o

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

Change 462493 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert test.wikidata.org

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

Change 462494 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikidata.org

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

Change 462495 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki::web::prod_sites: convert wikipedia.org

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

This is now fully done in both deployment-prep (beta) and production.

Change 439894 abandoned by Giuseppe Lavagetto:
mediawiki::web::beta_sites: convert wikibooks to vhost

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

Mentioned in SAL (#wikimedia-operations) [2020-03-30T11:42:12Z] <mutante> miscweb2002 - race condition with apache2 mpm and php7.3 module met - a2dismond mpm_event ; systemctl restart apache2 ; puppet agent -tv (also see T196968, https://gerrit.wikimedia.org/r/c/operations/puppet/+/451206) T247887

Mentioned in SAL (#wikimedia-operations) [2020-06-02T11:08:41Z] <mutante> contint1001 - common issue after reinstalls again - a2dismod mpm_event ; systemctl restart apache2 ; puppet agent -tv ( T196968) https://gerrit.wikimedia.org/r/c/operations/puppet/+/451206

Change 451206 abandoned by Dzahn:
[operations/puppet@production] httpd: fix mpm_event module conflict with mpm_prefork

Reason:
giving up due to lack of reviews and upload in 2018

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

Change 451206 restored by Dzahn:
[operations/puppet@production] httpd: fix mpm_event module conflict with mpm_prefork

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

Change 451206 abandoned by Dzahn:

[operations/puppet@production] httpd: fix mpm_event module conflict with mpm_prefork

Reason:

per comments above, roles need to declare apache::mpm directly

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

Mentioned in SAL (#wikimedia-operations) [2023-03-20T17:59:29Z] <mutante> when applying apache role for the first time on new hosts we still have the same old conflict: miscweb1003 - manual "a2dismod mpm_event" to be able to let puppet enable mod PHP (T196968)