Module: Sprinkle::Deployment

Included in:
Object
Defined in:
lib/sprinkle/deployment.rb

Overview

Deployment blocks specify deployment specific information about a sprinkle script. An example:

deployment do
  # mechanism for deployment
  delivery :capistrano do
    recipes 'deploy'
  end

  # source based package installer defaults
  source do
    prefix   '/usr/local'
    archives '/usr/local/sources'
    builds   '/usr/local/build'
  end
end

What the above example does is tell sprinkle that we will be using capistrano (Sprinkle::Actors::Capistrano) for deployment and everything within the block is capistrano specific configuration. For more information on what options are available, check the corresponding Sprinkle::Actors doc page.

In addition to what delivery mechanism we're using, we specify some configuration options for the "source" command. The only things configurable, at this time, in the deployment block other than the delivery method are installers. If installers are configurable, they will say so on their corresponding documentation page. See Sprinkle::Installers

Only one deployment block is on any given sprinkle script

Defined Under Namespace

Classes: Deployment

Instance Method Summary (collapse)

Instance Method Details

- (Object) deployment(&block)

The method outlined above which specifies deployment specific information for a sprinkle script. For more information, read the header of this module.



36
37
38
# File 'lib/sprinkle/deployment.rb', line 36

def deployment(&block)
  @deployment = Deployment.new(&block)
end