Skip to content

A Chef cookbook that installs a Rails application and can be fully customized using attributes.

License

Notifications You must be signed in to change notification settings

devops-israel/chef-rails_application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rails_application Cookbook

This cookbooks installs the server-side Rails application. Unlike the official OpsCode cookbooks, this cookbook has all of the possible tweaks externalized in the form of attributes - it was intended that this cookbook is used by a wrapper cookbook that provides the attributes which configure the rails application per the requirements of the actual application.

This cookbook replaces the unicorn process supervisor to be upstart instead of runit, it means that it will work on Ubuntu systems, later versions might allow customizing the process supervisor as well.

Requirements

Tested on Ubuntu 12.04 and depends on several OpsCode official cookbooks that actually do the majority of the work.

packages

This cookbook depends on several OpsCode cookbooks, namely -
  • git
  • ruby
  • nginx
  • unicorn
  • application
  • application_ruby
  • application_nginx
for the rails_application::database_credentials cookbook, you also need -
  • database

Several of the above required minor modifications, all of these have pull requests and tickets with OpsCode, but until these get accepted, forks that include the modifications are available here -

application_ruby cookbook (no pull requests at this time)
OpsCode cookbooks are available at -

Attributes

rails_application::default

Key Type Description Default
rails/ruby/version String which ruby version to use, see: ruby cookbook 1.9.1
rails/app/name String how to call the application rails_app
rails/app/path String where the application is deployed to /var/www/project/{{rails/app/name}}
rails/app/environment String rails/rack environment name production
rails/owner String user name to own files and processes deploy
rails/group String group name to own files and processes deploy
rails/packages Array additional packages that need to be installed for the application to work [ ]
rails/gems Array additional system-wide gems that need to be installed for the application to work [ ]

Usage

rails_application::default

Just include rails_application in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[rails_application]"
  ]
}

Contributing

This cookbook is still a work in progress, you are welcome to help by contributing fixes, documentation and tests.

e.g.

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

License

See LICENSE for full details.

Authors:
Contributors:
  • Daniel github.com/emirikol

About

A Chef cookbook that installs a Rails application and can be fully customized using attributes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages