Thincloud::Deployment
Opinionated framework dependencies, configuration, and recipes for Capistrano-based deployments.
New Leaders uses this gem to manage the following dependencies:
Requirements
This gem has been test against the following Ruby versions:
- 1.9.3
Installation
Add this line to your application's Gemfile:
gem 'thincloud-deployment'
And then execute:
$ bundle
Or install it yourself as:
$ gem install thincloud-deployment
Usage
This gem manages the deployment framework dependencies for you, provides a default set of capistrano recipes, and provides a Thor generator to bootstrap application deployment.
This is typically used in Rails applications so a rails-like folder structure is assumed when running the generator.
To enable the default New Leaders conventions, run the following command:
$ thincloud-capify
If you are running this from the provided Rails generator, run:
$ rails g thincloud:deployment
This generator will do the following:
- Add
Capfileat the root of your project - Add
config/deploy.rbfor application-level deployment settings - Add
config/deploy/staging.rbandconfig/deploy/production.rbfor stage-level deployment settings. - Add the
lib/recipesdirectory to store project specific recipes. - Set up
foreman
Configuration
All conventional settings are contained in the gem recipes and are loaded into the Capistrano configuration during startup.
thincloud-deployment follows the Capistrano multistage deployment strategy. As you can see in the generator description above, we create an application deploy.rb as well as individual stage files (staging.rb, production.rb).
Any of the tasks or settings can be overriden in these files.
Adding stages
Just add a new Ruby file under config/deploy. To add a demo stage you would create config/deploy/demo.rb.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create a Pull Request
License
- Freely distributable and licensed under the MIT license.
- Copyright (c) 2013 New Leaders ([email protected])
- https://newleaders.com