A Chef cookbook for Redmine used on forge.typo3.org. Tested to be working on debian/wheezy and redmine > 2.0.0
This cookook uses Nginx as proxy and Thin as Ruby application server.
- ruby is installed via native package and (default systm ruby) is expected to be >= 1.9.1 (1.8 should work but requires mysql gem instead of mysql2)
- Support for rbenv, jruby and alike is unknown
- Bundler is installed as native system package
- Gemfile.local will be injected via a Template and used to add the dependency on thin into bundler as well as to add the database dependencies
- bundler install will run as user and use --binstub and --path options (quite simialr behaviour to --deployment)
- binstubs are used by the thin recipe / init script.dd
common approach for using the chef deploy resource is to use symlink_before_migrate for application specific config. The redmine Gemfile does pull in these configs to resolve dependencies. As the bundle install command is run in the before_migrate callback the corresponding dependencies are not in place at the time of the bundler install run. The default recipe solves this by adding the proper dependencies for database.yml into the Gemfile.local.erb template
MySQL is the only tested database. Sqlite could work.
-
node[:redmine][:rails_env]
- The RAILS ENVIRONMENT used. Defaults to production`. -
node[:redmine][:thin_servers]
- The number of thin sockets/processes to start, defaults to 1 and most likely needs to be raised -
node[:redmine][:deploy_to]
- Base directory for Redmine deployement. Defaults to/srv/redmine
-
node[:redmine][:force_deploy]
- boolean to trigger a deployment if the sha1/reference was not updated. only usefull in development. Should not be set in production env. Defaults to false -
node[:redmine][:hostname]
- Host name of the Redmine server (used as the vhost's server_name). Defaults tonode[:fqdn]
. -
node[:redmine][:database][:name]
- Database name. Defaults toredmine
. -
node[:redmine][:database][:username]
- Database user name. Defaults toredmine
. -
node[:redmine][:database][:password]
- Database user's password. Defaults tonil
. -
node[:redmine][:database][:hostname]
- Database host. Defaults tolocalhost
. -
node[:redmine][:database][:encoding]
- Database encoding. Defaults toutf8
. -
node[:redmine][:database][:collation]
- Database collation. Defaults toutf8_general_ci
. -
node[:redmine][:source][:repository]
- Git repository. At the moment, you have to use your own fork, as aGemfile.lock
is required. Defaults togit://github.com/redmine/redmine.git
. -
node[:redmine][:source][:reference]
- Git reference (branch, tag, commit SHA1) to checkout. Defaults to2.3-stable
.