Created
January 30, 2012 23:30
-
-
Save techieBrandon/1707502 to your computer and use it in GitHub Desktop.
Node PP
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
node basenode { | |
# include redis | |
# include resque | |
# include mysql | |
# include apache2 | |
# include solr | |
# include embedded_jira | |
# include monit | |
# include sauce | |
} | |
node 'puppet-target.secret.net' inherits basenode { | |
stage { | |
"prior_release_cleanup": ; | |
"pre_release_migrator": ; | |
"release_migrator": ; | |
"post_release_migrator": ; | |
"release_final": ; | |
"postmortem": ; | |
} | |
class { | |
["monit::cleaner"]: stage => "prior_release_cleanup"; | |
["mysql", "apache2", "redis", "solr", "resque", "embedded_jira", "monit"]: stage => "pre_release_migrator"; | |
["sauce"]: stage => "release_migrator"; | |
} | |
Stage["prior_release_cleanup"] -> Stage["pre_release_migrator"] -> Stage["release_migrator"] -> Stage["post_release_migrator"] -> Stage["release_final"] -> Stage | |
} |
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
class cleaner { | |
#remove file from 2.0.2 naming conventions | |
file {'/etc/monit/conf.d/sauce': | |
path => '/etc/monit/conf.d/sauce', | |
ensure => absent, | |
before => Service['monit_2.0.2'], | |
tag => ['2.0.2_cleanup', 'cleanup'], | |
} | |
#remove file from 2.0.3.[1..3] naming conventions | |
file {'/etc/monit/conf.d/sauce2.0.3': | |
path => '/etc/monit/conf.d/sauce2.0.3', | |
ensure => absent, | |
before => Service['monit_2.0.3..2'], | |
tag => ['2.0.3_cleanup', '2.0.3.1_cleanup', '2.0.3.2_cleanup', 'cleanup'], | |
} | |
service {['monit_2.0.2', 'monit_2.0.3..2']: | |
provider => 'init', | |
path => '/etc/init.d/monit', | |
ensure => 'stopped', | |
} | |
} |
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
class monit { | |
include monit::params | |
include monit::cleaner | |
$version = $monit::params::version | |
...boring stuff that works... | |
} |
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
bwilburn@puppetmaster:~$ ls /etc/puppet/modules/monit/manifests/ | |
cleaner.pp init.pp monit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment