Chef Tutorial
Advanced Chef
Chef Useful Resources
Selected Reading
- Chef - Chef-Client Run
- Chef - Nodes
- Testing Cookbook with Test Kitchen
- Chef - ChefSpec
- Chef - Foodcritic
- Chef - Testing Cookbooks
- Chef - Chef-Shell
- Chef - Chef-Client as Daemon
- Chef - Environment
- Chef - Roles
- Chef - Cookbook Dependencies
- Chef - Cookbooks
- Chef - Solo Setup
- Chef - Knife Setup
- Chef - Test Kitchen Setup
- Chef - Client Setup
- Chef - Workstation Setup
- Chef - Version Control System Setup
- Chef - Architecture
- Chef - Overview
- Chef - Home
Advanced Chef
- Chef - Community Cookbooks
- Chef - Files & Packages
- Chef - Blueprints
- Lightweight Resource Provider
- Chef - Resources
- Chef - Cross-Platform Cookbooks
- Chef - Scripts for Data Bags
- Chef - Data Bags
- Chef - Environment Variable
- Chef - Definition
- Chef - Libraries
- Chef - Ruby Gems with Recipes
- Chef - Plain Ruby with Chef DSL
- Chef - Templates
- Dynamically Configuring Recipes
Chef Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Chef - Chef-Client as Daemon
Chef - Chef-Cpent as Daemon
Running Chef-Cpent as daemon helps in knowing the state of all the nodes at any point of time. This help in running the Chef-Cpent at any point of time.
Pre-requisites
The node should be registered with Chef server and it should be running Chef-Cpent without any error.
Chef-Cpent in Daemon Mode
Start Chef-Cpent in daemon mode, running every 30 minutes.
user@server:~$ sudo chef-cpent -i 1800
In the above code, – i enables to run the Chef-Cpent in daemon mode on the required node and 1800 seconds define that the Chef-Cpent daemon should run in every 30 minutes.
Vapdating Daemon Run
Vapdate that the Chef-Cpent is running as a daemon.
user@server:~$ ps auxw | grep chef-cpent
The above command will grep the running daemon process of Chef-Cpent.
Other Ways
Instead of running Chef-Cpent as a daemon, we can run the same as a cron job.
user@server:~$ subl /etc/cron.d/chef_cpent PATH=/usr/local/bin:/usr/bin:/bin # m h dom mon dow user command */15 * * * * root chef-cpent -l warn | grep -v retrying [1234]/5 in
The above cron job will run after every 15 minutes.
Advertisements