The big change is that you use a standard fabfile.py
and put your settings in
project_settings.py
and your custom fabric functions in localfab.py
(analagous
to localtasks.py)
You shouldn't have to alter your localtasks.py
Some functionality has been added to ensure a smooth upgrade process when moving to Django 1.8. If you are using Django 1.8 it will use --fake-initial when running the migrations and the first migration in apps where the tables exist will be faked.
What won't be done is running any old migrations to get your database up to date first. All migrations from South must have been run on the databases used by the instance you're deploying before DYE can safely handle upgrading to Django 1.8.
You can now add an optional python_version
tuple to deploy/project_settings.py
eg
python_version = (2, 6)
The major version must match exactly, the minor version is a minimum. The default (if
nothing is set in project_settings) is (2, 6)
As part of this you will need to update your copy of ve_mgr.py from the dye project.
You can now (optionally) set the django jenkins version in your deploy/project_settings.py
(as recent versions of django jenkins required Django 1.6). The last safe version
of django jenkins was 0.14.0 You set it by adding
django_jenkins_version = '0.14.0'
You can now add a pypi_cache_url
to your deploy/project_settings.py
file,
though it is not required.
But if you have a local pypicache server, then you might want to use that instead, depending on the hostname of the machine that's rebuilding the virtualenv. For example:
import socket
if socket.getfqdn().endswith('.fen.aptivate.org'):
pypi_cache_url = 'http://fen-vz-pypicache.fen.aptivate.org/simple'
Added a revision
argument to check_for_local_changes()
in fablib.py
- if
you have overridden deploy()
in your localfab.py
you will need to make the
same change there.
Update celery scripts to be copied to /etc/init.d/celerybeat_<project_name>
(and for celeryd and /etc/default/
) - you will need to delete the old
versions and stop the old processes running. The fab command
clean_old_celery
should do this for you, but it would be worth confirming.
You'll also need to update the paths in celery/init/*
to point to the new
filenames in /etc/default
.
Update link_webserver_conf() to take maintenance
as the optional argument
rather than unlink
- you might need to update localfab to use this.
Lots of changes in a big refactor.
So add it to your pip_packages.txt
and copy in the new scripts from
examples/deploy/
- bootstrap.py
, fab.py
, tasks.py
and ve_mgr.py
(Previously you could copy in the contents of the dye/
directory directly,
that is no longer supported.)
The names of the paths in project_settings.py
have changed significantly:
- CHANGE:
django_relative_dir
->relative_django_dir
- NEW:
relative_django_settings_dir
- NEW:
relative_ve_dir
TODO: add more here
See examples/deploy/project_settings.py
and make sure you have those variables
present.
You may well have to update code in localfab.py
and localtasks.py
to make them
use the new names.
When running manage.py
- if you are already in a virtualenv then it won't try to
do anything clever.
- in fablib: touch() -> touch_wsgi()
Git projects can now specify a default branch per server. See the example
project_settings.py
for how to specify it. This replaces env.branch
env.python_bin
and env.tasks_bin
have gone. Remove any require()
calls
that mention them and replace the use of the these variables with:
fablib._get_python()
fablib._get_tasks_bin()
In fablib, changed deploy()
to use apache reload. If you have a deploy()
in
localfab.py then update it with the changes from fablib. See the diff for this
commit: 56579c6807191b1772bb89fa3e68cdf7965f1142
Made fablib be able to deal with different webservers. (For now we've only set
up apache, but the infrastructure is there). So in project_settings.py
you need
to change:
env.use_apache = True becomes env.webserver = 'apache'
env.use_apache = False becomes env.webserver = None
fablib.apache_cmd('xyz') becomes env.webserver_cmd('xyz')
commit: 91b66b43f66e45a2a42c9586469482dd1f39697e
In project_settings.py
we now use django_relative_dir
rather than django_dir
to remove ambiguity. You may need to update wsgi/wsgi_handler.py
to use the new
name.