Manage Ruby bundles using bundler.
This module installs bundler and aims at making it easy to manage Ruby applications.
- Installed packages;
- Installed gems (when
deployment
is set tofalse
).
The following example deploys a fictive Rails application:
$app_directory = '/var/www/app'
vcsrepo { $app_directory:
ensure => latest,
provider => 'git',
source => '[email protected]/repo.git',
user => 'deploy',
}
bundle::install { $app_directory:
user => 'deploy',
group => 'deploy',
}
bundle::exec { "${app_directory}:rake db:migrate":
user => 'app',
group => 'app',
environment => ['RAILS_ENV=production'],
refreshonly => true,
}
exec { 'notify-app':
command => "/usr/bin/touch ${app_directory}/tmp/restart.txt",
refreshonly => true,
}
Vcsrepo[$app_directory] ~>
Bundle::Install[$app_directory] ~>
Bundle::Exec["${app_directory}:rake db:migrate"] ~>
Exec['notify-app']
Only the bundle
, bundle::install
and bundle::exec
classes are intended to end users
usage. See reference documentation bellow.
The current implementation supports Debian GNU/Linux and FreeBSD. Patches to add support to more platforms are welcome.
- Fork it ( https://github.com/opus-codium/puppet-bundle/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request