官术网_书友最值得收藏!

Chapter 1. Introduction to the Chef Ecosystem

Chef is a configuration management system written partly in Ruby and Erlang.

Before we begin our exciting journey towards becoming Chef masters, I think it would be prudent on our part to understand the underlying ecosystem.

The Chef ecosystem is primarily comprised of the following components:

  • WebUI: This is a Rails application that is used to view information about the Chef server over the Web.
  • ErChef: Prior to version 11.x, the Chef server API core (the code responsible for catering to requests by Knife or chef-client) was written in Ruby. However, since 11.x, this code has been rewritten in Erlang.
  • Bookshelf: This is used to store cookbooks content such as files, templates, and so on, that have been uploaded to chef-server as part of a cookbook version.
  • chef-solr: This is a wrapper around Apache Solr and is used to handle the REST API for indexing and search.
  • Rabbit MQ: This is used as a message queue for the Chef server. All items that are to be added to a search index repository are first added to a queue.
  • chef-expander: This is a piece of code that pulls messages from the RabbitMQ queue, processes them into a desired format, and finally posts them to Solr for indexing.
  • PostgreSQL: This is another major change since version 11.x. Earlier, CouchDB used to be the data storage; however, since version 11.x, PostgreSQL has become the data storage solution used by Chef.
  • chef-client: This is a Ruby application that runs on every machine that needs to be provisioned. It handles the task of authenticating with chef-server, registering nodes, synchronizing cookbooks, compiling resource collections, handling exceptions and notifications, and so on.
  • Knife: This is a Ruby application that provides an interface between a local chef repository and the Chef server.

The typical architecture of the Chef ecosystem can be understood by looking at the following figure:

Other than these components, we've chef-shell (shef), Ohai, and chef-solo that form an integral part of the chef ecosystem. We also have chef-zero, which is being adopted by people to quickly test their code or deploy chef code locally. It's a small, fast, and in-memory implementation of the Chef server and it helps developers to write a clean code without all the hooks that were earlier placed into the code to ensure that chef-solo can execute the code.

With the understanding of the Chef ecosystem, we will be covering the following topics in this chapter:

  • Different modes of running Chef
  • Terminology used in the world of Chef
  • The anatomy of a Chef run
  • Using the Chef Solo provisioner
  • Setting up a work environment
主站蜘蛛池模板: 报价| 古浪县| 昔阳县| 宁城县| 安徽省| 泌阳县| 百色市| 新野县| 蒙阴县| 青田县| 巨野县| 民权县| 玛曲县| 陆良县| 舒城县| 夏津县| 凤台县| 化德县| 剑河县| 阳信县| 屏东市| 襄樊市| 介休市| 郑州市| 东方市| 甘肃省| 通山县| 芜湖县| 湘潭县| 都匀市| 玉树县| 辽源市| 普宁市| 舟曲县| 三门县| 克东县| 安丘市| 双流县| 鲁甸县| 沙雅县| 土默特左旗|