Skip to content

Latest commit

 

History

History
152 lines (95 loc) · 4.83 KB

release-notes.mkd

File metadata and controls

152 lines (95 loc) · 4.83 KB

Migrating to dye from our old deploy scripts

fabric

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)

tasks.py

You shouldn't have to alter your localtasks.py

Notes on upgrading

10/11/2015

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.

25/06/2014

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.

26/02/2014

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'

06/02/2014

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'

02/11/2013

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.

19/08/2013

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.

14/08/2013

Update link_webserver_conf() to take maintenance as the optional argument rather than unlink - you might need to update localfab to use this.

06/2013

Lots of changes in a big refactor.

Dye must be installed in a virtualenv

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.)

Names of env variables

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.

Play nice in pre-existing virtualenv

When running manage.py - if you are already in a virtualenv then it won't try to do anything clever.

Names of functions

  • in fablib: touch() -> touch_wsgi()

16/01/2013

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

03/12/2012

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()

24/11/2012

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

19/10/2012

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

Older

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.