ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Upgrade

Version 2 (Holger Just, 2013-01-09 12:15 am)

1 1
h1. Upgrade
2 1
3 2 Holger Just
p(info). If you are looking to upgrade from Redmine to ChiliProject, please read [[Migrate From Redmine]].
4 1
5 2 Holger Just
h2. 1 Check requirements
6 2 Holger Just
7 2 Holger Just
In order to successfully install and run ChiliProject, make sure you meet the system [[requirements]].
8 2 Holger Just
9 2 Holger Just
h2. 2 Backup data
10 2 Holger Just
11 2 Holger Just
Always backup you data before any upgrade. You will need to backup:
12 2 Holger Just
13 2 Holger Just
* File uploads - stored in @files/@ or another custom directory as defined in your [[Configuration File]].
14 2 Holger Just
* Database
15 2 Holger Just
16 2 Holger Just
For major upgrades (1.1.0 to 2.0.0) or migrations from another system it is also recommended that you backup your entire installation directory too.
17 2 Holger Just
18 2 Holger Just
h2. 3 Update the code
19 2 Holger Just
20 2 Holger Just
The exact process to upgrade the code is different depending on how you have installed the system.
21 2 Holger Just
22 2 Holger Just
h3. Git clone from the official repository
23 2 Holger Just
24 2 Holger Just
TODO
25 2 Holger Just
26 2 Holger Just
h3. Zip or Tar archive
27 2 Holger Just
28 2 Holger Just
h2. 4 Configuration
29 2 Holger Just
30 2 Holger Just
h3. Server configuration
31 2 Holger Just
32 2 Holger Just
ChiliProject has a system configuration file that is used to configure various options for your server. There are good defaults for most of the values but take a look at the [[Configuration File]] page to see if you want to change anything.
33 2 Holger Just
34 2 Holger Just
To change the values, just copy the example file with a command like:
35 2 Holger Just
36 2 Holger Just
<pre><code>
37 2 Holger Just
cp config/configuration.yml.example config/configuration.yml
38 2 Holger Just
</code></pre>
39 2 Holger Just
40 2 Holger Just
h3. Session storage
41 2 Holger Just
42 2 Holger Just
Next you should generate a session storage file. This is a small bit of code that is used to encrypt ChiliProject's login cookies.  To generate it, run the following command. It should save a file in @config/initializers/session_store.rb@.
43 2 Holger Just
44 2 Holger Just
<pre><code>
45 2 Holger Just
rake generate_session_store
46 2 Holger Just
</code></pre>
47 2 Holger Just
48 2 Holger Just
h2. 5 Database update
49 2 Holger Just
50 2 Holger Just
Next you will need to run the @rake@ command to upgrade the schema and contents of your database. Go to the directory of your ChiliProject install and run:
51 2 Holger Just
52 2 Holger Just
<pre><code>
53 2 Holger Just
rake db:migrate RAILS_ENV=production
54 2 Holger Just
</code></pre>
55 2 Holger Just
56 2 Holger Just
h2. 6 Plugin Database update
57 2 Holger Just
58 2 Holger Just
Core and third party plugins may include database updates too so you will want to run the following command to upgrade them also. 
59 2 Holger Just
60 2 Holger Just
<pre><code>
61 2 Holger Just
rake db:migrate_plugins RAILS_ENV=production
62 2 Holger Just
</code></pre> 
63 2 Holger Just
64 2 Holger Just
h2. 7 Clean up
65 2 Holger Just
66 2 Holger Just
Now your code and data is upgraded and you are ready to finish the process by loading the new code.
67 2 Holger Just
68 2 Holger Just
h3. Clear caches and sessions
69 2 Holger Just
70 2 Holger Just
In order to make sure old code isn't running you should clear any old caches and sessions.
71 2 Holger Just
72 2 Holger Just
<pre><code>
73 2 Holger Just
rake tmp:cache:clear
74 2 Holger Just
rake tmp:sessions:clear
75 2 Holger Just
</code></pre>
76 2 Holger Just
77 2 Holger Just
h3. Clear logs (optional)
78 2 Holger Just
79 2 Holger Just
If you are not rotating your log files automatically, it would be a good time to clear your log files.
80 2 Holger Just
81 2 Holger Just
# Backup your existing log files if you want to save them, @cp -a log/*.log /some/safe/archiving_place/@
82 2 Holger Just
# Run the @rake@ command to clear all of the logs @rake log:clear@
83 2 Holger Just
84 2 Holger Just
h3. Application Server restarts
85 2 Holger Just
86 2 Holger Just
Next the application servers should be restarted so the new code is loaded. The application servers are processes like mongrel, thin, or passenger. You *do not* need to reboot the entire server.
87 2 Holger Just
88 2 Holger Just
h2. 8 Final check
89 2 Holger Just
90 2 Holger Just
Now your ChiliProject is upgraded and running. You should login as an Administrator and do a few quick checks:
91 2 Holger Just
92 2 Holger Just
* Visit "Admin > Information"
93 2 Holger Just
** Make sure that the version has been updated.
94 2 Holger Just
** Make sure that all of the required options are green.
95 2 Holger Just
* Visit "Admin > Settings"
96 2 Holger Just
** Check all of the tabs for any new options and set them as needed.
97 2 Holger Just
* Visit "Admin > Roles & Permisisons"
98 2 Holger Just
** Check for any new permissions and configure them for your system