Ask Your Question

What is the meaning behind stdlib::stages?

asked 2013-01-30 17:37:45 -0600

There are run stages defined in the puppetlabs-stdlib module. I was wondering if there were any examples of what types of modules or applications might go in each stage? Right now I put yumrepo configuration, installation of LSB packages, and Puppet configuration in the setup stage and have everything else run in main. What sort of things (like tomcat deployment in setup_app and then WARfile deployment in deploy_app) have you done with the stdlib run stages?

The high level stages are (in order):

 * setup
 * main
 * runtime
 * setup_infra
 * deploy_infra
 * setup_app
 * deploy_app
 * deploy
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-30 21:23:46 -0600

nanliu gravatar image

updated 2013-01-30 21:26:12 -0600

TLDR, the benefits of stages are limited and there are few appropriate usages. Maybe 'setup' stage for repos, but I would not touch any of the other stages.

The problem with using stages is it dramatically complicates dependency. If class tomcat is in stage main (the default), I can easily specify Class['tomcat'] <- Class['myapp'], However if class tomcat is in 'setup_app' stage, that dependency will fail, because class myapp defaults in stage main which comes before 'setup_app' stage. I'm not aware of any Puppet Labs module that uses stdlib::stages.

edit flag offensive delete link more


Could stages be used to upgrade the puppet client on the node, before a full run is started?

Martijn Heemels gravatar imageMartijn Heemels ( 2013-03-10 19:21:22 -0600 )edit

You'll run into issues since puppet will term itself. I would suggest upgrades done cleanly in a separate environment. See

nanliu gravatar imagenanliu ( 2013-04-05 15:28:53 -0600 )edit

Thanks nanliu. That sounds doable, and is actually a reasonably clean solution.

Martijn Heemels gravatar imageMartijn Heemels ( 2013-04-13 15:53:28 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-30 17:37:45 -0600

Seen: 563 times

Last updated: Jan 30 '13