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 12 (Holger Just, 2013-01-09 12:15 am)

1 1
h1. Upgrading ChiliProject
2 7 Holger Just
3 7 Holger Just
{{>toc}}
4 4 Holger Just
5 5 Holger Just
p(smallsee-also). If you are looking to upgrade from Redmine to ChiliProject, please read [[Migrate From Redmine]].
6 1
7 4 Holger Just
h2. Step 1 - Check requirements
8 1
9 2 Holger Just
In order to successfully install and run ChiliProject, make sure you meet the system [[requirements]].
10 2 Holger Just
11 4 Holger Just
h2. Step 2 - Backup data
12 2 Holger Just
13 2 Holger Just
Always backup you data before any upgrade. You will need to backup:
14 2 Holger Just
15 2 Holger Just
* File uploads - stored in @files/@ or another custom directory as defined in your [[Configuration File]].
16 1
* Database
17 2 Holger Just
18 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.
19 2 Holger Just
20 4 Holger Just
h2. Step 3 - Update the code
21 2 Holger Just
22 2 Holger Just
The exact process to upgrade the code is different depending on how you have installed the system.
23 2 Holger Just
24 2 Holger Just
h3. Git clone from the official repository
25 1
26 6 Holger Just
If you have a clone of the official repository, "gitting" the latest code is quite easy.
27 1
28 9 Holger Just
If you have made code changes to your ChiliProject, you will need to use @git merge@ in order to keep them.
29 9 Holger Just
30 6 Holger Just
h4. Upgrade to an official tagged release
31 6 Holger Just
32 6 Holger Just
Assuming you are following the releases and want to get the official 1.1.0 release:
33 6 Holger Just
34 1
<pre><code>git fetch origin    # Grabs the latest official code
35 12 Holger Just
git checkout v1.1.0    # Checks out the v1.1.0 tag version
36 6 Holger Just
</code></pre>
37 6 Holger Just
38 6 Holger Just
39 6 Holger Just
h4. Upgrade to an official branch
40 6 Holger Just
41 1
If you want to follow an official branch in order to get updates more often than the official releases, you can just change what version to merge in your git command. Make sure to read [[ChiliProject Repository]] to see the branch names, how stable they are, and what you can expect.
42 6 Holger Just
43 6 Holger Just
<pre><code>git fetch origin    # Grabs the latest official code
44 9 Holger Just
git checkout origin/master    # Checks out the master branch, which will become the "next-release"
45 6 Holger Just
</code></pre>
46 6 Holger Just
47 1
h3. Zip or Tar archive
48 6 Holger Just
49 10 Holger Just
To upgrade from a zip or tar archive you will basically be setting up the new version and swapping your existing configuration over.
50 10 Holger Just
51 10 Holger Just
Assuming your current install directory is called "chiliproject"
52 10 Holger Just
53 10 Holger Just
# Rename the directory for your old install to something like "chiliproject-old"
54 10 Holger Just
# Extract the archive to the name of your old install ("chiliproject")
55 10 Holger Just
# Copy over the configuration files from the old install to the upgrade directory. If your old install didn't have a file, you can skip it
56 10 Holger Just
#* @config/database.yml@
57 10 Holger Just
#* @config/configuration.yml@
58 10 Holger Just
#* @config/initializers/session_store.rb@
59 10 Holger Just
#* @config/additional_environment.rb@
60 10 Holger Just
# Copy your file uploads from your old install. These are stored in the @files/@ directory by default.
61 10 Holger Just
# Copy any third party themes you had installed. These are stored in @public/themes@ by default.
62 10 Holger Just
# Copy any third party plugins you had installed. These are stored in @vendor/plugins@ but there are several plugins that come with ChiliProject so you only want to copy the ones that are missing that you installed.
63 10 Holger Just
64 10 Holger Just
Once this is complete, you can continue with the rest of the upgrade.
65 2 Holger Just
66 11 Holger Just
h2. Step 4 - Library installation
67 1
68 11 Holger Just
(*ChiliProject 2.x releases only*)
69 11 Holger Just
70 11 Holger Just
After updating the code, you will need to use @bundler@ in order to get upgrades to any libraries (RubyGems). This can be done using the bundle command in the root directory of ChiliProject
71 11 Holger Just
72 11 Holger Just
<pre>
73 11 Holger Just
$ bundle install
74 11 Holger Just
</pre>
75 11 Holger Just
76 11 Holger Just
h2. Step 5 - Configuration
77 11 Holger Just
78 2 Holger Just
h3. Server configuration
79 2 Holger Just
80 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.
81 8 Holger Just
82 2 Holger Just
If you want to setup a new configuration file just copy the example file with a command like:
83 3 Holger Just
84 2 Holger Just
<pre><code>cp config/configuration.yml.example config/configuration.yml</code></pre>
85 1
86 2 Holger Just
h3. Session storage
87 2 Holger Just
88 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@.
89 1
90 1
<pre><code>rake generate_session_store</code></pre>
91 2 Holger Just
92 11 Holger Just
h2. Step 6 - Database update
93 3 Holger Just
94 1
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:
95 1
96 2 Holger Just
<pre><code>rake db:migrate RAILS_ENV=production</code></pre>
97 4 Holger Just
98 11 Holger Just
h2. Step 7 - Plugin Database update
99 1
100 1
Core and third party plugins may include database updates too so you will want to run the following command to upgrade them also. 
101 2 Holger Just
102 3 Holger Just
<pre><code>rake db:migrate_plugins RAILS_ENV=production</code></pre> 
103 2 Holger Just
104 11 Holger Just
h2. Step 8 - Clean up
105 2 Holger Just
106 2 Holger Just
Now your code and data is upgraded and you are ready to finish the process by loading the new code.
107 2 Holger Just
108 2 Holger Just
h3. Clear caches and sessions
109 2 Holger Just
110 2 Holger Just
In order to make sure old code isn't running you should clear any old caches and sessions.
111 2 Holger Just
112 3 Holger Just
<pre><code>rake tmp:cache:clear
113 2 Holger Just
rake tmp:sessions:clear
114 2 Holger Just
</code></pre>
115 2 Holger Just
116 2 Holger Just
h3. Clear logs (optional)
117 1
118 2 Holger Just
If you are not rotating your log files automatically, it would be a good time to clear your log files.
119 2 Holger Just
120 2 Holger Just
# Backup your existing log files if you want to save them, @cp -a log/*.log /some/safe/archiving_place/@
121 2 Holger Just
# Run the @rake@ command to clear all of the logs @rake log:clear@
122 1
123 2 Holger Just
h3. Application Server restarts
124 2 Holger Just
125 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.
126 2 Holger Just
127 11 Holger Just
h2. Step 9 - Final check
128 2 Holger Just
129 2 Holger Just
Now your ChiliProject is upgraded and running. You should login as an Administrator and do a few quick checks:
130 2 Holger Just
131 2 Holger Just
* Visit "Admin > Information"
132 2 Holger Just
** Make sure that the version has been updated.
133 2 Holger Just
** Make sure that all of the required options are green.
134 2 Holger Just
* Visit "Admin > Settings"
135 2 Holger Just
** Check all of the tabs for any new options and set them as needed.
136 2 Holger Just
* Visit "Admin > Roles & Permisisons"
137 2 Holger Just
** Check for any new permissions and configure them for your system