Question: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.
Question: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.
- Execute other recipes.
Linux Interview Questions
Question:What Happens When You Don’t Specify A Resource’s Action?
When you don’t specify a resource’s action, Chef applies the default action.
Question:Write A Service Resource That Stops And Then Disables The Httpd Service From Starting When The System Boots?
- Service ‘httpd’ do
- Action [: stop: disable]
Question:How Does A Cookbook Differ 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.
For example, in this lesson you used a template resource to manage your HTML home page from an external file. The recipe stated the configuration policy for your web site, and the template file contained the data. You used a cookbook to package both parts up into a single unit that you can later deploy.
Windows 95 Interview Questions
Question:How Does Chef-apply Differ From Chef-client?
Chef-apply apply a single recipe; chef-client applies a cookbook.
For learning purposes, we had you start off with chef-apply because it helps you understand the basics quickly. In practice, chef-apply is useful when you want to quickly test something out. But for production purposes, you typically run chef-client to apply one or more cookbooks.
Question:What’s The 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.
Windows 10 Tutorial Mac OS X Deployment Interview Questions
Question:What Are The Two Ways To Set Up A Chef Server?
- Install an instance on your own infrastructure.
- Use hosted Chef.
Question:What’s The Role Of The Starter Kit?
The Starter Kit provides certificates and other files that enable you to securely communicate with the Chef server.
Mac OS X TroubleShooting Interview Questions
Question: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.
Question:What Information Do You Need To In Order To Bootstrap?
- Your node’s host name or public IP address.
- 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.
IBM AIX Interview Questions
Question: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 check in. During this check in, the node applies any cookbooks that are part of its run-list.
Linux Interview Questions
Question:Which Of The Following Lets You Verify That Your Node Has Successfully Bootstrapped?
- The Chef management console.
- Knife node list
- Knife node show
- You can use all three of these methods.
Question:What Is The Command You Use To Upload A Cookbook To The Chef Server?
Knife cookbook upload.
Question:How Do You Apply An Updated Cookbook To Your Node?
We mentioned two ways.
Run knife Ssh from your workstation.
SSH directly into your server and run chef-client.
You can also run chef-client as a daemon, or service, to check in with the Chef server on a regular interval, say every 15 or 30 minutes.
Update your Apache cookbook to display your node’s host name, platform, total installed memory, and number of CPUs in addition to its FQDN on the home page.
Update index.html.erb like this.
hello from <%= node [‘fqdn’] %>< /h1>
<%= node [‘hostname’] %>
<%= node [‘platform’] %> – <%= node[‘platform_version’] %>
<%= node [‘memory’][‘total’] %> RAM
<%= node [‘cpu’][‘total’] %> CPUs
Then upload your cookbook and run it on your node.
IBM AIX 7 Administration Interview Questions
Question:What Would You Set Your Cookbook’s Version To Once It’s Ready To Use In Production?
According to Semantic Versioning, you should set your cookbook’s version number to 1.0.0 at the point it’s ready to use in production.
Question:Create A Second Node And Apply The Awesome Customers Cookbook To It. How Long Does It Take?
You already accomplished the majority of the tasks that you need. You wrote the awesome customers cookbook, uploaded it and its dependent cookbooks to the Chef server, applied the awesome customers cookbook to your node, and verified that everything’s working.
All you need to do now is:
- Bring up a second Red Hat Enterprise Linux or Centos node.
- Copy your secret key file to your second node.
- Bootstrap your node the same way as before. Because you include the awesome customers cookbook in your run-list, your node will apply that cookbook during the bootstrap process.
- The result is a second node that’s configured identically to the first one. The process should take far less time because you already did most of the work.
- Now when you fix an issue or add a new feature, you’ll be able to deploy and verify your update much more quickly!
Windows 7 Interview Questions
Question:What’s The Value Of Local Development Using Test Kitchen?
Local development with Test Kitchen:
- Enables you to use a variety of virtualization providers that create virtual machine or container instances locally on your workstation or in the cloud.
- Enables you to run your cookbooks on servers that resemble those that you use in production.
- Speeds up the development cycle by automatically provisioning and tearing down temporary instances, resolving cookbook dependencies, and applying your cookbooks to your instances.
Windows 95 Interview Questions