Migrating from 1.2.1 to 1.2.1.1

Major changes

1.2.1.1 introduces Solr search and the Celery Task queue and periodic task scheduler to Devilry. Most of the setup is handled by our buildout recipes.

Solr requires java 1.5 or later, GCJ does not work.

Install RabbitMQ

Follow the guides at their website: http://www.rabbitmq.com/download.html

Refer to the RabbitMQ docs for regular configuration, like logging and database-file location. The defaults are usable.

Configure RabbitMQ for Devilry

Start the RabbitMQ server.

RabbitMQ creates a default admin user named guest with password guest. Remove the guest user, and create a new admin user (use another password than secret):

$ rabbitmqctl delete_user guest
$ rabbitmqctl add_user admin secret
$ rabbitmqctl set_user_tags admin administrator
$ rabbitmqctl set_permissions admin ".*" ".*" ".*"

Setup a vhost for Devilry with a username and password (use another password than secret):

$ rabbitmqctl add_user devilry secret
$ rabbitmqctl add_vhost devilryhost
$ rabbitmqctl set_permissions -p devilryhost devilry ".*" ".*" ".*"

Add RabbitMQ settings to Devilry

Add the following to /etc/devilry_prod_settings.py (change secret to match your password):

$ BROKER_URL = 'amqp://devilry:secret@localhost:5672/devilryhost'

Stop Devilry

Stop all supervisord processes using:

$ bin/supervisorctl stop all

Then stop supervisord using your init-script, or by killing it with pid.

Backup database and files

BACKUP. YOUR. DATABASE. AND. FILES.

Update devilry

Update to v1.2.1.1 using the instructions in the update guide, but skip step 4 (start Devilry).

Autocreate the new database tables for Celery

This command should be very safe, becuase it only creates new tables, and refuses to touch existing tables:

$ bin/django.py syncdb

Start Devilry

Use your init script to start Supervisord, or restart supervisord with bin/supervisord as explained in the getting started guide.

Build the Solr search index

We automatically update the search index whenever new content is added, but we have to index all the existing content:

$ bin/django.py rebuild_index --noinput

Search will not work while this is running, but everything else will.

Warning

The current supervisor setup does not stop the Solr search server completely. You have to manually kill solr until we develop a fix. The solr command will look something like this in the ps -ef listing:

/usr/bin/java -Djava.util.logging.config.file=/path/to/devilry-deploy/buildout/parts/solr/logging.properties
-Dsolr.solr.home=/path/to/devilry-deploy/buildout/var/solr/home
-Dsolr.data.dir=/path/to/devilry-deploy/buildout/var/solr/data -jar start.jar