Re: Virtualenv and Django in Production

2011-09-20 Thread Markus Gattol
 - it's just symlinks i.e. not more overhead
 - you won't clutter your system Python or vice versa when you up/downgrade 
something
 - easy to 
detect http://www.markus-gattol.name/ws/python.html#detect_a_virtualenv
 - if you want a production setup use e.g. gunicorn/nginx or even better 
uwsgi/mongrel2
 - as all the others here, I can strongly recommend using a virtualenv for 
production as well as for development

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/QZpISAJq0cEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Virtualenv and Django in Production

2011-09-20 Thread Tom Evans
On Tue, Sep 20, 2011 at 4:35 PM, dm03514  wrote:
> Virtualenv provides you with more control over your production
> environments.   We run apache/virtualenv on 10 of our production
> servers.
> There very well might be more overhead running through a virtualenv.
> For us it is too negligible to make a difference.
>
> We use fabric to deploy our django apps, and automatically initiate
> virtualenvs, or update virtualenvs on remote servers.  I think virtual
> env is great on production because it keeps all of our environments on
> the same page.  ie.  If we update a python package to a newer version,
> or roll it back to an older version.  All we have to do is make the
> appropriate changes in our code, change the package version entry in
> our bootstrap.py file and deploy through fabric, no manually managing
> packages on our production servers, nice and simple
>

There is no more overhead in virtualenv than there is in python
itself. To understand why, you should look at how and why virtualenv
works - you are using a different python interpreter, so that python
interpreter looks in a different place than the stock interpreter.

virtualenv is entirely free magic that makes your deployments more
consistent and repeatable. Use it!

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Virtualenv and Django in Production

2011-09-20 Thread dm03514
Virtualenv provides you with more control over your production
environments.   We run apache/virtualenv on 10 of our production
servers.
There very well might be more overhead running through a virtualenv.
For us it is too negligible to make a difference.

We use fabric to deploy our django apps, and automatically initiate
virtualenvs, or update virtualenvs on remote servers.  I think virtual
env is great on production because it keeps all of our environments on
the same page.  ie.  If we update a python package to a newer version,
or roll it back to an older version.  All we have to do is make the
appropriate changes in our code, change the package version entry in
our bootstrap.py file and deploy through fabric, no manually managing
packages on our production servers, nice and simple

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Virtualenv and Django in Production

2011-09-20 Thread DrBloodmoney
On Tue, Sep 20, 2011 at 1:55 AM, adrian s  wrote:
> Hi all, I've been using virtualenv as recommended in my development
> environments.
> I am now migrating a project which was not using virtualenv, to another
> server and now
> have the opportunity to use it in production.
> I've spent a while googling this subject and I'm not sure what the best
> practice is.
> Is it common to run a production django deployment with apache behind
> virtualenv? If so,
> could anyone steer me in the proper direction for getting this setup with
> the wsgi file...
> Or, is virtualenv best for just testing isolated environments, and running
> production
> with the existing global space (I feel naive typing this out, so I must be
> wrong (: )
>  as is (isn't there more overhead with virtualenv anyhow?)
> I hope I made sense.
> If anyone has any relevant docs that clarify this (maybe my searches stink)
> I'd love to read
> over what there is so I may make an appropriate call.
> Adrian

I run a VPS with several django apps isolated into different
virtualenvs. They are served by either uwsgi or gunicorn and reverse
proxied by nginx. There are several good guides if you google for some
of those keywords.

It is a pretty easy set-up. If you were only serving one django app,
it may be slight overkill, but it may be worth the effort to get it
set up this way so you can easily add more django applications and
have them be completely isolated from each other.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Virtualenv and Django in Production

2011-09-20 Thread Matt Schinckel
I use virtualenv in production. It means you can install python packages using 
pip without having root or sudo access on the server.

You can also isolate installs, and use no-site-packages.

I can't think of a reason not to use it.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/BNM2owzrojoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Virtualenv and Django in Production

2011-09-20 Thread Preston Holmes
How you use a virtualenv in production depends on all the parts of
your production stack.  If you are using mod_wsgi, search mod_wsgi +
virtualenv, gunicorn, etc

You might also consider one of the new "platform-as-a-service" hosting
options that basically solve this for you.

-P

On Sep 19, 10:55 pm, adrian s  wrote:
> Hi all, I've been using virtualenv as recommended in my development
> environments.
>
> I am now migrating a project which was not using virtualenv, to another
> server and now
> have the opportunity to use it in production.
>
> I've spent a while googling this subject and I'm not sure what the best
> practice is.
> Is it common to run a production django deployment with apache behind
> virtualenv? If so,
> could anyone steer me in the proper direction for getting this setup with
> the wsgi file...
>
> Or, is virtualenv best for just testing isolated environments, and running
> production
> with the existing global space (I feel naive typing this out, so I must be
> wrong (: )
>  as is (isn't there more overhead with virtualenv anyhow?)
>
> I hope I made sense.
>
> If anyone has any relevant docs that clarify this (maybe my searches stink)
> I'd love to read
> over what there is so I may make an appropriate call.
>
> Adrian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Virtualenv and Django in Production

2011-09-20 Thread adrian s
Hi all, I've been using virtualenv as recommended in my development
environments.

I am now migrating a project which was not using virtualenv, to another
server and now
have the opportunity to use it in production.

I've spent a while googling this subject and I'm not sure what the best
practice is.
Is it common to run a production django deployment with apache behind
virtualenv? If so,
could anyone steer me in the proper direction for getting this setup with
the wsgi file...

Or, is virtualenv best for just testing isolated environments, and running
production
with the existing global space (I feel naive typing this out, so I must be
wrong (: )
 as is (isn't there more overhead with virtualenv anyhow?)

I hope I made sense.

If anyone has any relevant docs that clarify this (maybe my searches stink)
I'd love to read
over what there is so I may make an appropriate call.

Adrian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.