#7957 Document how to run allura with gunicorn/uwsgi/mod_wsgi

v1.3.2
closed
sf-4 (350)
General
Heith Seewald
2015-09-21
2015-08-10
No

There have been reported problems with uwsgi: http://lists.unbit.it/pipermail/uwsgi/2015-July/008104.html

We should make sure it works and document it. For mod_wsgi we can borrow & simplify from our forge-allura.apache.org setup.

Once done, it'll help with our [#7908] docker setup.

Related

Tickets: #7908

Discussion

  • Dave Brondsema

    Dave Brondsema - 2015-08-10
    • labels: sf-current --> sf-current, sf-4
     
  • Dave Brondsema

    Dave Brondsema - 2015-09-15
    uwsgi --ini-paste-logged development.ini --http 0.0.0.0:8080 -H /path/to/allura/venv
    uwsgi --http 0.0.0.0:8080 --wsgi-file allura.wsgi  # if we have a .wsgi file, which we probably should.
    
     
  • Dave Brondsema

    Dave Brondsema - 2015-09-15

    For gunicorn, you must be in the virtualenv.

    gunicorn --paste development.ini -b 0.0.0.0:8080
    

    Running it as a wsgi app would need a bit more work, since the wsgi app must be import-able not some arbitrary allura.wsgi file

    gunicorn allura.wsgi -b 0.0.0.0:50097
    
     
  • Dave Brondsema

    Dave Brondsema - 2015-09-15

    mod_wsgi-express has a paste option, regular apache+mod_wsgi requires a .wsgi file and a webserver config using WSGIScriptAlias etc.

    mod_wsgi-express start-server development.ini --application-type paste --user allura --group allura --port 8080  # user/group required, if running as root
    mod_wsgi-express start-server allura.wsgi --user allura --group allura --port 8080
    
     
  • Dave Brondsema

    Dave Brondsema - 2015-09-16

    waitress would require a wsgi callable

    waitress-serve --port 8080 myapp:wsgi
    

    Or it can run with paster, but kind of an inverse setup. Change use = egg:Paste#http in the .ini file to use = egg:waitress#main and then run "paster serve"

    It would be nice to provide a wsgi callable, so that all servers can interface with it and also we could hide the paste setup within that and be able to seamlessly swap it out some day. But for now it seems we don't really need it.

     
  • Dave Brondsema

    Dave Brondsema - 2015-09-16

    I think we should use gunicorn since it is simpler to configure than uwsgi (which has multiple installation options, and tons of plugins and config options). We can even recommend using gunicorn --reload for development instead of paster serve. mod_wsgi-express installation requires having apache dev libs installed

     
  • Dave Brondsema

    Dave Brondsema - 2015-09-17
    • status: open --> in-progress
     
  • Dave Brondsema

    Dave Brondsema - 2015-09-18

    db/7957

     
  • Dave Brondsema

    Dave Brondsema - 2015-09-18
    • status: in-progress --> review
    • assigned_to: Dave Brondsema
     
  • Heith Seewald - 2015-09-18
    • Reviewer: Heith Seewald
     
  • Heith Seewald - 2015-09-18
    • status: review --> closed
     
  • Heith Seewald - 2015-09-18

    Looks good

     
  • Dave Brondsema

    Dave Brondsema - 2015-09-21
    • labels: sf-current, sf-4 --> sf-4
     
  • Dave Brondsema

    Dave Brondsema - 2015-12-08
    • Milestone: unreleased --> v1.3.2
     

Log in to post a comment.