Chef daemon running every 30 minutes -
i understand chef pull based in sense detects changes in recipes , uses chef client install changes. utilize chef bring ec2 instances chef-client runs daemon every 30 minutes , runs recipes 1 time again causing unwanted changes services. know options there alter , run chef-client on on demand basis.
following options have thought of far,
change interval time on chef-client cookbook high time daemon no run often. after ec2 instance deployed kill chef daemon ssh or maybe chef-recipe.also believe chef-client has log rotation scheduled on weekly basis, 1 time again restart chef-client. ideas on how avoid pull based behavior ?
first of all:
your chef recipes should set node in 1 , same configuration, no matter how many times chef run. should never restart service on own. behaviour should notified config files, if changed. example:
service 'apache2' action [:enable, :start] end template '/etc/apache2/httpd.conf' action :create [...] notifies, :restart, 'service[apache2]' #this notification launch, if file has changed end
you can disable chef-client daemon, running chef-client --once
. way chef provision node , remove self cron. in future run manually on demand.
but bigger problem chef-client run causes changes of services every run. should solve first.
chef
No comments:
Post a Comment