Chef cookbook for deploying redmine with unicorn and nginx. Uses bundler for Ruby and gem management.
As of this writing, this cookbook was tested for installing redmine 1.2.1 and 1.3.3, and 2.3.3 onto Ubuntu 12.04 system, using Vagrant and librarian-chef, and gusteau. For details, see @dergachev/vagrant_redmine
The following default attributes exposed by this cookbook:
default['redmine'] = {
'git_revision' => "2.3.3",
'git_repository' => "https://github.com/redmine/redmine",
'app_path' => "/opt/redmine/",
'app_server_name' => 'redmine',
'unicorn_conf' => {
'pid' => "/tmp/pids/unicorn.pid",
'sock' => "/tmp/sockets/unicorn.sock",
'error_log' => "unicorn.error.log",
'access_log' => "unicorn.access.log"
},
'db' => {
'rails_env' => "development",
'db_name' => "redmine",
'db_user' => "redmine",
'db_pass' => "redMinePass",
'db_host' => "localhost",
'load_sql_file' => nil
},
'rmagick' => "disabled",
'nginx_filenames' => ["redmine.conf"],
'nginx_listen' => "*:80 default_server"
}
# redmine 1.2.x requires rails 2.3.11, 1.3.x requires rails 2.3.14, 1.4+ comes with own Gemfiles
default['redmine']['rails_version'] = node['redmine']['git_revision'].match(/^1.3/) ? '2.3.14' : '2.3.11'
Note the following caveats:
root_ssh_agent::ppid
recipe. node['redmine']['db']['load_sql_file']
: absolute path to redmine mysql
dump file that should be loaded, eg /vagrant/redmine_prod.sql
. Supports
gzipped files. This file should be installed prior to the execution of
redmine::database, perhaps in a Vagrant shared folder, or by another recipe.