[Introduction to Chef, the automated deployment framework]

Whether you have five or five thousand servers, Chef lets you manage them all by turning infrastructure into code. Infrastructure described as code is flexible, versionable, human-readable, and testable. Whether your infrastructure is in the cloud, on-premises or in a hybrid environment, you can easily and quickly adapt to your business's changing needs with Chef.



 

 

 

hef is a server composition management tool developed by Ruby. Chef is an automated deployment framework, and Cookbook is one of the core parts of its entire framework. Chef is mainly divided into three parts Chef Server, Workstation and Chef Client. With the popularity of DevOps, more and more jobs are being automated. When building a large-scale IT architecture, system administrators need to work around the clock to install and configure servers, adjust various parameters, etc. until the emergence of Chef, which frees system administrators from this dire work, they only need to write Chef script that describes the state the server needs to maintain, then runs the script and the server is configured. With the popularity of DevOps, more and more jobs are being automated. When building a large-scale IT architecture, system administrators need to work around the clock to install and configure servers, adjust various parameters, etc. until the emergence of Chef, which frees system administrators from this dire work, they only need to write Chef script that describes the state the server needs to maintain, then runs the script and the server is configured.

 

Cookbook is mainly divided into the following components:

Recipe is used to define the entire operation of deploying to a target machine, such as how to install, which packages to install, how to configure and so on.

Attribute is used to define the attribute value of a target machine. Similar to defining a global variable, it is usually used to provide property values ​​to other components of the Cookbook.

File is the file used for deployment. Generally, different file configurations are defined according to the operating system, platform, etc.

Library is used to extend the functionality of Cookbook. We can write our own classes in Ruby language for Recipe to call.

Resource is used to customize the running rules of a state. For example, when targeting services, we can define several different state rules.

Provider is used to define the execution content of a specific Resource. From a programming point of view, it can be understood that an interface is defined for Resource, and Provider is the implementation of this interface.

Template Some files with embedded Ruby tags, usually used to define configuration files.

Metadata defines the attribute values ​​of the Cookbook, such as the current Cookbook version, supported platforms, dependencies on other Cookbooks and other information.



 

 

Chef is a system integration framework that provides configuration management capabilities for the entire architecture. With Chef you can:

 

1)Manage your servers by writing code, not by running commands. (via Cookbooks)

2)Integrate tightly with your applications, databases, LDAP  directories, and more. (via Libraries)

3)Easily configure applications that require knowledge about your  entire infrastructure ("What systems are running my application?"  "What  is the current master database server?")

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326688093&siteId=291194637