mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-25 15:45:51 +03:00
[GH-ISSUE #39] Gunicorn/virtualenv compatibility issues #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jlillis on GitHub (Mar 12, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/39
I am attempting to deploy webvirtmgr using gunicorn within a virtualenv. So far, I have managed to get the interface up and running by making some changes to the wsgi config files, but am stuck with a libvirt import error when trying to view a connection's details.
The issue seems to be that I can't get the libvirt python module visible in the virtualenv. I'm not sure how to fix that (this isn't necessarily a webvirtmgr issue).
The current wsgi setup dosen't really play nice with gunicorn - I have got it to work by writing my own wsgi.py file and placing it in the top directory, however I'm not sure if it works with apache as well yet (I haven't tested it). Once I am able to confirm it does, I will commit for review. I would probably add a requirements.txt file for easy deployment, but I would need to be a little more familiar with the project's internals beforehand.
Any help would be appreciated, this project looks pretty cool and I would love to make use of / contribute to it.
@retspen commented on GitHub (Mar 12, 2013):
Add support gunicorn
@retspen commented on GitHub (Mar 12, 2013):
After activate virtualenv need add python path when installed libvirt module:
export PYTHONPATH=/usr/lib/python2.7/path to site-packages/@jlillis commented on GitHub (Mar 13, 2013):
To fix the libvirt module error, I re-created the virtualenv using the --system-site-packages flag.
Also, the wsgi setup didn't actually work all that well, but I have changed it in my fork to work easily with gunicorn/django. I still haven't tested it with apache yet, however.
@retspen commented on GitHub (Mar 13, 2013):
Virtualenv for apache - wsgi/django.wsgi
@jlillis commented on GitHub (Mar 13, 2013):
I guess my setup is pretty different from what your wsgi.py assumes - I put all the webvirtmgr stuff in /opt/webvirtmgr and run the gunicorn server from there, but using nginx as a proxy to serve static content (pretty much like http://mirobetm.blogspot.com/2012/03/ive-been-lighttpd-fastcgi-django-user.html). I changed a lot of stuff related to python paths in the settings files as well, so it's more flexible (I'm running this with Django 1.4, perhaps webvirtmgr assumes 1.3?).
@retspen commented on GitHub (Mar 13, 2013):
Yes this is Django-1.3
@retspen commented on GitHub (Mar 13, 2013):
Project http://www.webvirtmgr.net - work in Django-1.3, ngix, gunicorn, runit. That's all work fine!
@jlillis commented on GitHub (Mar 13, 2013):
I see. It also seems to work fine in 1.4 with some small path/import changes. I guess I'll continue with 1.4/5 compatibility changes in my fork for now then.
@retspen commented on GitHub (Mar 13, 2013):
No promblem update WebVirtMgr to 1.4/1.5, but many linux distro not have 1.4/1.5 in repositories (LTS and CentOS).
@jlillis commented on GitHub (Mar 13, 2013):
From what I can tell, most people are using virtualenvs to deploy django
apps. Which means that it's available via pip.
On Mar 13, 2013 8:21 AM, "Anatoliy Guskov" notifications@github.com wrote:
@retspen commented on GitHub (Mar 13, 2013):
That's what you think. I read mail support@webvirtmgr.net and there written by those who do not know how to use virtualenv and pip. And for those who use pip and virtualenv not write letters of support.
@jlillis commented on GitHub (Mar 13, 2013):
Ah. Perhaps it would be best to have a 1.3 branch for compatibility and have the master be 1.5?
@retspen commented on GitHub (Mar 13, 2013):
Support multiple branches will be very difficult. I did not have time to do it.
@jlillis commented on GitHub (Mar 13, 2013):
I could help out with the 1.4/5 branch a bit, if needed
On Mar 13, 2013 9:04 AM, "Anatoliy Guskov" notifications@github.com wrote:
@retspen commented on GitHub (Mar 13, 2013):
Ok. I create new branch for django-1.4/5. But it is necessary to solve many other issue.
@retspen commented on GitHub (Mar 13, 2013):
Close ths issue and create new "Update Django-1.4/5"