Aravind Valluru
2013-Nov-20 14:18 UTC
[Puppet Users] Want to restrict puppet module execute every 30mins
Hi, I have created a puppet module that performs below steps: 1. stop application service 2. take backup of existing application 3. download application artifact 4. install the application 5. some configuration stuff 6. start the application service Since the agent will poll the master every 30mins all these steps are executed every 30mins which I do not want. I want to enforce the puppet module execution only upon module change. Can I possibly do that? If not how can resolve this situation? Thanks Aravind -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/32dc1990-2593-4817-8841-30ab1cab55e0%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Sergey Arlashin
2013-Nov-20 16:08 UTC
Re: [Puppet Users] Want to restrict puppet module execute every 30mins
You can create some sort of a trigger file. Like this: file { "/some/folder/file_trigger" ensure => present, content => "version01", … } Add "refreshonly => true" to your resources. Then subscribe your resources to this file. Once the file is changed, your code will be executed. -- Best regards, Sergey Arlashin On Nov 20, 2013, at 6:18 PM, Aravind Valluru <aravind.valluru@pearson.com> wrote:> Hi, > > I have created a puppet module that performs below steps: > > 1. stop application service > 2. take backup of existing application > 3. download application artifact > 4. install the application > 5. some configuration stuff > 6. start the application service > > Since the agent will poll the master every 30mins all these steps are executed every 30mins which I do not want. > I want to enforce the puppet module execution only upon module change. Can I possibly do that? > If not how can resolve this situation? > > Thanks > Aravind > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/32dc1990-2593-4817-8841-30ab1cab55e0%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/24A5F54F-71F2-499B-A943-7138D5580FB6%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Felix Frank
2013-Nov-21 10:56 UTC
Re: [Puppet Users] Want to restrict puppet module execute every 30mins
Hi, this would even work, but I think the approach as a whole is not well in line with puppet''s philosophy. Application deployment is not among its core strengths. If you really want to do this by puppet, I suggest you keep it simple: 1. perform all your steps in one monolithic script 2. have puppet deploy the script and execute it 3. give puppet the ability to determine if the script needs running, typically by first comparing the deployed version to the desired one, e.g. $version = "0.2-5" exec { "deploy-app --version=${version}": unless => deploy-app --check --version=${version}" ... } HTH, Felix On 11/20/2013 05:08 PM, Sergey Arlashin wrote:> You can create some sort of a trigger file. Like this: > file { "/some/folder/file_trigger" > ensure => present, > content => "version01", > … > } > > Add "refreshonly => true" to your resources. Then subscribe your > resources to this file. Once the file is changed, your code will be > executed. > 1. stop application service > 2. take backup of existing application > 3. download application artifact > 4. install the application > 5. some configuration stuff > 6. start the application service-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/528DE6C9.3020507%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/groups/opt_out.