moin-1.9 icon indicating copy to clipboard operation
moin-1.9 copied to clipboard

Attempt of using PyPy to install Moin on Centos 7+ Apache 2.4

Open robertosussex opened this issue 3 years ago • 13 comments

Hi guys,

I will try to build MoinMoin using PyPy rather than a standard Python2.7 and see how it goes... Will update Roberto

robertosussex avatar May 13 '21 16:05 robertosussex

First test passed :-)

  1. I was able to install pypy on centos 7
  2. I was able to install moin using pypy setyp.py instead of python setup.py
  3. Using the same configs it looks like the wiki is working fine. Any particular test I should attempt now?

Cheers Roberto

robertosussex avatar May 14 '21 11:05 robertosussex

Maybe do some performance comparisons (render big/complex page, RecentChanges, etc.) to CPython. Due to the JIT warming up, you maybe have to repeat multiple times with same moin process.

Do you have the moin process running long term?

Did you interface it to nginx or apache2? How?

ThomasWaldmann avatar May 14 '21 16:05 ThomasWaldmann

With regard to the third point, I interfaced with Apache 2.4 with a .conf like

==============

<VirtualHost *:443>

SetHandler server-status

ServerName phys-webvm.phys.sussex.ac.uk DocumentRoot "/srv/www/wikis"

<Directory "/srv/www/wikis"> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted </Directory>

<Directory "/srv/testmoin/share/moin/server"> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted </Directory>

ErrorLog "/var/log/httpd/moin.wiki.epp_error_ssl.log" ServerSignature Off CustomLog "/var/log/httpd/moin.wiki.epp_access_ssl.log" combined SSLEngine on SSLCACertificatePath "/etc/pki/tls/certs" SSLCertificateFile /etc/pki/tls/certs/astronomy_sussex_ac_uk.crt SSLCertificateKeyFile /etc/pki/tls/private/astronomy.sussex.ac.uk.key SSLCertificateChainFile /etc/pki/tls/certs/QuoVadisEVIntermediateCertificate.crt

WSGIDaemonProcess epp-wsgi display-name=epp-moin-wsgi group=apache processes=1 user=apache WSGIProcessGroup epp-wsgi #WSGIPassAuthorization On WSGIScriptAlias / "/srv/testmoin/share/moin/server/moin.wsgi" </VirtualHost>

========

"Do you have the moin process running long term?" Not sure I understad exactly what you mean! :-)

Cheers

Roberto

robertosussex avatar May 14 '21 17:05 robertosussex

<VirtualHost *:443> ServerName phys-webvm.phys.sussex.ac.uk DocumentRoot "/srv/www/wikis" <Directory "/srv/www/wikis"> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted <Directory "/srv/testmoin/share/moin/server"> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted ErrorLog "/var/log/httpd/moin.wiki.epp_error_ssl.log" ServerSignature Off CustomLog "/var/log/httpd/moin.wiki.epp_access_ssl.log" combined SSLEngine on SSLCACertificatePath "/etc/pki/tls/certs" SSLCertificateFile /etc/pki/tls/certs/astronomy_sussex_ac_uk.crt SSLCertificateKeyFile /etc/pki/tls/private/astronomy.sussex.ac.uk.key SSLCertificateChainFile /etc/pki/tls/certs/QuoVadisEVIntermediateCertificate.crt WSGIDaemonProcess epp-wsgi display-name=epp-moin-wsgi group=apache processes=1 user=apache WSGIProcessGroup epp-wsgi #WSGIPassAuthorization On WSGIScriptAlias / "/srv/testmoin/share/moin/server/moin.wsgi"

robertosussex avatar May 14 '21 17:05 robertosussex

Are you sure your mod-wsgi is using PyPy and not CPython? How?

ThomasWaldmann avatar May 15 '21 10:05 ThomasWaldmann

How would I go about testing that? I temporarily removed the system python binary and the moin website worked fine! Any advice? R.

robertosussex avatar May 15 '21 12:05 robertosussex

Looks like you are right! ldd mod_wsgi.so linux-vdso.so.1 => (0x00007ffc229a7000) libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007efeb5f92000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007efeb5d76000) libdl.so.2 => /lib64/libdl.so.2 (0x00007efeb5b72000) libutil.so.1 => /lib64/libutil.so.1 (0x00007efeb596f000) libm.so.6 => /lib64/libm.so.6 (0x00007efeb566d000) libc.so.6 => /lib64/libc.so.6 (0x00007efeb529f000) /lib64/ld-linux-x86-64.so.2 (0x00007efeb6588000)

robertosussex avatar May 15 '21 13:05 robertosussex

I guess now I am back to the drawing board! I will attempt to install mod_wsgi using pypy..... stay tuned!

robertosussex avatar May 15 '21 13:05 robertosussex

I guess now I am back to the drawing board! I will attempt to install mod_wsgi using pypy..... stay tuned!

In case you are interested in using a Container to run MoinMoin together with pypy, I recently published something I was working on.

moinmoin-pypy2-container, information about features and usage as well as the source code can be found on Codeberg, Gitlab and Github. Pre-build images are available on quay.io

wombelix avatar Oct 10 '21 06:10 wombelix

@wombelix that sounds like a quite useful approach that could be interesting for many moin-1.9 users.

Maybe we should link to that from a more prominent place, so users can find it more easily?

From moinmo.in wiki? From moin-1.9 github README?

ThomasWaldmann avatar Oct 10 '21 23:10 ThomasWaldmann

@wombelix that sounds like a quite useful approach that could be interesting for many moin-1.9 users.

Maybe we should link to that from a more prominent place, so users can find it more easily?

From moinmo.in wiki? From moin-1.9 github README?

Sure, if you think it could be useful, feel free to share and spread the word :) Would be more than happy to further support and even improve it, if required.

wombelix avatar Oct 11 '21 09:10 wombelix

OK, added it to next milestone as a reminder to link that from some prominent places. Thanks!

ThomasWaldmann avatar Oct 11 '21 17:10 ThomasWaldmann

@ThomasWaldmann FYI, moinmoin-pypy2-container was updated today to use the latest package versions (openSUSE Leap, PyPy2, UWSGI). I'm checking if there is anything I can do about https://github.com/wombelix/moinmoin-pypy2-container/issues/1 / https://github.com/moinwiki/moin-1.9/issues/92.

wombelix avatar Oct 09 '23 11:10 wombelix