Hi, Is it nesseccary to access the client machine and execute the agent command manually to take in configuration ? or if the agent can know itsself that the server has some changes for it !! secondly, can''t we have agent''s logs/status of taking in changes/configurations ? I am using open source puppet master ! Adeel -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
You can use splay to schedule agent run and yes, you can view agent run / changes status in /var/log/messages. http://docs.puppetlabs.com/references/latest/configuration.html#splay -V On Mon, Sep 16, 2013 at 4:27 PM, Adeel Bhatti <adeelarifbhatti@gmail.com>wrote:> Hi, > Is it nesseccary to access the client machine and execute the agent > command manually to take in configuration ? or if the agent can know > itsself that the server has some changes for it !! > > secondly, can''t we have agent''s logs/status of taking in > changes/configurations ? > I am using open source puppet master ! > > Adeel > > -- > 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 post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Hi, Could we not run the agent command from the server ? The point is if I have the access the client after changing the configuration on puppet master it would be tedious ! BTW, Puppet master Enterprise server functions the same way or it provides this funtionality ? Adeel On Monday, September 16, 2013 2:10:51 PM UTC+2, tujwww wrote:> > You can use splay to schedule agent run and yes, you can view agent run / > changes status in /var/log/messages. > > http://docs.puppetlabs.com/references/latest/configuration.html#splay > > -V > > > On Mon, Sep 16, 2013 at 4:27 PM, Adeel Bhatti <adeelar...@gmail.com<javascript:> > > wrote: > >> Hi, >> Is it nesseccary to access the client machine and execute the agent >> command manually to take in configuration ? or if the agent can know >> itsself that the server has some changes for it !! >> >> secondly, can''t we have agent''s logs/status of taking in >> changes/configurations ? >> I am using open source puppet master ! >> >> Adeel >> >> -- >> 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...@googlegroups.com <javascript:>. >> To post to this group, send email to puppet...@googlegroups.com<javascript:> >> . >> Visit this group at http://groups.google.com/group/puppet-users. >> 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Hi Adeel, First time you have to access the puppet agent and do the certificate generation and signing on puppet master. After that you can set the runinterval parameter in pupet.conf file( puppet agent request the puppet master manifests at defined time interval). This will automatically request the manifests from puppet master continuously. puppet.conf ---------------- runinterval =XX (default 30 minute) This setting can be a time interval in seconds(30 or 30s), minutes (30m), hours (6h), days (2d), or year (5y). For the report or status refer files present in /var/lib/puppet/state directory. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Monday, September 16, 2013 4:27:54 PM UTC+5:30, Adeel Bhatti wrote:> > Hi, > Is it nesseccary to access the client machine and execute the agent > command manually to take in configuration ? or if the agent can know > itsself that the server has some changes for it !! > > secondly, can''t we have agent''s logs/status of taking in > changes/configurations ? > I am using open source puppet master ! > > Adeel > >-- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Thanks for your reply ! This would be really cool if the agent can look and identify the manifect changes ! I have a service restart in my class, so I want to execute that only if there is some change in the configuration/manifest ! Regards Adeel On Monday, September 16, 2013 2:20:24 PM UTC+2, Rahul Khengare wrote:> > Hi Adeel, > First time you have to access the puppet agent and do the certificate > generation and signing on puppet master. > After that you can set the runinterval parameter in pupet.conf file( > puppet agent request the puppet master manifests at defined time interval). > This will automatically request the manifests from puppet master > continuously. > > puppet.conf > ---------------- > runinterval =XX (default 30 minute) > > This setting can be a time interval in seconds(30 or 30s), minutes (30m), > hours (6h), days (2d), or year (5y). > > For the report or status refer files present in /var/lib/puppet/state > directory. > > Thanks and Regards, > Rahul Khengare, > NTT DATA OSS Center, Pune, India. > > > On Monday, September 16, 2013 4:27:54 PM UTC+5:30, Adeel Bhatti wrote: >> >> Hi, >> Is it nesseccary to access the client machine and execute the agent >> command manually to take in configuration ? or if the agent can know >> itsself that the server has some changes for it !! >> >> secondly, can''t we have agent''s logs/status of taking in >> changes/configurations ? >> I am using open source puppet master ! >> >> Adeel >> >>-- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Adeel, This is already how puppet operates by default if your manifest is written correctly. You should not be explicitly telling puppet to restart your service each time the agent runs. Instead, you should create a dependency relationship between the service and its configuration file (and even its package). For example, the following code ties together three resource types into one class: class webserver { package { ''httpd'': ensure => installed, } file { ''/etc/httpd/conf/httpd.conf'': owner => ''root'', group => ''root'', mode => ''0644'', require => Package[''httpd''], } service { ''httpd'': ensure => running, enable => true, hasstatus => true, hasrestart => true, subscribe => File[''/etc/httpd/conf/httpd.conf''], } } Notice how the file resource requires the package resource, and the service resource subscribes to the file resource. This sets up a logical dependency chain. That the httpd service subscribes to the httpd.conf configuration file is particularly important, because this is what tells puppet that it should restart the httpd service any time it notices and copies over a changed httpd.conf file. An exec resource containing a "service httpd restart" command is not required. -- Peter Bukowinski On Sep 16, 2013, at 8:40 AM, Adeel Bhatti <adeelarifbhatti@gmail.com> wrote:> Thanks for your reply ! > This would be really cool if the agent can look and identify the manifect changes ! > I have a service restart in my class, so I want to execute that only if there is some change in the configuration/manifest ! > Regards > Adeel > > > > On Monday, September 16, 2013 2:20:24 PM UTC+2, Rahul Khengare wrote: > Hi Adeel, > First time you have to access the puppet agent and do the certificate generation and signing on puppet master. > After that you can set the runinterval parameter in pupet.conf file( puppet agent request the puppet master manifests at defined time interval). > This will automatically request the manifests from puppet master continuously. > > puppet.conf > ---------------- > runinterval =XX (default 30 minute) > > This setting can be a time interval in seconds(30 or 30s), minutes (30m), hours (6h), days (2d), or year (5y). > > For the report or status refer files present in /var/lib/puppet/state directory. > > Thanks and Regards, > Rahul Khengare, > NTT DATA OSS Center, Pune, India. > > > On Monday, September 16, 2013 4:27:54 PM UTC+5:30, Adeel Bhatti wrote: > Hi, > Is it nesseccary to access the client machine and execute the agent command manually to take in configuration ? or if the agent can know itsself that the server has some changes for it !! > > secondly, can''t we have agent''s logs/status of taking in changes/configurations ? > I am using open source puppet master ! > > Adeel > > > -- > 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 post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On Monday, September 16, 2013 7:40:35 AM UTC-5, Adeel Bhatti wrote:> > Thanks for your reply ! > This would be really cool if the agent can look and identify the manifect > changes ! > I have a service restart in my class, so I want to execute that only if > there is some change in the configuration/manifest ! > Regards > Adeel > >Puppet can do that. See below. In answer to your original question, it is usual for each Puppet client to run the agent on a regular schedule, either using its built-in daemon mode (i.e. running it as a service) or via an external scheduler, such as cron. That way there is no need to touch individual clients to roll out configuration changes -- it is sufficient to change the manifests and/or data on the master. It is important to understand that Puppet is a state management service, not a script engine. The distinction shows up here in that the Puppet agent''s normal behavior is to check the properties of each managed resource, and to apply only those changes needed to put it into the target state. Resources that are already in the target state are not changed in any way. Thus, whenever the agent modifies a resource, such as a service''s configuration file, it constitutes a genuine change. Puppet has a mechanism for notifying resources about such changes in other resources, and it is particularly well supported for exactly the situation you describe: restarting services when their configuration changes. It can look like this: file { ''/etc/myservice.conf'': ensure => ''file'', content => template(''myservice.conf.tmpl''), # ... } service { ''myservice'': enable => true, ensure => running, subscribe => File[''/etc/myservice.conf''] } The magic is in the ''subscribe'' parameter. It says that the service needs to be "refreshed" if the agent applies any changes to the referenced file resource. The meaning of "refresh" varies by resource type, but for services it means to restart the service. John -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Thanks !! :) On Monday, September 16, 2013 4:12:44 PM UTC+2, jcbollinger wrote:> > > > On Monday, September 16, 2013 7:40:35 AM UTC-5, Adeel Bhatti wrote: >> >> Thanks for your reply ! >> This would be really cool if the agent can look and identify the manifect >> changes ! >> I have a service restart in my class, so I want to execute that only if >> there is some change in the configuration/manifest ! >> Regards >> Adeel >> >> > > Puppet can do that. See below. > > In answer to your original question, it is usual for each Puppet client to > run the agent on a regular schedule, either using its built-in daemon mode > (i.e. running it as a service) or via an external scheduler, such as cron. > That way there is no need to touch individual clients to roll out > configuration changes -- it is sufficient to change the manifests and/or > data on the master. > > It is important to understand that Puppet is a state management service, > not a script engine. The distinction shows up here in that the Puppet > agent''s normal behavior is to check the properties of each managed > resource, and to apply only those changes needed to put it into the target > state. Resources that are already in the target state are not changed in > any way. > > Thus, whenever the agent modifies a resource, such as a service''s > configuration file, it constitutes a genuine change. Puppet has a > mechanism for notifying resources about such changes in other resources, > and it is particularly well supported for exactly the situation you > describe: restarting services when their configuration changes. It can > look like this: > > file { ''/etc/myservice.conf'': > ensure => ''file'', > content => template(''myservice.conf.tmpl''), > # ... > } > > service { ''myservice'': > enable => true, > ensure => running, > subscribe => File[''/etc/myservice.conf''] > } > > The magic is in the ''subscribe'' parameter. It says that the service needs > to be "refreshed" if the agent applies any changes to the referenced file > resource. The meaning of "refresh" varies by resource type, but for > services it means to restart the service. > > > John > >-- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.