Book Image

Managing Windows Servers with Chef

By : John Ewart
Book Image

Managing Windows Servers with Chef

By: John Ewart

Overview of this book

<p>This book begins with an introduction to the functionality and benefits of using Chef to manage Windows systems. From there, you are shown an overview of the Chef architecture and how to prepare a Windows host so that it can be managed by Chef, followed by an example of writing code to install a popular .NET application with Chef.<br /><br />This book looks at how Windows system administrators can effectively leverage Chef as an automated system management tool to simplify their lives through managed infrastructure. Included are practical examples that will help you to understand how to take advantage of Chef when managing your infrastructure.<br /><br />By the end of the book, you will be able to deploy software, provision hosts (including cloud servers), develop and test recipes for multiple platforms, and manage Windows hosts using the powerful tools that Chef provides.</p>
Table of Contents (13 chapters)

Interacting with the Windows Registry


One of the most well-known differences between managing UNIX-like systems and Windows systems is the Windows Registry. Chef has resources for creating, modifying, and deleting Windows Registry keys. Beware that these operations are nonreversible (there is no implicit backup of values, so it may be worth preparing a backup before modifying values), and that they can potentially be very destructive.

Paths to registry keys must also include the registry hive. The hive can be fully specified or we could use the following abbreviations:

  • HKLM for HKEY_LOCAL_MACHINE

  • HKCC for HKEY_CURRENT_CONFIG

  • HKCR for HKEY_CLASSES_ROOT

  • HKU for HKEY_USERS

  • HKCU for HKEY_CURRENT_USER

Tip

Chef 10.x uses a resource named windows_registry, which will be described here for those using an older Chef client and server. For newer install versions using 11.x, the resource is registry_key and is the preferred way to interact with Registry values when using a newer version of Chef....