What is the best way to update files on nodes using chef? -


i have file in chef recipe , on node configure chef. want if file modify automatically changes in configured node using chef.

my approach is, make recipe , put file in template folder , put recipe in runlist of nodes. cron scheduled chef-client on nodes. when files updated , recipe uploaded on server, files on nodes update. other approach more efficiently.

is possible without cron.

eg. chef server if file modify in recipe.

it depends - always.

  • you can use remote_file resource download files remote locations (e.g. via http). way, chef can automatically deploy updated files, if replace on source server.

  • you can use use git or deploy resources deploy files git repository. way, update git repo , chef update node new content.

but either way, chef-client changes during chef run. can trigger through cron or run chef service. triggering chef-client run automatically, either kick-off chef-client via ssh (e.g. automated jenkins server) or might give chef's push jobs try.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -