Difference between chef server versus repo?

I am new to Chef and have successfully configured my three nodes β€” a workstation, a client, and a server. The chef mentions the chef's β€œrepo” and its contents are very similar to the chef's server. What is the difference between them or are they synonyms? I ask because other people in my company who use the chef set up the chef-repo directory for subversion, and this box is different from the chef server I set up. Thanks!

+6
source share
3 answers

They are different.

"Chef Repo" is a collection of "code" - cookbooks, recipes, etc. This is your code base. To draw a parallel, this is the source code that you click on SCM (e.g. GitHub or BitBucket). If you are building a package, it will be a bunch of code.

A chef is, among other things, an artifact store. It contains the final, versioned artifacts (cookbooks) that are packaged from the Chef's Repo. If you are building a package, it will be .deb or .rpm .

Your sites will only contact Chef Server. Thus, the local development that you perform in Chef Mode is not applied until the artifact is packaged and uploaded to the chef's server.

+8
source

What else to say, when sethvargo has already said, let me just go ahead and add my point. In your scenario, you have four machines running, an acutal client that you want to configure through the chef, workstation, chef server, and the chef rehearsal.

  • Workstation: A workstation is the place where you write cooking. Thus, here you will have all of your IDEs, such as RubyMine or VIM or Sublime Text, and will use them to write some recipes to configure your nodes. This is your local machine.

  • Chef Repo: This is a version control system such as github, bitbucket or mercurial. Here you will periodically (read as daily) push code so that you can safely store your code, collaborate with other developers who write code with you, etc. It is either a shared server at work or located on the Internet.

  • Customer. This is the field that you want to customize with the chef. This is the recipient of the software you want to install, or all the interventions that you will take with the infrared system.

  • Chef Server: the cookbooks you have written must be attributed to the customer at any time. So, when the client pulls out the code and executes it.

I hope this is what you wanted to ask.

+1
source

Cook's abstract:

  • A chef repo is a repository structure in which cookbooks are authorized, tested and maintained.

  • Cookbooks contain recipes, attributes, user resources, libraries, definitions, files, templates, tests, and metadata.

  • The repo chef must be synchronized with a version control system (e.g. git) and then managed as if it were the source code.

  • The directory structure in chef-repo varies. Some organizations prefer to keep all their cookbooks in one chef-repo, while other organizations prefer to use a chef repo for each cookbook.

  • Chef's documentation refers to the development machine as a chef workstation. A workstation has one or more repositories for managing infrastructure artifacts and a knife tool for interacting with a chef's server.

  • One (or more) workstations are configured so that users can create, test, and maintain cookbooks. Cookbooks are downloaded to the chef server from the workstation. Some cookbooks are common to the organization and others are based on public cookbooks from the chef's supermarket.

Chef server:

  • The chef's server acts as an information center. Cookbooks and policy settings are uploaded to the Chef server by users from workstations. (Policy settings can also be supported from the Chef server itself, via the chef management console web user interface.)

  • The chef client accesses the chef's server from node, on which it is installed to receive configuration data, search for historical chef-client runs the data, and then pulls the necessary configuration data. After the chef-client completes, downloading the chef-client updated startup data to the Chef server (as an updated node object), downloads the data created in audit mode (to process additional rules from Chef Analytics) and generates reporting data.

  • The Chef Management Console is the user interface for the Chef server. This is used to manage data bags, attributes, launch lists, roles, environments and cookbooks, as well as configure role access for users and groups.

+1
source

Source: https://habr.com/ru/post/971550/


All Articles