moinwiki / moin-1.9

MoinMoin Wiki (1.9, also: 1.5a ... 1.8), stable, for production wikis
https://moinmo.in/
Other
140 stars 51 forks source link

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

Open robertosussex opened 3 years ago

robertosussex commented 3 years ago

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 commented 3 years ago

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

ThomasWaldmann commented 3 years ago

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?

robertosussex commented 3 years ago

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 "/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"

========

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

Cheers

Roberto

robertosussex commented 3 years ago

<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"

ThomasWaldmann commented 3 years ago

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

robertosussex commented 3 years ago

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

robertosussex commented 3 years ago

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 commented 3 years ago

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

wombelix commented 2 years ago

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

ThomasWaldmann commented 2 years ago

@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?

wombelix commented 2 years ago

@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.

ThomasWaldmann commented 2 years ago

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

wombelix commented 11 months ago

@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.