Opened 15 years ago

Last modified 11 years ago

#40 closed task (FIXED)

Document how to run without dev environment

Reported by: Sebastian Spaeth Owned by: Sam Kleinman
Priority: minor Milestone: 0.1.0
Component: documentation Keywords:
Cc: Parent Tickets:

Description

The current docs show nicely how to set up a dev environment, however it is not clear how to set up the thing in a non-dev way (I guess that is the "deployment" docs, right?)

Here are some things to consider when writing this. I got it up and running in Ubuntu Maverick in a non-dev way. I had to install some things with "pip" and used the distribution packages whenever possible.

So stuff that needs documentation:

paster running on port 80 is not possible without having the whole thing running as root. Which will then require to also have celeryd running as root, as it needs to delete files that paster put there. I solved this in a very hackish way with "Capabilities" on Linux. Downside is, I had to grant /usr/bin/python the permission to access ports <1024. I achieved this with

sudo setcap 'cap_net_bind_service=+ep' /usr/bin/python2.6

(not saying we should recommend that to anyone. I guess we will propose to run this as a local user on a nonpriviledged port and proxy it through nginx or so.

Anyway, it runs beautiful as www-data on my server now.

Attachments (2)

index.py (1.3 KB ) - added by Sebastian Spaeth 15 years ago.
index.py
mediagoblin_nginx_conf (1.4 KB ) - added by Sebastian Spaeth 15 years ago.
mediagoblin_nginx_conf

Download all attachments as: .zip

Change History (8)

comment:1 by Will Kahn-Greene, 15 years ago

Owner: set to Will Kahn-Greene
Priority: LowNormal

You're right--this is what the deployment howto is for.

Deployment definitely won't use paster. Much like PyBlosxom, we're using Paste for hacking, but GNU MediaGoblin is a WSGI application and thus should be set up using a WSGI application runner like mod_wsgi or something like that. I don't think we should work on this right now, but we definitely have to work this out when we get closer to an alpha release.

So to summarize:

Sometime when we're closer to an alpha, we should work out ideal configurations for deployment and document them in the deployment howto.

I'm going to unassign myself.

by Sebastian Spaeth, 15 years ago

Attachment: index.py added

index.py

comment:2 by Sebastian Spaeth, 15 years ago

Some more random notes on how I got it to run with nginx & fcgi & flup rather than paster:

Assume mediagoblin checkout in /home/spaetz/src/mediagoblin Install python-flup. Put index.py into /var/www/mediagoblin/index.py

  1. Have mongodb started
  2. start celeryd: sudo -u www-data CELERY_CONFIG_MODULE=mediagoblin.celery_setup.from_celery celeryd
  3. Start mediagoblin as fcgi: "sudo -u www-data spawn-fcgi index.py -p 8000" (use -n for not backgrounding so you can ctrl-c it)
  4. Start nginx forwarding fcgi from port 8000: (will attache site config)

Works...

by Sebastian Spaeth, 15 years ago

Attachment: mediagoblin_nginx_conf added

mediagoblin_nginx_conf

comment:3 by Will Kahn-Greene, 15 years ago

Component: Documentation
Milestone: 0.1.0
Owner: set to Sam Kleinman

This waters down to "write documentation on how to deploy mediagoblin". That's something we should have in the manual for 0.1.0. Given that, I'm assigning to Sam and re-targeting.

Sam: You probably want to get help from Chris and whoever else Chris thinks would help out.

comment:4 by Christopher Allan Webber, 15 years ago

When we suggest how to do deployments, I'd actually like to do Virtualenv rather than buildout as we're doing it now.

(btw, the OpenHatch people have been changing to do that for both deployment and development.... might be a good idea for us to follow that lead...)

comment:5 by Christopher Allan Webber, 15 years ago

Status: NewClosed

Marking this as closed, as we basically got this happening in deployment documentation in the sphinx docs.

Future work on this should happen in #567

comment:6 by Will Kahn-Greene, 14 years ago

The original url for this bug was http://bugs.foocorp.net/issues/311 .
Relations:
#237: related

Note: See TracTickets for help on using tickets.