InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What’s The Value Of Local Development Using Test Kitchen? |
|
Answer» Local development with Test Kitchen:
Local development with Test Kitchen: |
|
| 2. |
Create A Second Node And Apply The Awesome Customers Cookbook To It. How Long Does It Take? |
|
Answer» 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:
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: |
|
| 3. |
What Would You Set Your Cookbook’s Version To Once It’s Ready To Use In Production? |
|
Answer» 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. 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. |
|
| 4. |
How Do You Apply An Updated Cookbook To Your Node? |
|
Answer» 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. <html> <body> <h1>hello from <%= node [‘fqdn’] %>< /h1> <pre> <%= node [‘hostname’] %> <%= node [‘platform’] %> – <%= node[‘platform_version’] %> <%= node [‘memory’][‘total’] %> RAM <%= node [‘cpu’][‘total’] %> CPUs </pre> </body> </html> Then upload your cookbook and run it on 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. <html> <body> <h1>hello from <%= node [‘fqdn’] %>< /h1> <pre> <%= node [‘hostname’] %> <%= node [‘platform’] %> – <%= node[‘platform_version’] %> <%= node [‘memory’][‘total’] %> RAM <%= node [‘cpu’][‘total’] %> CPUs </pre> </body> </html> Then upload your cookbook and run it on your node. |
|
| 5. |
What Is The Command You Use To Upload A Cookbook To The Chef Server? |
|
Answer» Knife cookbook upload. |
|
| 6. |
Which Of The Following Lets You Verify That Your Node Has Successfully Bootstrapped? |
| Answer» | |
| 7. |
What Happens During The Bootstrap Process? |
|
Answer» 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. 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. |
|
| 8. |
What Information Do You Need To In Order To Bootstrap? |
|
Answer» You need:
You need: |
|
| 9. |
What’s The Role Of The Starter Kit? |
|
Answer» The Starter KIT provides CERTIFICATES and other files that enable you to SECURELY communicate with the Chef SERVER. The Starter Kit provides certificates and other files that enable you to securely communicate with the Chef server. |
|
| 10. |
What Are The Two Ways To Set Up A Chef Server? |
Answer»
|
|
| 11. |
What’s The Run-list? |
|
Answer» 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. 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. |
|
| 12. |
How Does Chef-apply Differ From Chef-client? |
|
Answer» 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. 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. |
|
| 13. |
How Does A Cookbook Differ From A Recipe? |
|
Answer» 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. 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. |
|
| 14. |
Write A Service Resource That Stops And Then Disables The Httpd Service From Starting When The System Boots? |
| Answer» | |
| 15. |
What Happens When You Don’t Specify A Resource’s Action? |
|
Answer» When you don’t SPECIFY a RESOURCE’s action, Chef APPLIES the DEFAULT action. When you don’t specify a resource’s action, Chef applies the default action. |
|
| 16. |
What Is A Recipe? |
|
Answer» 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:
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: |
|