stable

Clone or download

Read-only

Scaffold mediawiki_standalone deployment in a dev environment

This contribution creates the necessary files so that the MediaWiki instance can start processing requests in a dev env. It is a starter template so we can start iterating on it to properly deploy the configuration files with the Tuleap setup scripts and start the services with the appropriate launcher since we do not have SystemD everywhere. This is close to what was documented but this contribution separates the code (`/usr/share/mediawiki-tuleap-flavor`), from the data (`/var/lib/tuleap/mediawiki_standalone/`) and the configurations (`/etc/tuleap/plugins/mediawiki_standalone/`). In the current situation we need two distincts setting files for MediaWiki (`LocalSettings.php` and `LocalSettings.local.php`). It might be a better idea to keep only one file containing all the "dynamic" values specific to the current Tuleap/MW instance and hardcode the rest since we do not expect it to be modified. Since the requirements for MediaWiki and Tuleap might be different we use a distinct PHP-FPM service. To get a MediaWiki instance that try to do an OAuth2 flow, you need to do the following: Things that are usually done by the build process or the packaging: nix-build tuleap-mediawiki.nix # From your host # Copy the resulting file inside your container rpm -Uvh --nodeps /tmp/mediawiki-tuleap-flavor-13.8.99.42-1.1.35.6.noarch.rpm yum install php74-php-xml php74-php-intl php74-php-json php74-php-ldap php74-php-mbstring php74-php-mysqlnd php74-php-process php74-php-pdo php74-php-opcache php74-php-fpm php74-php-cli php74-php-sodium cp /usr/share/tuleap/plugins/mediawiki_standalone/etc/systemd/mediawiki-tuleap-php-fpm.service /usr/lib/systemd/system/ systemctl daemon-reload systemctl start mediawiki-tuleap-php-fpm mkdir -p /var/lib/tuleap/mediawiki_standalone/projects mkdir -p /var/lib/tuleap/mediawiki_standalone/images mkdir -p /var/lib/tuleap/mediawiki_standalone/cache chmod 750 /var/lib/tuleap/mediawiki_standalone/* chown codendiadm:codendiam /var/lib/tuleap/mediawiki_standalone/* Things that will done by the setup scripts: chown codendiadm:codendiam /var/lib/tuleap/mediawiki_standalone/* /opt/remi/php74/root/usr/bin/php /usr/share/mediawiki-tuleap-flavor/maintenance/install.php --confpath /etc/tuleap/plugins/mediawiki_standalone/ --dbserver <dbserver> --dbname=<dbname> --dbuser=<dbuser> --dbpass=<dbpass> --pass=<adminpass> TuleapFarmManagement <adminname> # Executed as codendiadm # Create a /etc/tuleap/plugins/mediawiki_standalone/LocalSettings.local.php with the content given below /opt/remi/php74/root/usr/bin/php /usr/share/mediawiki-tuleap-flavor/maintenance/update.php --quick # Executed as codendiadm Expected template for /etc/tuleap/plugins/mediawiki_standalone/LocalSettings.local.php ```php <?php // TODO: properly set instances, images and cache dir $GLOBALS['wgTuleapPreSharedKey'] = 'mytoken'; $GLOBALS['wgTuleapUrl'] = 'https://tuleap-web.tuleap-aio-dev.docker'; $GLOBALS['wgServer'] = $GLOBALS['wgTuleapUrl']; $GLOBALS['wgTuleapOAuth2Config'] = [ 'clientId' => 'tlp-client-id-1', 'clientSecret' => 'tlp-oauth2-...', ]; $GLOBALS['wgPhpCli'] = '/opt/remi/php74/root/usr/bin/php'; // TODO: dev only $GLOBALS['wgDebugDumpSql'] = true; $GLOBALS['wgDebugToolbar'] = true; $GLOBALS['wgShowDebug'] = true; $GLOBALS['wgShowExceptionDetails'] = true; // TODO: log management ``` Part of story #26042: install mediawiki standalone Change-Id: I47dd292cb8976242dec9322632c299445a9b3248

Modified Files

Name
M plugins/mediawiki_standalone/additional-packages/mediawiki-tuleap-flavor.spec +4 −0 Go to diff View file
M plugins/mediawiki_standalone/additional-packages/tuleap-mediawiki.nix +0 −1 Go to diff View file
A plugins/mediawiki_standalone/etc/nginx/mediawiki_standalone.conf +41 −0 Go to diff View file
A plugins/mediawiki_standalone/etc/php-fpm/mediawiki-tuleap.conf +23 −0 Go to diff View file
A plugins/mediawiki_standalone/etc/systemd/mediawiki-tuleap-php-fpm.service +16 −0 Go to diff View file
M tools/rpm/tuleap.rhel7.spec +11 −0 Go to diff View file