forked from puppetlabs/puppetlabs-stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,6 @@ | |
# [Remember: No empty lines between comments and class definition] | ||
class stdlib { | ||
|
||
class { 'stdlib::stages': } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] } | ||
|
||
} |