Upgrading ODE

Version 1 (Christopher Sigman, 09/19/2013 04:26 pm)

1 1 Christopher Sigman
h1. Upgrading ODE
2 1 Christopher Sigman
3 1 Christopher Sigman
h2. General Upgrade Notes
4 1 Christopher Sigman
5 1 Christopher Sigman
In general, there are 3 steps to upgrading to a new version of ODE.
6 1 Christopher Sigman
# Back up the database
7 1 Christopher Sigman
# Back up the folder ODE resides in
8 1 Christopher Sigman
# Check your version of your web stack, and upgrade if necessary / desired.  You may be required to upgrade due to a need for a newer version of one of the dependencies, such as Ruby or Rails.  Instructions for upgrading Bitnami are found "here":http://wiki.bitnami.com/Native_Installers_Quick_Start_Guide#How_to_upgrade_the_full_Stack_migrating_the_data.3f
9 1 Christopher Sigman
# Download the latest copy of ODE, and place it in the desired location. This should be in another location than the existing installation to avoid issues caused by files that should no longer exist.
10 1 Christopher Sigman
# Copy over configuration files config/database.yml and config/configuration.yml into the new location's config directory.
11 1 Christopher Sigman
# Copy over the files directory from the old copy to the new location.
12 1 Christopher Sigman
# Execute migration scripts.  The details of this step may vary, but usually at least will include 
13 1 Christopher Sigman
<pre>
14 1 Christopher Sigman
rake db:migrate RAILS_ENV=production
15 1 Christopher Sigman
rake redmine:plugins:migrate RAILS_ENV=production
16 1 Christopher Sigman
</pre>
17 1 Christopher Sigman
18 1 Christopher Sigman
h2. Upgrading from Redmine 1.X to 2.2
19 1 Christopher Sigman
20 1 Christopher Sigman
The following documentation is for the upgrade of the first release of ODE to a more modern version of Redmine.  At the time the work was undertaken, the latest version of Redmine was 2.2, therefor these upgrade notes are focused on upgrading from the 1.x series of Redmine to 2.2.  Many of these steps are similar to other upgrades, but since this is a major version upgrade, there will be additional items.  The "RedmineUpgrade":http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade article on the Redmine wiki goes through most of these steps, and is a good reference.  Any occurrences of <ODE_ROOT> refer to the root directory of where the ODE codebase is located.
21 1 Christopher Sigman
22 1 Christopher Sigman
# Back up the database, running something like this:  <pre>/usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz</pre>
23 1 Christopher Sigman
# Back up the ODE installation directory: <pre>tar -czf /path/to/backup.tar.gz <ODE_ROOT>
24 1 Christopher Sigman
# Perform stack upgrades.  It is unlikely that this will not be required, due to version changes in Ruby and Rails.  See #3 from the General Upgrade Notes.
25 1 Christopher Sigman
# Download the latest copy of ODE into a new folder.
26 1 Christopher Sigman
# Copy over configuration files config/database.yml and config/configuration.yml into the new location's config directory.  If there are any changes from the default that were made to other files, such as config/settings.yml, these will have to be done by hand in the new config/settings.yml.
27 1 Christopher Sigman
# Copy the files folder from the old <ODE_ROOT> to the new <ODE_ROOT>, or create a symlink.
28 1 Christopher Sigman
# Execute the migration scripts.  Since this is from the 1 to 2 series of Redmine, there's some extra steps that wouldn't need to be observed during other upgrades.  The last two commands also clear the cache, as a just-in-case measure.
29 1 Christopher Sigman
<pre>
30 1 Christopher Sigman
rake generate_secret_token
31 1 Christopher Sigman
rake db:migrate RAILS_ENV=production
32 1 Christopher Sigman
rake redmine:plugins:migrate RAILS_ENV=production
33 1 Christopher Sigman
rake tmp:cache:clear
34 1 Christopher Sigman
rake tmp:sessions:clear
35 1 Christopher Sigman
</pre>
36 1 Christopher Sigman
37 1 Christopher Sigman
You may see some error messages.  While there are none that have been encountered thus far, the Redmine wiki on upgrading states some common ones, so check there first.