Chef (software) Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Chef (software) Interview Questions & Answers

Want to stay above on the hog on your Chef software interview, Wisdomjobs Chef software Interview Questions is the solution to solving your interview. A chef is used by numerous big infrastructure organizations. So there is a great potentiality that a company in which you are planning to present interview are adopting it and you may be called to answer an ample of questions on Chef software training. There is huge requirement for Chef Software jobs in top organizations for different positions like DevOps Engineer, Chef DevOps Engineer, DevOps Developer, Sr. Software Engineer, DevOps Automation Programmer, DevOps Lead etc. our professional experts team has listed out the top, most regularly proposed questions in Chef Software job interview questions and answers page.

Chef (software) Interview Questions

Chef (software) Interview Questions
    1. Question 1. What Is A Resource?

      Answer :

      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.

    2. Question 2. 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:

      • Install and configure software components.
      • Manage files.
      • Deploy applications.
      • Execute other recipes.

    3. Question 3. 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.

    4. Question 4. Write A Service Resource That Stops And Then Disables The Httpd Service From Starting When The System Boots?

      Answer :

      • Service ‘httpd’ do
      • Action [: stop: disable]
      • End

    5. Question 5. 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.

    6. Question 6. 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.

    7. Question 7. 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.

    8. Question 8. What Are The Two Ways To Set Up A Chef Server?

      Answer :

      • Install an instance on your own infrastructure.
      • Use hosted Chef.

    9. Question 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.

    10. Question 10. What Is A Node?

      Answer :

      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.

    11. Question 11. What Information Do You Need To In Order To Bootstrap?

      Answer :

      You need:

      • 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.

    12. Question 12. 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.

    13. Question 13. Which Of The Following Lets You Verify That Your Node Has Successfully Bootstrapped?

      Answer :

      • The Chef management console.
      • Knife node list
      • Knife node show
      • You can use all three of these methods.

    14. Question 14. What Is The Command You Use To Upload A Cookbook To The Chef Server?

      Answer :

      Knife cookbook upload.

    15. Question 15. 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.

    16. Question 16. 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.

    17. Question 17. 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:

      • 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!

    18. Question 18. What’s The Value Of Local Development Using Test Kitchen?

      Answer :

      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.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Adaptive software development Tutorial