User:Wenzel/Bouncer:Tuxedo Deployment: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→Deployment hints for Bouncer's Tuxedo Branch: user auth) |
||
| Line 32: | Line 32: | ||
* (with DEBUG=True in your settings file, you should now be able to run <code>./manage.py runserver</code> and see a working web app. You should be able to log in.) | * (with DEBUG=True in your settings file, you should now be able to run <code>./manage.py runserver</code> and see a working web app. You should be able to log in.) | ||
* Deploy to a web server. The Zamboni docs have some [http://jbalogh.github.com/zamboni/topics/production/#setting-up-mod-wsgi hints about Apache+mod_wsgi]. | * Deploy to a web server. The Zamboni docs have some [http://jbalogh.github.com/zamboni/topics/production/#setting-up-mod-wsgi hints about Apache+mod_wsgi]. | ||
* The tuxedo API uses HTTP basic auth. Make sure to enable the [http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#User_Authentication mod_wsgi setting] that'll pass the HTTP auth credentials on to the application. | |||
* At the time of writing, these hints don't cover the <code>/media/</code> and <code>/admin-media/</code> dirs. Those are not to be served through mod_wsgi, but can be added to the same vhost with mod_alias. See the section about it in [http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-media-files Django docs]. | * At the time of writing, these hints don't cover the <code>/media/</code> and <code>/admin-media/</code> dirs. Those are not to be served through mod_wsgi, but can be added to the same vhost with mod_alias. See the section about it in [http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-media-files Django docs]. | ||
** map <code>/media/</code> to the <code>tuxedo/media</code> dir, and | ** map <code>/media/</code> to the <code>tuxedo/media</code> dir, and | ||
** <code>/admin-media/</code> to <code>.../the-tuxedo-virtualenv/lib/python2.6/site-packages/django/contrib/admin/media/</code> | ** <code>/admin-media/</code> to <code>.../the-tuxedo-virtualenv/lib/python2.6/site-packages/django/contrib/admin/media/</code> | ||
Revision as of 07:44, 24 February 2010
Deployment hints for Bouncer's Tuxedo Branch
- Check out the source code:
git clone git://github.com/fwenzel/tuxedo.git
- Deploying Tuxedo is very similar to what the Zamboni docs describe for AMO.
- Make a virtualenv, activate it, then
easy_install pip. pip install -r requirements.txtMySQL-pythoncan be installed via pip, or globally by installing the pyMySQLdb (?) rpm.
- Create a file
local_settings.pyin the tuxedo dir and put the settings into it that you want to change from settings.py, here's mine:
$ cat local_settings.py
DEBUG = False
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'mybouncerdb' # Or path to database file if using sqlite3.
DATABASE_USER = 'fred' # Not used with sqlite3.
DATABASE_PASSWORD = 'fred' # Not used with sqlite3.
DATABASE_HOST = 'server' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
DATABASE_OPTIONS = {
"init_command": "SET storage_engine=INNODB",
}
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
- When upgrading from an older version of Bouncer, start off with a copy of the old DB, then follow the steps "Upgrading an older version of Bouncer" in the README.
- (with DEBUG=True in your settings file, you should now be able to run
./manage.py runserverand see a working web app. You should be able to log in.)
- Deploy to a web server. The Zamboni docs have some hints about Apache+mod_wsgi.
- The tuxedo API uses HTTP basic auth. Make sure to enable the mod_wsgi setting that'll pass the HTTP auth credentials on to the application.
- At the time of writing, these hints don't cover the
/media/and/admin-media/dirs. Those are not to be served through mod_wsgi, but can be added to the same vhost with mod_alias. See the section about it in Django docs.- map
/media/to thetuxedo/mediadir, and /admin-media/to.../the-tuxedo-virtualenv/lib/python2.6/site-packages/django/contrib/admin/media/
- map