You are on page 1of 3

CHEF DEVOPS QUESTIONS:

How does chef-apply differ from chef-client?

Answer- chef-apply applies a single recipe; chef-client applies a cookbook.

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.

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

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

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.

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.

Ansible:
What is difference between shell and command module in Ansible?

Ans: In the command module we cannot use the output redirectors and pipe operators
How do you download a software from internet through Ansible?

Ans: get_url module

How do you store a command output in Ansible?

Ans: register module

What is default config file and it’s location?

Ans: /etc/ansible/ansible.conf

What is module to extract files from tar file?

Ans: unarchive module

How to create roles in Ansible?

Ansible-galaxy init <location>

Git:
How do you revert a commit that has already been pushed and made public?
ANS: - git revert HEAD~2..HEAD

What is the difference between git pull and git fetch?

ANS: -

git fetch only downloads new data from a remote repository, but it doesn’t integrate any of the
downloaded data into your working files. All it does is provide a view of this data.

git pull downloads as well as merges the data from a remote repository into your local
working files. It may also lead to merge conflicts if your local changes are not yet committed.
Use the git stash command to hide your local changes.

Jenkins:

What is continuous integration in Jenkins?

Ans: -

In software development, multiple developers or teams work on different segments of same web
application so you have to perform integration test by integrating all modules. In order to do that
an automated process for each piece of code is performed on daily bases so that all your codes
get tested. This process is known as continuous integration.
Explain how you can deploy a custom build of a core plugin?

To deploy a custom field of a core plugin, you have to do following things


– Stop Jenkins
– Copy the custom HPI to $Jenkins_Home/plugins
– Delete the previously expanded plugin directory
– Make an empty file called <plugin>.hpi.pinned
– Start Jenkin

You might also like