Hi Ferran,

Thanks a lot for your detailed explanation of your installations!!!,
especially for your invenio process management solution and your hint to
use apache2-mpm-itk. We'll test it in this way.

Best Regards
Cornelia

---
Cornelia Plott
Zentralbibliothek
Forschungszentrum Jülich
D-52425 Jülich
GERMANY

Tel: ++49-2461-616206
Email: [email protected]
Web: http://www.fz-juelich.de/zb


Am 29.07.2010 09:43, schrieb Ferran Jorba:
Hello Cornelia,


We would like to know, if it's possible to work with more than one
invenio-instances on the same server?

We installed a second invenio-instance with another prefix and defined
another database schema in the invenio-local.conf file. But if we
include the generated invenio-apache-vhost.conf file into the httpd.conf
file, we get a Problem with the WSGIDaemonProcess definition.

Could anyone say, if it's generally provided to do such installation?
and what's to be noticed?

we've set up two production Invenio servers here at UAB:
http://ddd.uab.cat/ and http://traces.uab.cat/.  I'll explain our setup,
hoping that it helps.

First of all, we are on 0.99.1, so we are still not using the
WSGIDaemonProcess.  However, we are *also* using a third, SCGI
application (http://drproject.org/) on the same host, using a third
Apache vhost instance, so my hints may help you anyway.  We are on
Debian stable (5.0), and using default Debian versions for almost
anything.

First of all, we have configured and installed the software in user
directories (/home/), not system wide.  For example, in
/home/ddd/download/invenio/cds-invenio-0.99.1/, the configuration option
was:

   $ ./configure --prefix=$HOME/invenio

The same with the second instance.  Databases are named as the instances
as well.  It mostly builds flawlessly except for intbitset cpython
compilation, that insists on living system-wide.  But I copied the
pieces from the system directory /usr/lib/python/whatever to the local
~/invenio/lib/python/invenio/etc.

I also set (following Django wsgi docs) my own $PYTHONPATH both for
command line and apache:

1. In my ~/.profile (export PYTHONPATH=$HOME/lib/python)
2. In my invenio-apache-vhost.conf, VirtualHost section
    (PythonPath "['/home/ddd/lib/python'] + sys.path")

The problem here is that some Invenio processess like Websubmit call
bibconvert using os.system, thus not inheriting my $PYTHONPATH.  I found
it after several days of tracing those calls (Error: No module named
invenio.search_engine).  With our current Debian Python 2.5 there is no
way to set a local directory to be searched by default.  So the only
solution I found was to patch each invenio bin and lib python file with:

  import sys, os
  sys.path.append(os.path.expanduser('~/lib/python/'))

(Using a patch management tool like guilt or quilt it becomes
less than a burden, and the same patch can be tested on the test
machine and then propagated to the two production instances.  I
wholeheartly reccomend any of them, maybe I'd favour guilt now
(http://packages.debian.org/guilt).

Also, for Apache, we use apache2-mpm-itk
(http://packages.debian.org/apache2-mpm-itk), that is, an alternative
Apache build that starts it as root and, for each fork, it switches to
the appropiate user.  That helps us keep the files owned for each user,
so the file management is *greatly* simplified.

I attach our (almost) complete invenio-apache-vhost.conf.  Please note
that we are no using any https yet.

Feel free to ask further questions if interested.

Ferran

PS Tomorrow it's my last working day before vacation, so I may not be
    able to follow this thread except for some occassional catch-up.


---

AddDefaultCharset UTF-8
ServerSignature Off
ServerTokens Prod

<Files *.pyc>
    deny from all
</Files>
<Files *~>
    deny from all
</Files>
<VirtualHost *:80>
         ServerName ddd.uab.cat:80
         ServerAlias ddd.uab.es
         ServerAlias ddd
         ServerAdmin [email protected]
         DocumentRoot /home/ddd/invenio/var/www
         ScriptAlias /cgi-bin/ /home/ddd/www/cgi-bin/
         PythonPath "['/home/ddd/lib/python'] + sys.path"
         Options Indexes FollowSymLinks MultiViews
         IndexOptions FancyIndexing HTMLTable FoldersFirst VersionSort

         <Directory /home/ddd/invenio/var/www>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
         </Directory>
         ErrorLog /home/ddd/invenio/var/log/ddd.err
         LogLevel warn
         CustomLog /home/ddd/invenio/var/log/ddd.log combined
         DirectoryIndex index.en.html index.html
         <LocationMatch 
"^(/+$|/index|/collection|/record|/author|/search|/browse|/youraccount|/youralerts|/yourbaskets|/yourmessages|/yourgroups|/submit|/getfile|/comments|/error$
            SetHandler python-program
            PythonHandler invenio.webinterface_layout
            PythonDebug On
         </LocationMatch>
         <Directory /home/ddd/invenio/var/www>
            AddHandler python-program .py
            PythonHandler mod_python.publisher
            PythonDebug On
          </Directory>

          [...]

          <IfModule mpm_itk_module>
            AssignUserId ddd users
         </IfModule>

         ErrorDocument 403 /errmsg/403.html

</VirtualHost>
.



------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Reply via email to