Introduction to Ansible and How Industries are solving their challenges using Ansible.

Introduction to Ansible and How Industries are solving their challenges using Ansible.

What is Ansible?

Ansible is a radically simple open-source IT automation engine that automates cloud provisioning, configuration management, application management, intra-service orchestration, and many other IT needs.

Automation is crucial these days, with IT environments that are too complex and often need to scale too quickly for system administrators and developers to keep up if they had to do everything manually. Automation simplifies complex tasks, not just making developers’ jobs more manageable but allowing them to focus attention on other tasks that add value to an organization. In other words, it frees up time and increases efficiency. And Ansible, as noted above, is rapidly rising to the top in the world of automation tools. Let’s look at some of the reasons for Ansible’s popularity.

Advantages of Ansible

  • Free: Ansible is an open-source tool.
  • Very simple to set up and use: No special coding skills are necessary to use Ansible’s playbooks.
  • Powerful: Ansible lets you model even highly complex IT workflows. 
  • Flexible: You can orchestrate the entire application environment no matter where it’s deployed. You can also customize it based on your needs.
  • Agentless: You don’t need to install any other software or firewall ports on the client systems you want to automate. You also don’t have to set up a separate management structure.
  • Efficient: Because you don’t need to install any extra software, there’s more room for application resources on your server.

How does Ansible work?

Ansible is designed for multi-tier deployments, uses no agents and no additional custom security infrastructure, so it's easy to deploy - and most importantly, it uses a very simple language (YAML, in the form of Ansible Playbooks) that allow you to describe your automation jobs in a way that approaches plain English.

Efficient Architecture

Ansible works by connecting to your nodes and pushing out small programs, called "Ansible modules" to them. These programs are written to be resource models of the desired state of the system. Ansible then executes these modules (over SSH by default), and removes them when finished.

No alt text provided for this image


SSH Keys

Passwords are supported, but SSH keys with ssh-agent are one of the best ways to use Ansible. Root logins are not required, you can login as any user, and then su or sudo to any user. Ansible's "authorized_key" module is a great way to use ansible to control what machines can access what hosts.

Inventory

All the machines you’re using with Ansible (the control machine plus nodes) are listed in a single simple file, along with their IP addresses, databases, servers, and so on. Once you register the inventory, you can assign variables to any of the hosts using a simple text file. You can also pull inventory from sources like EC2 (Amazon Elastic Compute Cloud).

AD HOC Parallel Task Execution

Once you have an instance available, you can talk to it right away, without any additional setup

ansible all -m ping 
ansible foo.example.com -m yum -a "name=httpd state=installed"
ansible foo.example.com -a "/usr/sbin/reboot"

Playbook

Ansible playbooks are like instruction manuals for tasks. They are simple files written in YAML, which stands for YAML Ain’t Markup Language, a human-readable data serialization language. Playbooks are really at the heart of what makes Ansible so popular is because they describe the tasks to be done quickly and without the need for the user to know or remember any particular syntax.

Extend Ansible: Modules, Plugins and API

Modules are like small programs that Ansible pushes out from a control machine to all the nodes or remote hosts. The modules are executed using playbooks and they control things such as services, packages, and files.

Plugins are extra pieces of code that augment functionality. Ansible comes with a number of its plugins, but you can write your own as well. Action, cache, and callback plugins are three examples.

What is Ansible Tower?

Ansible Tower is Red Hat’s commercial web-based solution for managing Ansible. Its best-known feature is an easy-to-use UI (user interface) for managing configurations and deployments, which is a significant improvement over the original UI. Ansible Tower contains the essential features of Ansible, especially those that are easier to see in a graphical format rather than a text-based format. It is free for up to 10 nodes.

Ansible Tower main features

  • Visual Dashboard
  • Graphical Inventory management
  • RBAC
  • Job scheduling
  • Job history report
  • Remote command execution
  • Centralized logging
  • Notification
  • Multi-playbook workflow
  • Restful API

Benefits of Ansible Tower

  • Reuse of ansible scripts across organization
  • Provides shared infrastructure for team to run ansible scripts
  • Ease of managing privileged and guarded administrator credentials
  • Ease of use for IT teams that traditionally use GUI tools
  • Ansible Tower provides framework for running, managing Ansible Automation Platform efficiently on enterprise scale
  • Offers web interface, RBAC, centralized logging and auditing
  • RESTful API facilitates integration with enterprise’s existing workflows and tool sets

Ansible Tower Architecture

No alt text provided for this image
  • Users interface with Ansible Automation Platform infrastructure via Ansible Tower’s web interface or RESTful API
  • Web interface is graphical interface wrapper that executes calls against API
  • Actions available through web interface also available via API
  • RESTful API essential to integrate Ansible Automation Platform with existing software tools and processes
  • Ansible Tower stores data in PostgreSQL back-end database and uses RabbitMQ messaging system

Industry Challenges solved by Ansible :

1. NASA and Ansible Tower

No alt text provided for this image


Business Challenge

NASA needed to move roughly 65 applications from a traditional hardware-based data center to a cloud-based environment for better agility and cost savings. The rapid timeline resulted in many applications being migrated ‘as-is’ to a cloud environment. This created an environment spanning multiple virtual private clouds (VPCs) and AWS accounts that could not be easily managed. Even simple things, like ensuring every system administrator had access to every server, or simple patching, were extremely burdensome.

Solution

Leverage Ansible Tower to manage and schedule the cloud environment.

Results

As a result of implementing Ansible Tower, NASA is better equipped to manage its AWS environment. Tower allowed NASA to provide better operations and security to its clients. It has also increased efficiency as a team. By the numbers:

  • Updating nasa.gov went from over 1 hour to under 5 minutes
  • Patching updates went from a multi-day process to 45 minutes
  • Achieving near real-time RAM and disk monitoring (accomplished without agents)
  • Provisioning OS Accounts across entire environment in under 10 minutes
  • Baselining standard AMIs went from 1 hour of manual configuration to becoming an invisible and seamless background process
  • Application stack set up from 1-2 hours to under 10 minutes per stack
“Ansible Tower has allowed us to provide better operations and security to our clients. It has also increased our efficiency as a team.”
-NASA


2. NETAPP Challenges Solved by Ansible

No alt text provided for this image


BUSINESS CHALLENGE

NetApp, a data management technology company, sought to improve the speed and efficiency of its IT service delivery.

Solution

The company automated manual, repetitive management processes and streamlined storage provisioning using Red Hat Ansible Automation and Red Hat OpenShift Container Platform. As a result, NetApp has dramatically reduced delays and human errors — eliminating hundreds of hours of manual work — and accelerated application delivery times from weeks to minutes.

Results

  • Achieved more efficient and accurate IT infrastructure maintenance.
  • Reduced application delivery time from weeks to minutes.
  • Gained support for evolution to modern, cloud-based application architecture.
“This project had occupied dozens of staff for weeks, with many more weeks to go. With Ansible, we completed it in two days.”
— DAVID FOX
SENIOR UNIX ENGINEER, NETAPP

Conclusion

No one likes repetitive tasks. With Ansible, IT admins can begin automating away the drudgery from their daily tasks. Automation frees admins up to focus on efforts that help deliver more value to the business by speeding time to application delivery and building on a culture of success, thus making engineers more productive as lots of system libraries and packages are shared among different server types.


Ansible is an open source tool with 45.8K GitHub stars and 19.9K GitHub forks and 1534 companies reportedly use Ansible in their tech stacks, including LaunchDarkly, Tokopedia, and ViaVarejo.


DISTRIBUTION OF COMPANIES USING ANSIBLE BY INDUSTRY

No alt text provided for this image

Looking at Ansible customers by industry, we find that Computer Software (36%) and Information Technology and Services (9%) are the largest segments.


Hope you find this helpful

Thank you for reading!






Arsh Mishra

Data Scientist & Machine Learning Engineer | Building Scalable Models for Real-World Impact

4 年

Great??

要查看或添加评论,请登录

Ishika Sinha的更多文章

社区洞察

其他会员也浏览了