summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/stages.pp45
2 files changed, 46 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a3f2406..c804568 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -13,5 +13,6 @@
# [Remember: No empty lines between comments and class definition]
class stdlib {
+ class { 'stdlib::stages': }
}
diff --git a/manifests/stages.pp b/manifests/stages.pp
index e69de29..19cee6b 100644
--- a/manifests/stages.pp
+++ b/manifests/stages.pp
@@ -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'] }
+
+}