ChiliProject 1.4.0 + Ruby Enterprise + Passenger + Apache2

I was a happy Trac user, but after seeing Redmine, I realized that Trac has many missing features and that you must do a lot of things with plugins, Redmine has this features out-of-box. After working a bit with Redmine I discovered ChiliProject, which is a fork of Redmine, and its actually compatible with Redmine Themes and Plugins.

Here is a comparison of Redmine/ChiliProject and Trac features:

Feature Redmine/ChiliProject Trac
Multiple projects support Yes No (with plugin, planned 0.14)
Flexible role based access control Yes No
Flexible issue tracking system Yes Yes (no bulk ticket changes and ticket dependencies)
Gantt chart and calendar Yes No (GanttCalendarPlugin)
Feeds & email notifications Yes Yes
Per project wiki Yes Yes
Per project forums Yes No (DiscussionPlugin)
Time tracking Yes No (Plugins or custom field)
Custom fields for issues, time-entries, projects and users Yes Yes (editing trac.ini)
SCM integration SVN, CVS, Git, Mercurial, Bazaar and Darcs SVN in core, others with Plugins
Issue creation via email Yes No (MailToTracPlugin)
Multiple LDAP authentication support Yes No (LDAPPlugin)
User self-registration support Yes No (AccountManagerPlugin)
Multilanguage support Yes Yes
Multiple databases support MySQL, PostgreSQL, SQLite MySQL (unstable), PostgreSQL, SQLite
iPhone/Android Apps Yes No

The first thing that made me not to test Redmine/ChiliProject immediately was that it is RoR and the complexity to make it run stable under apache, but after searching a bit, I found Phusion Passenger and Ruby Enterprise, which is a very good solution to run RoR products stable under Apache, and you have the ability to run Ruby with custom user, usefull for shared environments.

Installation

  1. Ruby Enterprise

    I downloaded and installer from source code, so that it’s compiled for my server and I can store it in a specific location. So, the first we have to do is download latest version from Ruby Enterprise Download page

    wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.03.tar.gz
    tar zxvf ruby-enterprise-1.8.7-2011.03.tar.gz
    cd ruby-enterprise-1.8.7-2011.03
    ./installer

    Follow installer instructions, and install dependencies if needed (the installer tells us which packages we need for our Linux distro)

  2. Phusion Passenger

    Next thing to do, is install the Passanger module for apache, this can be done with the passenger-install-apache2-module script available at Ruby Enterprise installation

    cd /opt/ruby-enterprise-1.8.7-2011.03/bin
    ./passenger-install-apache2-module

    This script also checks the dependencies and says what packages you need for your Linux distro

  3. Apache

    Now we need to configure apache, first we need to activate and configure the passenger module

    /etc/apache2/mods-enabled/passenger.load

    LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so

    /etc/apache2/mods-enabled/passenger.conf

    <ifmodule mod_passenger.c>
      PassengerRoot /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.7
      PassengerRuby /opt/ruby-enterprise-1.8.7-2011.03/bin/ruby
     
      PassengerFriendlyErrorPages Off
      PassengerUserSwitching On
      PassengerDefaultUser www-data
      PassengerDefaultGroup www-data
    </ifmodule>

    And the last thing is configure a vhost under which we will run this ChiliProject installation

    /etc/apache2/sites-enabled/chiliproject

    NameVirtualHost *:443
    <virtualhost *:443>
    	SSLEngine on
     
    	SSLCertificateFile    /etc/apache2/ssl/server.crt
    	SSLCertificateKeyFile /etc/apache2/ssl/server.key
     
    	<ifmodule mod_passenger.c>
    		PassengerUser chiliproject
    		PassengerGroup chiliproject
    	</ifmodule>
     
            ServerAdmin [email protected]
    	ServerName chiliproject.org
     
    	DocumentRoot /home/chiliproject/public
    	<directory />
    		Options -MultiViews
    		AllowOverride All
    	< /Directory>
     
    	ErrorLog /var/log/apache2/chiliproject-error.log
     
    	CustomLog /var/log/apache2/chiliproject-access.log combined
    </virtualhost>
  4. ChiliProject

    First install needed gems

    /opt/ruby-enterprise-1.8.7-2011.03/bin/gem install -v=0.4.2 i18n
    /opt/ruby-enterprise-1.8.7-2011.03/bin/gem install -v=1.0.1 rack
    /opt/ruby-enterprise-1.8.7-2011.03/bin/gem install mysql

    Download the last available ChiliProject version from ChiliProject Files Page

    wget https://www.chiliproject.org/attachments/download/99/chiliproject-1.4.0.tar.gz
    tar zxvf chiliproject-1.4.0.tar.gz
    mv chiliproject-1.4.0 /home/chiliproject

    Create the mysql database and user for ChiliProject

    CREATE DATABASE chiliproject CHARACTER SET utf8 COLLATE utf8_unicode_ci;
    GRANT ALL privileges ON chiliproject.* TO 'chiliproject'@'localhost' IDENTIFIED BY 'my_password';

    Configure ChiliProject Database Connection

    mv config/database.yml.example config/database.yml
    production:
      adapter: mysql
      database: chiliproject
      host: localhost
      username: chiliproject
      password: my_password

    Now initialize ChiliProject (session Store, DB Tables, DB Default Data

    /opt/ruby-enterprise-1.8.7-2011.03/bin/rake generate_session_store
    RAILS_ENV=production /opt/ruby-enterprise-1.8.7-2011.03/bin/rake db:migrate
    RAILS_ENV=production /opt/ruby-enterprise-1.8.7-2011.03/bin/rake redmine:load_default_data

    And the last thing we need to do before we can restart apache and begin to use the new installed ChiliProject, we need to create the chiliproject user

    adduser --home /home/chiliproject --shell /bin/false --no-create-home chiliproject
    chown -R chiliproject:chiliproject /home/chiliproject
  5. (Optinal) Rmagick

    If we would like to enable Gantt export to png image we need to install Rmagick (available as gem). First we need to install imagemagick ang graphicsmagick dev packages and then we can install the rmagick gem.

    apt-get install libmagickcore-dev libgraphicsmagick1-dev libmagickwand-dev
    /opt/ruby-enterprise-1.8.7-2011.03/bin/gem install rmagick

Now we only need to restart Apache and load ChiliProject in our Browser. The default user is admin/admin

Leave a Reply