Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
robertosussex opened this issue May 13, 2021 · 13 comments
Open

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

robertosussex opened this issue May 13, 2021 · 13 comments
Milestone

Comments

@robertosussex
Copy link

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
Copy link
Author

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
Copy link
Member

ThomasWaldmann commented May 14, 2021

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
Copy link
Author

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
Copy link
Author

<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
Copy link
Member

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

@robertosussex
Copy link
Author

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

@robertosussex
Copy link
Author

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
Copy link
Author

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

@wombelix
Copy link

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
Copy link
Member

@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
Copy link

@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
Copy link
Member

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

@wombelix
Copy link

wombelix commented Oct 9, 2023

@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 wombelix/moinmoin-pypy2-container#1 / #92.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants