capistrano-rack

Capistrano recipe to be served with Rackspace

View project on GitHub

capistrano-rack

Capistrano recipe to be served with Rackspace.

Build Status Dependency Status Gem Version ghit.me


capistrano-rack simplifies your deployment to Rackspace Cloud services by connecting you to the appropriate service matching your criteria.

Installation

Add this line to your Gemfile:

    gem 'capistrano-rack'

and in your Capfile:

    require 'capistrano/rack'

Then execute:

    $ bundle && bundle exec rake

NOTE Make sure you have a ~/.rack/config file in your $HOME directory with these properties:

    region   = rackspace_region (e.g LON)
    username = your_username
    api-key  = your_api_key

If you are already a Rackspace CLI user, you can skip the note above.

Usage

capistrano-rack recipe supports two Rackspace Cloud services with configurable options:

    set :rack_config, "#{ENV['HOME']}/.rack/config" # default
    set :rack_connection_options, {}                # default
    set :rack_addr_type, :private                   # default

Where,

  • rack_config: Rackspace configuration file.
  • rack_connection_options: Optional connection parameters.
  • rack_addr_type: type of IP addresses (:public or :private).

Next Generation Cloud Servers™

To deploy to your Next Gen Cloud servers:

    rack_servers %w{app web}, '^myservers-'

rack_servers() function supports the following ordered parameters:

  • roles: your Capistrano Roles.
  • regex_str: a regular expression to filter throught your Next Gen Cloud servers.

Auto Scale

To deploy to your Scaling Group:

    rack_autoscale %w{app web}, 'mygroup'

rack_autoscale() function supports the following ordered parameters:

Optional Connection Parameters

Key Description
connect_timeout Connection timeout (default: 60 seconds)
read_timeout Read timeout for connection (default: 60 seconds)
write_timeout Write timeout for connection (default: 60 seconds)
proxy Proxy for HTTP and HTTPS connections
ssl_ca_path Path to SSL certificate authorities
ssl_ca_file SSL certificate authority file
ssl_verify_peer SSL verify peer (default: true)

Contributing

Bug reports, Pull requests and Stars are always welcome. For bugs and feature requests, please create an issue.

License

This gem is available as open source under the terms of the MIT License.