Ansible Vs Chef
Ansible Vs Chef
Ansible Vs Chef
Table of Contents
What is Ansible?
What is Chef?
Difference between Ansible vs Chef
Similarities between Ansible and Chef
If you work within the software development methodology known as “DevOps”, then
you are no doubt aware of the variety of tools available for your use in carrying out
everyday tasks. However, sometimes having too many tool choices can confuse and
confound, leaving developers puzzled as to what’s the best fit.
Fortunately, this article features a comparison of two popular DevOps tools, Ansible and
Chef. We will start by shining the spotlight on each tool individually, then launch into a
comparison. Bear in mind, each developer’s needs are different, and what is deemed
“best” is very subjective. But at the very least, we will strive to show the differences (and
maybe a few similarities), so as to help you make a more informed choice.
A simple Google search on Ansible vs Chef will show you that there’s a host of opinions
out there comparing not only these two tools but a few other tools as well. Clearly, this is
a topic that needs addressing, considering the growing popularity of the DevOps
methodology, so let’s begin our own journey into Ansible vs Chef!
What is Ansible?
In the words of the software’s own developers, “Ansible is a radically simple IT
automation engine that automates cloud provisioning, configuration management,
application deployment, intra-service orchestration, and many other IT needs.”
Ansible is open source software,and doesn’t rely on a client-server model. According to
its designers, Ansible is the only automation engine that can automate the entire
application lifecycle and continuous delivery pipeline.
Difficult tasks are turned into repeatable playbooks, simplifying matters greatly and
speeding up production.
Ansible’s control machines have to be a Linux/Unix host (e.g. Debian, Red Hat
Enterprise Linux, CentOS, macOS, BSD. In addition, Ansible requires Python 2.7 or 3.5.
In terms of cloud platforms, Ansible runs on Amazon Web Services, Atomic,
CenturyLink, Cloudscale, CloudStack, DigitalOcean, Dimension Data, Docker, Google
Cloud Platform, KVM, Linode, LXC, LXD, Microsoft Azure, OpenStack, OVH, oVirt,
Packet, Profitbricks, PubNub, Rackspace, Scaleway, SmartOS, SoftLayer, Univention,
VMware, Webfaction, and XenServer.
What is Chef?
Not to be confused with someone who prepares you a gourmet meal, Chef is, in the
words of its designers, “…a powerful automation platform that transforms infrastructure
into code. Whether you’re operating in the cloud, on-premises, or in a hybrid
environment, Chef automates how infrastructure is configured, deployed, and managed
across your network, no matter its size.”
It’s an open source cloud configuration that translates system administration tasks into
reusable definitions, otherwise known as cookbooks and recipes (hence the clever name
“Chef”).
Well, Ansible calls its configuration files “playbooks”, while Chef calls them
“cookbooks”.
Just kidding; on the contrary, there are quite a few differences between the two tools,
differences that go way beyond just having unique names for their configuration files.
Let’s break them down by categories:
Setting it Up: Chef operates with a master-client architecture. The server part runs on the
master machine, while the client portion runs as an agent on every client machine. Chef
also has an extra component named “workstation” that stores all of the configurations
that are tested then pushed to the central server.
On the other hand, Ansible only uses a master running on the server machine, but no
agents running on the client machine. It uses an SSH connection to log in to the client
systems or the nodes you want to configure, and the client machine VM has no need for
special setup.
So, Ansible is faster and easier to set up. That’s a point in its favor.
Cookbooks vs. Playbooks: So what’s this all about? Ansible’s playbooks are easier to
grasp as a concept as well as to create, but you pay for that with the limitation on how
complex you can make your configuration tasks.
Think of it as analogous to the old Apple Computers vs PCs, where the former was easier
for the average person to use, but the latter’s complexity offered you access to greater
functions and more control.
Chef relies on its own server as the source of truth, and those servers require uploaded
cookbooks, which means making sure the latter are consistent and identical.
Managing the Tools: With Chef, the client pulls configurations from the server. The
configurations are in Ruby DSL, so you need to have programming skills in order to
manage those configurations.
Ansible uses YAML (Yet Another Markup Language) to manage configurations, a
language that’s similar to English, and the server pushes the configurations to the
individual nodes.
Enterprise Cost: Chef Automate charges an annual fee of $137 per node, and gives you
everything you need to build and deploy. Ansible Tower standard IT operations is
$10,000 a year for up to 100 nodes. This package comes with 8x5 support, unless the
premium package is chosen, which ups support to 24x7.
Availability: In other words, how well do these tools make themselves available to
users? Chef uses a backup server that fills in when the primary server goes down. Ansible
works on a similar principle; when the Primary instance (the single active node that it
runs on) goes down, a Secondary instance kicks in.
Scalability: How do these two tools compare in terms of increasing or decreasing the
size to accommodate fluctuating needs? Pretty much the same. Both Ansible and Chef
are easily scalable.
Interoperability: Both the Chef server and the Ansible server require a Linux/Unix
machine in order to work. Chef Client and Workstation can work on Windows, and
Ansible does support Windows as well.
So, which of these are better? In reality, it depends on what your organization needs.
Chef has been around longer and is great for handling extremely complex tasks. Ansible
is easier to install and use, and therefore is more limited in how difficult the tasks can be.
It’s just a matter of understanding what’s important for your business, and that goes
beyond a simply Ansible vs Chef exercise.
Watch the video below that will give you an in-depth understanding of the major
configuration management tools ie. Chef, Puppet and Ansible along with hands-on
demos.
If all of this talk about DevOps has excited your interest, then Simplilearn has the means
of making your career-related dreams come true. Whether you’re already involved in
DevOps and are just looking to upskill, or you’re ready to start on the road to a new
career, Simplilearn has you covered.
For Ansible, Simplilearn presents the Ansible Foundation Training Course. Ansible 2.0, a
simple, popular, agent-free tool in the automation domain, helps increase team
productivity and improve business outcomes. Learn with
Simplilearn’s online Ansible 2.0 training and certification course and become an expert
in the open-source tool.
For those who want to get fully into DevOps, Simplilearn has something for you too: the
DevOps Training Course. Available as a corporate training solution or by Online
Classroom Flexi-Pass, you will gain the benefits of 56 hours of in-depth blended
learning, two dozen live demos of the most popular DevOps tools, over ten industry
projects with integrated labs, and 24/7 support.
The program, consists of eight highly informative lessons, and once you have completed
the course, you will earn your certification and be ready to launch yourself into an
exciting career in DevOps. So whether you’re interested in upskilling or a change in
career, Simplilearn can help you meet your goals.