Support wsgi in koji-hub and koji-web

- mod_python still supported, but deprecated
 - mod_wsgi is the default
 - koji-web now configured via web.conf
 - new wsgi-friendly publisher for koji-web
 - koji-web now has logging
This commit is contained in:
Mike McLean 2012-05-10 17:19:22 -04:00
parent 0a57b22886
commit 54c0ed8438
16 changed files with 1392 additions and 625 deletions

View file

@ -16,3 +16,4 @@ install:
install -p -m 644 kojiweb.conf $(DESTDIR)/etc/httpd/conf.d/kojiweb.conf
mkdir -p $(DESTDIR)/etc/kojiweb
install -p -m 644 web.conf $(DESTDIR)/etc/kojiweb/web.conf

View file

@ -1,33 +1,29 @@
Alias /koji "/usr/share/koji-web/scripts/"
#We use wsgi by default
Alias /koji "/usr/share/koji-web/scripts/wsgi_publisher.py"
#(configuration goes in /etc/kojiweb/web.conf)
<Directory "/usr/share/koji-web/scripts/">
# Config for the publisher handler
SetHandler mod_python
# Use kojiweb's publisher (which handles errors more gracefully)
# You can also use mod_python.publisher, but you will lose the pretty tracebacks
PythonHandler kojiweb.publisher
# General settings
PythonDebug On
PythonOption SiteName Koji
PythonOption KojiHubURL http://hub.example.com/kojihub
PythonOption KojiFilesURL http://server.example.com/mnt/koji
#PythonOption KojiTheme mytheme
PythonOption WebPrincipal koji/web@EXAMPLE.COM
PythonOption WebKeytab /etc/httpd.keytab
PythonOption WebCCache /var/tmp/kojiweb.ccache
PythonOption KrbService host
PythonOption WebCert /etc/kojiweb/kojiweb.crt
PythonOption ClientCA /etc/kojiweb/clientca.crt
PythonOption KojiHubCA /etc/kojiweb/kojihubca.crt
PythonOption LoginTimeout 72
# This must be changed before deployment
PythonOption Secret CHANGE_ME
PythonPath "sys.path + ['/usr/share/koji-web/lib']"
PythonCleanupHandler kojiweb.handlers::cleanup
PythonAutoReload Off
Options ExecCGI
SetHandler wsgi-script
Order allow,deny
Allow from all
</Directory>
# Support for mod_python is DEPRECATED. If you still need mod_python support,
# then use the following directory settings instead:
#
# <Directory "/usr/share/koji-web/scripts/">
# # Config for the publisher handler
# SetHandler mod_python
# # Use kojiweb's publisher (provides wsgi compat layer)
# # mod_python's publisher is no longer supported
# PythonHandler wsgi_publisher
# PythonAutoReload Off
# # Configuration via PythonOptions is DEPRECATED. Use /etc/kojiweb/web.conf
# Order allow,deny
# Allow from all
# </Directory>
# uncomment this to enable authentication via Kerberos
# <Location /koji/login>
# AuthType Kerberos

24
www/conf/web.conf Normal file
View file

@ -0,0 +1,24 @@
[web]
SiteName = koji
#KojiTheme = mytheme
# Key urls
KojiHubURL = http://hub.example.com/kojihub
KojiFilesURL = http://server.example.com/kojifiles
# Kerberos authentication options
# WebPrincipal = koji/web@EXAMPLE.COM
# WebKeytab = /etc/httpd.keytab
# WebCCache = /var/tmp/kojiweb.ccache
# SSL authentication options
# WebCert = /etc/kojiweb/kojiweb.crt
# ClientCA = /etc/kojiweb/clientca.crt
# KojiHubCA = /etc/kojiweb/kojihubca.crt
LoginTimeout = 72
# This must be changed and uncommented before deployment
# Secret = CHANGE_ME
LibPath = /usr/share/koji-web/lib