Chef, Puppet and Ansible
Chef, Puppet and Ansible
What is Chef?
• Open Source
• Uses Ruby
• Chef is used to deploy, manage servers and applications in-house and
on the cloud.
Features
• Builds upon Ruby language to create a domain-specific language DSL
• Chef is used to deploy and also manage user’s cloud server, user
storage, and software.
• Easy to learn − Ruby language is easy to implement and run easy
configuration and scriptable.
Loaded when the chef client runs. It then gets to the status which is
defined in the node resource of the recipe.
When user does a Chef run the recopies get a infrastructure to the
required state that is mentioned in recipe.
• Attribute
They are a key value combined pair that can be used in cookbook.
• File
A subdirectory which can have any file within it and can be used by the
nodes.
Architecture
• Chef has a 3 tier client –server based architecture
• They are known for their heterogenous setup depending on the user
requirement.
Puppet
• Open Source
• Uses Ruby
• Can be usedto configure infrastructure on user physical machine or
virtual machine.
• Puppet uses client-server model
• Anyone system can acts as the server thereby acting as a puppet
master
• Rest systems automatically become slaves clients
Puppet − Components
• Puppet Resources
• The modules are then executed via ssh and later deleted.
PLAYBOOKS
• Automation language used by Ansible.
• Example
----
hosts: webservers
serial: 5 # update 5 machines at a time
roles:
- Common
- webapp
• Configuration management in terms of Ansible means that it
maintains configuration of the product performance by keeping a
record and updating detailed information which describes an
enterprise’s hardware and software.
How does Ansible works?
Source:https://www.tutorialspoint.com/ansible/images/ansible_works.jpg
Ansible Machine Terminology
• Remote machine these are the nodes that are getting managed by
Ansible itself.
Installation
• Latest instruction available on website always
• For installing Ansible you have to configure PPA on your machine. For this,
you have to run the following line of code −
vars:
oracle_db_port_value : 1521
tasks:
-name: Install the Oracle DB
yum: <code to install the DB>