Skip to content

Commit

Permalink
Add standard set of run stages.
Browse files Browse the repository at this point in the history
Many modules I'm working on need a standard but
relatively granular location in the catalog.  For example,
any module that configures the packaging system should
run "early"

Add the following stages which have inter-dependencies
in the top to bottom order listed:

 * setup
 * deploy
 * runtime
 * setup_infra
 * deploy_infra
 * main
 * setup_app
 * deploy_app
  • Loading branch information
Jeff McCune committed May 24, 2011
1 parent 6964d13 commit 6f8b78c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
# [Remember: No empty lines between comments and class definition]
class stdlib {

class { 'stdlib::stages': }

}
45 changes: 45 additions & 0 deletions manifests/stages.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Class: stdlib::stages
#
# This class manages a standard set of Run Stages for Puppet.
#
# The high level stages are (In order):
#
# * setup
# * deploy
# * runtime
# * setup_infra
# * deploy_infra
# * main
# * setup_app
# * deploy_app
#
# Parameters:
#
# Actions:
#
# Declares various run-stages for deploying infrastructure,
# language runtimes, and application layers.
#
# Requires:
#
# Sample Usage:
#
# node default {
# include stdlib::stages
# class { java: stage => 'runtime' }
# }
#
class stdlib::stages {

stage { 'setup': before => Stage['deploy'] }
stage { 'deploy': before => Stage['setup_infra'] }
stage { 'runtime':
require => Stage['deploy'],
before => Stage['setup_infra'],
}
stage { 'setup_infra': before => Stage['deploy_infra'] }
stage { 'deploy_infra': before => Stage['main'] }
stage { 'setup_app': require => Stage['main'] }
stage { 'deploy_app': require => Stage['setup_app'] }

}

0 comments on commit 6f8b78c

Please sign in to comment.