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.
p(smallsee-also). If you are looking to upgrade from Redmine to ChiliProject, please read [[Migrate From Redmine]].
h2. Step 1 - Check requirements
In order to successfully install and run ChiliProject, make sure you meet the system [[requirements]].
h2. Step 2 - Backup data
Always backup you data before any upgrade. You will need to backup:
* File uploads - stored in @files/@ or another custom directory as defined in your [[Configuration File]].
For major upgrades (e.g. 1.1.0 to 2.0.0) or migrations from another system it is also recommended that you backup your entire installation directory too.
h2. Step 3 - Update the code
The exact process to upgrade the code is different depending on how you have installed the system.
h3. Git clone from the official repository
If you have a clone of the official repository, "gitting" the latest code is quite easy.
If you have made code changes to your ChiliProject, you will need to use @git merge@ in order to keep them.
h4. Upgrade to an official tagged release
Assuming you are following the releases and want to get the official 3.1.0 release (you will probably need to adapt the version number here):
git fetch origin # Grabs the latest official code
git checkout v3.1.0 # Checks out the v3.1.0 tag version
h4. Upgrade to an official branch
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.
git fetch origin # Grabs the latest official code
git checkout origin/master # Checks out the master branch, which will become the "next-release"
h3. Zip or Tar archive
To upgrade from a zip or tar archive you will basically be setting up the new version and swapping your existing configuration over.
Assuming your current install directory is called "chiliproject"
# Rename the directory for your old install to something like "chiliproject-old"
# Extract the archive to the name of your old install ("chiliproject")
# 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
# Copy your file uploads from your old install. These are stored in the @files/@ directory by default.
# Copy any third party themes you had installed. These are stored in @public/themes@ by default.
# 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.
Once this is complete, you can continue with the rest of the upgrade.
h2. Step 4 - Library installation
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
p(smalltip). See our documentation for [[Bundler|setting up bundler]] for some additional settings and configuration options.
h2. Step 5 - Configuration
h3. Server configuration
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.
If you want to setup a new configuration file just copy the example file with a command like:
<pre>cp config/configuration.yml.example config/configuration.yml</pre>
h3. Session storage
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@.
<pre>bundle exec rake generate_session_store</pre>
h2. Step 6 - Database update
p(smallcaution). The database migrations (steps 6 and 7) can be very sensitive to the consistency of your data, especially scenarios in which some data has been deleted "by hand" leaving orphaned records behind which don't impact day-to-day operation but are known to cause database migrations to break and abort. If you ever encounter such a case, please seek help in "the forums":/projects/chiliproject/boards/1, we will try our best to help you bring your database to a consistent enough state.
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:
<pre>bundle exec rake db:migrate RAILS_ENV=production</pre>
h2. Step 7 - Plugin Database update
Core and third party plugins may include database updates too so you will want to run the following command to upgrade them also.
<pre>bundle exec rake db:migrate:plugins RAILS_ENV=production</pre>
h2. Step 8 - Clean up
Now your code and data is upgraded and you are ready to finish the process by loading the new code.
h3. Clear caches and sessions
In order to make sure old code isn't running you should clear any old caches and sessions.
bundle exec rake tmp:cache:clear
bundle exec rake tmp:sessions:clear
h3. Clear logs (optional)
If you are not rotating your log files automatically, it would be a good time to clear your log files.
# Backup your existing log files if you want to save them, @cp -a log/*.log /some/safe/archiving_place/@
# Run the @rake@ command to clear all of the logs @rake log:clear@
h2. Step 9 - Restart h3. Application Server restarts
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. It depends on your application server [[Restart_ChiliProject|which process you have to follow]].
h2. Step 10 9 - Final check
Now your ChiliProject is upgraded and running. You should login as an Administrator and do a few quick checks:
* Visit "Admin > Information"
** Make sure that the version has been updated.
** Make sure that all of the required options are green.
* Visit "Admin > Settings"
** Check all of the tabs for any new options and set them as needed.
* Visit "Admin > Roles & Permisisons"
** Check for any new permissions and configure them for your system