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)

Chef's declarative language


Chef recipes are declarative, which means that it provides a high-level language for describing what to do to accomplish the task at hand without requiring that you provide a specific implementation or procedure. This means that you can focus on building recipes and modeling infrastructure using abstract resources so that it is clear what is happening without having to know how it is happening. Take, as an example, a portion of the recipes we looked at earlier for deploying an IIS application that is responsible for installing some Windows features:

features = %w{IIS-ISAPIFilter IIS-ISAPIExtensions
              NetFx3ServerFeatures NetFx4Extended-ASPNET45
              IIS-NetFxExtensibility45}

features.each do |f|
  windows_feature f do
    action :install
  end
end

Because of Chef's declarative language, the preceding section of code reads in a natural way. We have a list of features. For each of those features, which we know to be Windows features, install...