Page MenuHomePhabricator

Puppetize the installation of PHP-FPM on the MediaWiki hosts
Closed, ResolvedPublic

Description

We want to install php-fpm on the mediawiki hosts alongside HHVM.

To that end, we need to puppetize

  • the installation of php-fpm and all related packages
  • the configuration of php.ini variables to be consumed by php-fpm
  • the configuration of php-fpm for the main pool (I don't think we need more than one, but that might change in the future)

After this is done, we will also need to re-configure apache to allow sending requests to php-fpm if the user's request contains a specific header or cookie.

As far as the puppetization is concerned, I plan doing the following:

  • For php in general, check the existing off-the-shelf modules, and try to use one of those in a profile::mediawiki::php we should extract from the mediawiki modules themselves
  • For php-fpm specifically, check the existing off-the-shelf modules, and use one of those if possible. Add the configuration of the pools to another specific profile.

I'll report my findings here on the ticket.

Event Timeline

Joe created this task.Aug 3 2018, 8:31 AM
Joe triaged this task as Normal priority.
Joe claimed this task.Aug 3 2018, 9:54 AM
Joe added a project: User-Joe.
Joe moved this task from Backlog to Doing on the User-Joe board.
Joe added a comment.Aug 3 2018, 10:06 AM

Looking at the modules tagged php on puppetforge:

  • thias/php seems well organized in terms of resources, but as the author states it's red-hat centric. I also don't like its strict approach to creating ini files
  • voxpopuli/php is well written (as usual for most voxpopuli modules), but is very fat and full of features we don't need; plus, it uses a "single class declaration" approach I don't like in modules, and seems to be intertwined with the other voxpopuli modules a bit too much, to the point of being hard to deploy by itself.
  • slashbunny/phpfpm seems like a well written php-fpm module, but it's GPLv3, making it challenging to use given our plans to use apache2 as a license for our own puppet repository.

I think I will create a reasonably simple puppet module for php in our repo, using those modules as a reference in terms of features to implement.

Change 452664 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] [WIP] PHP: create module for modern Debian-based distributions

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

Change 453093 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki: move php to a profile, use the php class

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

Change 454478 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] php: add service management for php-fpm

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

Change 452664 merged by Giuseppe Lavagetto:
[operations/puppet@production] PHP: create module for modern Debian-based distributions

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

Change 455154 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] profile::mediawiki::php: add support for php-fpm

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

Change 453093 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: move php to a profile, use the php class

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

Change 454478 merged by Giuseppe Lavagetto:
[operations/puppet@production] php: add service management for php-fpm

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

Change 464111 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] profile::mediawiki::php: add apcu-bc for backwards compatibility

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

Change 455154 merged by Giuseppe Lavagetto:
[operations/puppet@production] profile::mediawiki::php: add support for php-fpm

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

Change 464111 abandoned by Giuseppe Lavagetto:
profile::mediawiki::php: add apcu-bc for backwards compatibility

Reason:
as stated, not needed and potentially harmful

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

Anomie removed a subscriber: Anomie.Oct 15 2018, 4:01 PM

Change 467570 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/puppet@production] mediawiki: install and start php-fpm on the mwdebug* servers

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

FO-nTTaX removed a subscriber: FO-nTTaX.Oct 16 2018, 7:55 AM
Joe closed this task as Resolved.Nov 2 2018, 10:05 AM

Change 467570 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: install and start php-fpm on the mwdebug* servers

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

Change 478575 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/mediawiki-config@master] errorpages: Remove unused php-fatal-error.html file

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

Change 478575 merged by jenkins-bot:
[operations/mediawiki-config@master] errorpages: Remove unused php-fatal-error.html file

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