Chef Flashcards
What is configuration management? What are the benefits of configuration management?
Configuration management covers a set of practices for managing hardware, software, and infrastructure. Configuration management ensures consistent environments when managing large infrastructures in teams of multiple system administrators. Configuration management provides systematic and autonomous approaches to managing infrastructure.
What is Chef?
“Chef is an automation platform that configures and manages your infrastructure whether it is on-premises or in the cloud. You can deploy to the infrastructure type that makes the most sense for your business. You can use Chef to speed up application deployment, even creating a continual deployment pipeline. The key to Chef’s power is that it turns infrastructure into code. Infrastructure as code means that your computing environment has some of the same attributes as your application: ◦ Your infrastructure is versionable. ◦ Your infrastructure is repeatable. ◦ Your infrastructure is testable. “
What is a recipe?
A recipe is a collection of resources that describes a particular configuration or policy. A recipe describes everything that is required to configure part of a system. Recipes do things, such as install and configure software components, manage files, deploy applications, and execute other recipes.
What is a resource?
A resource represents a piece of infrastructure and its desired state, such as a package that should be installed, a service that should be running, or a file that should be generated.
What is a cookbook? How is it different from a recipe?
A recipe is a collection of resources, and typically configures a software package or some piece of infrastructure. A cookbook groups together recipes and other information in a way that is more manageable than having just recipes alone.
What is the difference between chef-client and chef-apply commands?
chef-apply applies a single recipe; chef-client applies a cookbook.
What is a Chef server? What are the ways to setup a Chef server?
The Chef server acts as a hub for configuration data. The Chef server stores cookbooks, the policies that are applied to nodes, and metadata that describes each registered node that is being managed by the chef-client. Nodes use the chef-client to ask the Chef server for configuration details, such as recipes, templates, and file distributions. You can install an instance on your own infrastructure or use hosted Chef
What is the purpose of the Chef Starter Kit?
The Starter Kit provides certificates and other files that enable you to securely communicate with the Chef server.
What is a node?
A node represents a server and is typically a virtual machine, container instance, or physical server – basically any compute resource in your infrastructure that’s managed by Chef.
How can you bootstrap a node?
knife bootstrap (ip_address) (options…)
What is the knife command?
Knife command enables you to communicate with the Chef server (i.e. bootstrapping nodes, uploading cookbooks, etc)
What is a run-list?
The run-list lets you specify which recipes to run, and the order in which to run them. The run-list is important for when you have multiple cookbooks, and the order in which they run matters.
What information do you need in order to bootstrap a node?
“You need your node’s host name or public IP address and a user name and password you can log on to your node with. Alternatively, you can use key-based authentication instead of providing a user name and password. “
What happens during the bootstrap process?
During the bootstrap process, the node downloads and installs chef-client, registers itself with the Chef server, and does an initial checkin. During this checkin, the node applies any cookbooks that are part of its run-list.
How can you check if the bootstrap process was successful?
“◦ The Chef management console ◦ knife node list ◦ knife node show”