The chef-client can be installed on machines running Microsoft Windows in the following ways:
To run the chef-client at periodic intervals (so that it can check in with the Chef server automatically), configure the chef-client to run as a service or as a scheduled task. (The chef-client can be configured to run as a service during the setup process.)
The knife windows subcommand is used to configure and interact with nodes that exist on server and/or desktop machines that are running Microsoft Windows. Nodes are configured using Windows Remote Management, which allows native objects—batch scripts, Windows PowerShell scripts, or scripting library variables—to be called by external applications.
For more information about the knife windows plugin, see knife windows.
Windows Remote Management requires that a target node be accessible via the ports configured to support access via HTTP or HTTPS.
Msiexec.exe is used to install the chef-client on a node as part of a bootstrap operation. The actual command that is run by the default bootstrap script is:
$ msiexec /qn /i "%LOCAL_DESTINATION_MSI_PATH%"
where /qn is used to set the user interface level to “No UI”, /i is used to define the location in which the chef-client is installed, and "%LOCAL_DESTINATION_MSI_PATH%" is a variable defined in the default windows-chef-client-msi.erb bootstrap template. See http://msdn.microsoft.com/en-us/library/aa367988%28v=vs.85%29.aspx for more information about the options available to Msiexec.exe.
The ADDLOCAL parameter adds two setup options that are specific to the chef-client. These options can be passed along with an Msiexec.exe command:
|ChefClientFeature||Use to install the chef-client.|
|ChefServiceFeature||Use to configure the chef-client as a service in Microsoft Windows.|
First install the chef-client, and then enable it to run as a service. For example:
$ msiexec /qn /i C:\inst\chef-client-11.8.0-1.windows.msi ADDLOCAL="ChefClientFeature,ChefServiceFeature"
A Microsoft Installer Package (MSI) is available for installing the chef-client on a Microsoft Windows machine.
To install the chef-client on Microsoft Windows, do the following:
Click the Chef Client tab.
Select Windows, a version, and an architecture.
Under Downloads, select the version of the chef-client to download, and then click the link that appears below to download the package.
Ensure that the MSI is on the target node.
Run the MSI package and use all the default options:
The chef-client must be run as a service for it to be able to regularly check in with the Chef server. Select the Chef Client Service option to have the MSI configure the chef-client as a service.
To run the chef-client at periodic intervals (so that it can check in with the Chef server automatically), configure the chef-client to run as a service or as a scheduled task. This can be done via the MSI, by selecting the Chef Client Service option on the Custom Setup page or by running the following command after the chef-client is installed:
$ chef-service-manager -a install
After the chef-client is configured to run as a service, the default file path is: c:\chef\chef-client.log.
Many organizations already have processes in place for managing the applications and settings on various Microsoft Windows machines. For example, System Center. The chef-client can be installed using this method.
On Microsoft Windows, the chef-client must have two entries added to the PATH environment variable:
This is typically done during the installation of the chef-client automatically. If these values (for any reason) are not in the PATH environment variable, the chef-client will not run properly.