Chef

chef-server-ctl

The open source server includes a command-line utility named chef-server-ctl, which is used to start and stop individual services, reconfigure the server, and tail server log files.

Options

This command has the following syntax:

chef-server-ctl OPTION

This command has the following options:

help
Shows help for the command.
reconfigure
Use to reconfigure the server. This option will read from the /etc/chef-server/chef-server.rb file and apply that configuration to the server. Any time changes are made to the chef-server.rb file, the chef-server-ctl command should be run with this option.
restart [SERVICE_NAME]
Use to restart all enabled services or to restart a single service.
start [SERVICE_NAME]
Use to start all enabled services or to start a single service.
status [SERVICE_NAME]
Use to view the status of all services or to view the status of a single service.
stop [SERVICE_NAME]
Use to stop all enabled services or to stop a single service.
tail [SERVICE_NAME]
Use to follow the server logs for all services or for a single service.
test --all
Use to execute chef-pedant, an integration test suite for the server installation. By default, only a subset of the available test are run. Add the --all flag to run the full test suite.

Examples

The following examples show how to use chef-server-ctl to manage services.

View the status of a service

$ ctl-chef-server status name_of_service

For example, to view the status for a service named erchef, enter:

$ ctl-chef-server status erchef

Restart a service

$ ctl-chef-server restart name_of_service

For example, to restart a service named erchef, enter:

$ ctl-chef-server restart erchef

Restart all services

$ ctl-chef-server restart