Page MenuHomePhabricator

Deploy a Framadate instance in the server wmi-fabula
Closed, ResolvedPublic

Description

With a view to providing additional services potentially useful for the itwiki community and the Wikimedia Italia members, @Maupao70 proposed to deploy a (Q98731919) Framadate instance.

This Task is about deploying a Framadate instance in the Wikimedia Italia server called wmi-fabula. We choosed it because now it supports recent PHP versions (T270776).

Anyway we can experience the adoption and usefulness of the tool to decide whether to keep it or not. In any case it should have a simple long-term maintenance.

DNS

First of all it would be nice to deploy a DNS record for this instance pointing to the current public IPv4 of wmi-fabula that is 54.38.36.173 (Wikimedia Italia server details):

framadate.wikimedia.it:
54.38.36.173

This was formally requested by @Maupao70 to the member and volunteer who takes care of DNS management: @M7 (thank you! <3).

Deployment

Deployed following the official reference:

https://framagit.org/framasoft/framadate/framadate/-/wikis/Install/Install

$ mkdir /var/www/framadate
$ cd    /var/www/framadate

$ wget https://framagit.org/framasoft/framadate/framadate/-/archive/1.1.12/framadate-1.1.12.tar.gz

$ sha1sum framadate-1.1.12.tar.gz 
a1e98562bb8aee6fae382287f358b4eee425ee95  framadate-1.1.12.tar.gz

$ sha256sum framadate-1.1.12.tar.gz 
6f444c6b5d7253135aa787e8072252a9732b1913b880e46ab5efefeae98e9277  framadate-1.1.12.tar.gz

$ tar -xzf framadate-1.1.12.tar.gz
$ rm       framadate-1.1.12.tar.gz

$ chown  -R apache: framadate-1.1.12

$ ln -s             framadate-1.1.12  production

$ cd production

# this was actually run locally (Centos 7 does not have a recent Composer)
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 69 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-php72 (v1.20.0): Downloading (100%)         
  - Installing symfony/polyfill-intl-normalizer (v1.20.0): Downloading (100%)         
  - Installing symfony/polyfill-intl-idn (v1.20.0): Downloading (100%)         
  - Installing doctrine/lexer (1.2.1): Downloading (100%)         
  - Installing egulias/email-validator (2.1.24): Downloading (100%)         
  - Installing erusev/parsedown (1.7.4): Downloading (100%)         
  - Installing ircmaxell/password-compat (dev-master dfdbc46): Cloning dfdbc467fb from cache
  - Installing o80/i18n (dev-develop ef98bd7): Cloning ef98bd7bd7 from cache
  - Installing phpmailer/phpmailer (v6.2.0): Downloading (100%)         
  - Installing roave/security-advisories (dev-master d596191)
  - Installing smarty/smarty (v3.1.36): Downloading (100%)         
  - Installing psr/container (1.0.0): Downloading (100%)         
  - Installing symfony/service-contracts (v2.2.0): Downloading (100%)         
  - Installing symfony/stopwatch (v5.2.0): Downloading (100%)         
  - Installing symfony/polyfill-php80 (v1.20.0): Downloading (100%)         
  - Installing symfony/process (v5.2.0): Downloading (100%)         
  - Installing symfony/polyfill-php70 (v1.20.0)
  - Installing symfony/polyfill-php73 (v1.20.0): Downloading (100%)         
  - Installing symfony/deprecation-contracts (v2.2.0): Downloading (100%)         
  - Installing symfony/options-resolver (v5.2.0): Downloading (100%)         
  - Installing symfony/finder (v5.2.0): Downloading (100%)         
  - Installing symfony/polyfill-ctype (v1.20.0): Downloading (100%)         
  - Installing symfony/filesystem (v5.2.0): Downloading (100%)         
  - Installing psr/event-dispatcher (1.0.0): Downloading (100%)         
  - Installing symfony/event-dispatcher-contracts (v2.2.0): Downloading (100%)         
  - Installing symfony/event-dispatcher (v5.2.0): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.20.0): Downloading (100%)         
  - Installing symfony/polyfill-intl-grapheme (v1.20.0): Downloading (100%)         
  - Installing symfony/string (v5.2.0): Downloading (100%)         
  - Installing symfony/console (v5.2.0): Downloading (100%)         
  - Installing php-cs-fixer/diff (v1.3.1): Downloading (100%)         
  - Installing doctrine/annotations (1.11.1): Downloading (100%)         
  - Installing psr/log (1.1.3): Downloading (100%)         
  - Installing composer/xdebug-handler (1.4.5): Downloading (100%)         
  - Installing composer/semver (3.2.4): Downloading (100%)         
  - Installing friendsofphp/php-cs-fixer (v2.17.1): Downloading (100%)         
  - Installing webmozart/assert (1.9.1): Downloading (100%)         
  - Installing phpdocumentor/reflection-common (2.2.0): Downloading (100%)         
  - Installing phpdocumentor/type-resolver (1.4.0): Downloading (100%)         
  - Installing phpdocumentor/reflection-docblock (5.2.2): Downloading (100%)         
  - Installing sebastian/version (3.0.2): Downloading (100%)         
  - Installing sebastian/type (2.3.1): Downloading (100%)         
  - Installing sebastian/resource-operations (3.0.3): Downloading (100%)         
  - Installing sebastian/recursion-context (4.0.4): Downloading (100%)         
  - Installing sebastian/object-reflector (2.0.4): Downloading (100%)         
  - Installing sebastian/object-enumerator (4.0.4): Downloading (100%)         
  - Installing sebastian/global-state (5.0.2): Downloading (100%)         
  - Installing sebastian/exporter (4.0.3): Downloading (100%)         
  - Installing sebastian/environment (5.1.3): Downloading (100%)         
  - Installing sebastian/diff (4.0.4): Downloading (100%)         
  - Installing sebastian/comparator (4.0.6): Downloading (100%)         
  - Installing sebastian/code-unit (1.0.8): Downloading (100%)         
  - Installing sebastian/cli-parser (1.0.1): Downloading (100%)         
  - Installing phpunit/php-timer (5.0.3): Downloading (100%)         
  - Installing phpunit/php-text-template (2.0.4): Downloading (100%)         
  - Installing phpunit/php-invoker (3.1.1): Downloading (100%)         
  - Installing phpunit/php-file-iterator (3.0.5): Downloading (100%)         
  - Installing theseer/tokenizer (1.2.0): Downloading (100%)         
  - Installing nikic/php-parser (v4.10.3): Downloading (100%)         
  - Installing sebastian/lines-of-code (1.0.3): Downloading (100%)         
  - Installing sebastian/complexity (2.0.2): Downloading (100%)         
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Downloading (100%)         
  - Installing phpunit/php-code-coverage (9.2.5): Downloading (100%)         
  - Installing doctrine/instantiator (1.4.0): Downloading (100%)         
  - Installing phpspec/prophecy (1.12.1): Downloading (100%)         
  - Installing phar-io/version (3.0.3): Downloading (100%)         
  - Installing phar-io/manifest (2.0.1): Downloading (100%)         
  - Installing myclabs/deep-copy (1.10.2): Downloading (100%)         
  - Installing phpunit/phpunit (9.5.0): Downloading (100%)         
symfony/polyfill-intl-normalizer suggests installing ext-intl (For best performance)
symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
phpmailer/phpmailer suggests installing hayageek/oauth2-yahoo (Needed for Yahoo XOAUTH2 authentication)
phpmailer/phpmailer suggests installing league/oauth2-google (Needed for Google XOAUTH2 authentication)
phpmailer/phpmailer suggests installing stevenmaguire/oauth2-microsoft (Needed for Microsoft XOAUTH2 authentication)
symfony/service-contracts suggests installing symfony/service-implementation
symfony/event-dispatcher suggests installing symfony/dependency-injection
symfony/event-dispatcher suggests installing symfony/http-kernel
symfony/polyfill-intl-grapheme suggests installing ext-intl (For best performance)
symfony/console suggests installing symfony/lock
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-pcov (*)
phpunit/php-code-coverage suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing ext-soap (*)
phpunit/phpunit suggests installing ext-xdebug (*)
Generating autoload files
52 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ sudo -u apache touch admin/stdout.log
$ chmod 600            admin/stdout.log

# publish the configurations
$ ln -s /etc/wmit-infrastructure/servers/fabula/projects/framadate/apache2/it-wikimedia-framadate.conf     /etc/httpd/sites-available
$ ln -s /etc/wmit-infrastructure/servers/fabula/projects/framadate/apache2/it-wikimedia-framadate-ssl.conf /etc/httpd/sites-available

# enable the plain text website
$ ln -s ../sites-available/it-wikimedia-framadate.conf /etc/httpd/sites-enabled

$ apachectl configtest
Syntax OK
$ apachectl graceful

$ certbot certonly --webroot --webroot-path=/var/www/framadate/production -d framadate.wikimedia.it
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for framadate.wikimedia.it
Using the webroot path /var/www/framadate/production for all unmatched domains.
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/framadate.wikimedia.it/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/framadate.wikimedia.it/privkey.pem
   Your cert will expire on 2021-04-20. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le


# enable the SSL website
$ ln -s ../sites-available/it-wikimedia-framadate-ssl.conf /etc/httpd/sites-enabled

$ apachectl configtest
Syntax OK

$ apachectl graceful

The Apache configuration is published in rWIIN wikimedia-it-wmit-infrastructure and connected to this Task.

Written some notes here:

https://wiki.wikimedia.it/wiki/Framadate

https://wiki.wikimedia.it/wiki/Framadate/Technical_documentation

Revisions and Commits

Event Timeline

valerio.bozzolan triaged this task as Medium priority.
valerio.bozzolan created this task.

Note: I noticed that the upstream release 1.1.12 was completely borked. The vendor directory is not present and moreover I noticed that the upstream .zip URL does not work so it's absolutely an upstream issue.

I downloaded the 1.1.11 and everything was OK but:

Fatal error: Class 'Locale' not found in /var/www/framadate/framadate-1.1.11/vendor/o80/i18n/src/o80/i18n/JsonProvider.php on line 87

Installed the missing dependency:

$ yum install rh-php73-php-intl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * centos-sclo-rh: mirrors.standaloneinstaller.com
 * centos-sclo-sclo: mirrors.standaloneinstaller.com
 * epel: mirror.init7.net
Resolving Dependencies
--> Running transaction check
---> Package rh-php73-php-intl.x86_64 0:7.3.20-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================
 Package                      Arch              Version                 Repository                 Size
========================================================================================================
Installing:
 rh-php73-php-intl            x86_64            7.3.20-1.el7            centos-sclo-rh            164 k

Transaction Summary
========================================================================================================
Install  1 Package

Total download size: 164 k
Installed size: 461 k
Is this ok [y/d/N]:
$ y
Downloading packages:
rh-php73-php-intl-7.3.20-1.el7.x86_64.rpm                                        | 164 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : rh-php73-php-intl-7.3.20-1.el7.x86_64                                                1/1 
  Verifying  : rh-php73-php-intl-7.3.20-1.el7.x86_64                                                1/1 

Installed:
  rh-php73-php-intl.x86_64 0:7.3.20-1.el7                                                               

Complete!

$ systemctl restart rh-php73-php-fpm

Now the installation is fine.

Created MySQL user framadate@localhost.

image.png (942×1 px, 124 KB)

That's good.

Now we should configure SMTP.