Enhancing our multiphp-setup #97

Manually merged
lpoujol merged 22 commits from lpoujol/better-multiphp into unstable 2020-04-17 16:42:11 +02:00
Owner

This is a work in progress

This pull request aim to simplify the multiphp setup for a packweb

  • Partial rewrite of lxc-php

    • Replace command module with lxc_container module
    • For PHP 7.3, assume it's a Debian Buster container, use debian's PHP
    • For container Stretch (php 7.0) & Buster (php 7.3) > Use opensmtpd
    • For container Jessie (php 5.6) > Use ssmtp (opensmtpd unavailable in jessie)
    • BREAKING Behaviour change of lxc-php : It only handles one container at a time. (You'll need to call it multiple times, with different values of lxc_php_version)
  • Enhancements of packweb-apache

    • New variable packweb_multiphp_versions to define the required PHP versions wanted
    • Responsible of the deploy directly phpContainer script (instead of evoadmin-web role)
    • phpContainer can call it self it is hasn't been called via sudo
    • php shim in /usr/local/bin, to run php scripts transparently into the right container
    • Adding /usr/local/bin into the crontab PATH (so the shim will work)
    • A PHP Info & OpCache for each PHP Container
    • Better monitoring for:
      • "system services" (ie: crond, opensmtpd..) in each container
      • PHP-FPM
  • Enhancements of webapps/evoadmin-web

    • BREAKING Set the correct available PHP versions in config with evoadmin_multiphp_versions (and remove evoadmin_multi_php)

In depth

lxc-php

This role don't work with lxc_containers variable. Instead it requires a new variable lxc_php_version that does represent the required PHP-FPM Version

It will then handle the container creation (by having the lxc role as a dependency), then do the PHP-FPM (+ few tools) installation and setup

The valid values are :

  • php56 (Will create a Debian Jessie container, called php56 with PHP 5.6 FPM)
  • php70 (Will create a Debian Stretch container, called php70 with PHP 7.0 FPM)
  • php73 (Will create a Debian Buster container, called php73 with PHP 7.3 FPM)

Also, all lxc-php containers now have the folling packages setup by default :

  • cron
  • logrotate
# This is a work in progress This pull request aim to simplify the multiphp setup for a packweb - [x] Partial rewrite of lxc-php - [x] Replace command module with lxc_container module - [x] For PHP 7.3, assume it's a Debian Buster container, use debian's PHP - [x] For container Stretch (php 7.0) & Buster (php 7.3) > Use opensmtpd - [x] For container Jessie (php 5.6) > Use ssmtp (opensmtpd unavailable in jessie) - [x] **BREAKING** Behaviour change of lxc-php : It only handles one container at a time. (You'll need to call it multiple times, with different values of lxc_php_version) - [ ] Enhancements of packweb-apache - [x] New variable `packweb_multiphp_versions` to define the required PHP versions wanted - [x] Responsible of the deploy directly phpContainer script (instead of evoadmin-web role) - [x] phpContainer can call it self it is hasn't been called via sudo - [ ] ~~php *shim* in /usr/local/bin, to run php scripts transparently into the right container~~ - [ ] ~~Adding /usr/local/bin into the crontab PATH (so the shim will work)~~ - [ ] ~~A PHP Info & OpCache for each PHP Container~~ - [ ] ~~Better monitoring for:~~ - [ ] ~~"system services" (ie: crond, opensmtpd..) in each container~~ - [ ] ~~PHP-FPM~~ - [ ] Enhancements of webapps/evoadmin-web - [x] **BREAKING** Set the correct available PHP versions in config with `evoadmin_multiphp_versions` (and remove `evoadmin_multi_php`) ## In depth ### lxc-php This role don't work with `lxc_containers` variable. Instead it requires a new variable `lxc_php_version` that does represent the required PHP-FPM Version It will then handle the container creation (by having the lxc role as a dependency), then do the PHP-FPM (+ few tools) installation and setup The valid values are : * php56 (Will create a Debian Jessie container, called php56 with PHP 5.6 FPM) * php70 (Will create a Debian Stretch container, called php70 with PHP 7.0 FPM) * php73 (Will create a Debian Buster container, called php73 with PHP 7.3 FPM) Also, all lxc-php containers now have the folling packages setup by default : * cron * logrotate
lpoujol changed title from WIP: Enhancing our multiphp-setup to Enhancing our multiphp-setup 2020-04-08 18:18:25 +02:00
lpoujol closed this pull request 2020-04-17 16:42:11 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/ansible-roles#97
No description provided.