On Sat, Jan 26, 2013 at 7:09 AM, Addy Yeow <ayeo...@gmail.com> wrote:
> I was looking for a consistent and error-free deployment as I switch
> between servers frequently despite using the same public domain. rsync
> was great but I had to manually reload server thereafter or issue a
> syncdb, etc.
>
> I have since moved to Fabric for my deployment needs. See
> http://docs.fabfile.org/en/1.5/tutorial.html.
> With Fabric, I only need to issue one command for daily deployment to
> existing or new server, e.g. fab deploy, under my Django project
> directory to deploy the project.
>

Just to second this - there are several articles on the interwebs
about using fabric, virtualenv and pip for managing your dependencies
and deployments. I have found this to be an incredibly smooth way to
manage things. The only sometimes nasty thing about moving stuff from
one server to another is installing all the dependencies you need for
your django project to run - 3rd party apps, python packages you need,
etc. One situation that can occur frequently is that if you install a
dependency on the new server, it gets a later version of the package,
and this breaks something on your code which depends on some behaviour
of an older version. To tackle this, I've found 'pip freeze' to be
great - you type 'pip freeze' in the virtualenv of your working
project code, and it lists all the python packages the project is
using with their exact versions, so you can use this to create a
requirements.txt file to 'pip install -r requirements.txt' from on the
new server while making sure it gets the very exact version of
dependencies so you can be sure it is running the same code -- in
general, I have found this to be the smoothest way to deploy projects
onto new servers.

hth,
Sanjay

-- 
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.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to