rails
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'initforthe-rails', '0.4.9'
Learn more about managing modules with a PuppetfileDocumentation
rails
Table of Contents
- Description
- Setup - The basics of getting started with rails
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This module sets up a rails app ready for deployment via capistrano.
It assumes environment variables are loaded via dotenv-rails or similar.
Setup
Beginning with rails
The most simple usage is as follows:
include rails
rails::app { 'my_app': }
This will create a capistrano deployment in /var/www/my_app
and put
environment variables in /etc/defaults/my_app
.
Usage
Configure all rails deployments
class { 'rails':
user => 'deploy',
deploy_root => '/srv/apps',
}
Set up a rails app
rails::app { 'my_app':
env => {
'RAILS_ENV' => 'staging',
'SECRET_KEY_BASE' => '1234567890',
}
}
Reference
Classes:
Defined Types:
Classes
rails
Sets up the root for all rails app deployments. Set the following parameters if you want something other than the default settings:
user
Which user you want to own the deployments. The user must exist already.
Default: root
deploy_root
The root for your deployments. Default: /var/www
Defined Types
rails::app
Sets up a deployment for a single app. Set the following parameters if you want something other than the default settings:
app_environment
The environment the application should run under. Default: production
db_opts
A hash of options to be passed to the database.yml config file.
env_vars
A hash of environment variables to set for the app.
Default: {}
Limitations
This module has only been tested on Debian-based OSes. YMMV with others.
Development
Please follow the guidance for contributing on the Puppet Forge
Getting things going
$ bundle install
$ gem install pdk
Testing
$ pdk test unit
Publishing (from master
only)
Make sure everything is committed and pushed to master first. Direct changes to master should not be made.
For a minor version bump:
$ bundle exec rake module:release
For anything else:
$ bundle exec rake module:clean module:bump_commit:TYPE module:tag
$ git push && git push --tags
Details of type can be found by running rake -T
Dependencies
- puppetlabs-apt (>= 7.0.0 < 9.0.0)
- puppetlabs-stdlib (>= 5.2.0 < 7.0.0)
- initforthe-capistrano (>= 0.1.0 < 2.0.0)
- puppet-logrotate (>= 3.4.0 < 5.0.0)
- camptocamp-systemd (>= 2.2.0 < 4.0.0)
- initforthe-yarn (>= 1.0.0 < 3.0.0)
- puppet-nodejs (>= 7.0.0 < 9.0.0)
- puppetlabs-ruby (>= 1.0.0 < 3.0.0)
- puppetlabs/postgresql (>= 6.3.0 < 7.0.0)