Ansible and Industry Use case of Ansible

What is Ansible ?

Ansible is a software tool that provides simple but powerful automation for cross-platform computer support. It is primarily intended for IT professionals, who use it for application deployment, updates on workstations and servers, cloud provisioning, configuration management, intra-service orchestration, and nearly anything a systems administrator does on a weekly or daily basis. Ansible doesn’t depend on agent software and has no additional security infrastructure, so it’s easy to deploy.

It is an open -source software provisioning, configuration management, and application-deployment tool enabling infrastructure as a code. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft-windows. It includes its own declarative-language to describe system configuration. Ansible was written by Michael DeHaan and acquired by Red Hat in 2015. Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management(allowing remote Powershell execution) to do its tasks.

Ansible is all about automation, it requires instructions to accomplish each job. With everything written down in simple script form, it’s easy to do version control. The practical result of this is a major contribution to the “infrastructure as code” movement in IT.

History:

The term “ansible” was coined by Usrula K . Le Guin in her 1966 novel Roccans’s World, and refers to fictional instantaneous communication systems.

The Ansible tool was developed by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Fedora Unified Network Controller(Func) framework for remote administration.

Ansible, Inc. (originally AnsibleWorks, Inc.) was the company set up to commercially support and sponsor Ansible. Red Hat acquired Ansible in October 2015.

Ansible is included as part of the Fedora distribution of Linux, owned by Red Hat, and is also available for RHEL, CentOS, openSUSE, SUSE Linux Enterprise, Debian, Ubuntu, Scientific Linux, and Oracle Linux via Extra Packages for Enterprise Linux (EPEL), as well as for other operating systems.

Architecture:

Unlike most configuration-management software, Ansible does not require a single controlling machine where orchestration begins. Ansible works against multiple systems in your infrastructure by selecting portions of Ansible’s inventory, stored as edit-able, version-able ASCII text files. Not only is this inventory configurable, but you can also use multiple inventory files at the same time and pull inventory from dynamic or cloud sources or different formats (YAML, INI, etc.). Any machine with Ansible utilities installed can leverage a set of files/directories to orchestrate other nodes. The absence of a central-server requirement greatly simplifies disaster-recovery planning. Nodes are managed by this controlling machine — typically over SSH. The controlling machine describes the location of nodes through its inventory. Sensitive data can be stored in encrypted files using Ansible Vault since 2014. In contrast with other popular configuration-management software — such as Chef, Puppet, and CFEngine — Ansible uses an agentless architecture, with Ansible software not normally running or even installed on the controlled node. Instead, Ansible orchestrates a node by installing and running modules on the node temporarily via SSH. For the duration of an orchestration task, a process running the module communicates with the controlling machine with a JSON-based protocol via its standard input and output. When Ansible is not managing a node, it does not consume resources on the node because no daemons are executing or software installed

♦ Inventory :- Inventory is lists of nodes or hosts having their IP addresses, databases, servers, etc. which are need to be managed.

♦ API’s :- The Ansible API’s works as the transport for the public or private cloud services.

♦ Modules :- Ansible connected the nodes and spread out the Ansible modules programs. Ansible executes the modules and removed after finished. These modules can reside on any machine; no database or servers are required here. You can work with the chose text editor or a terminal or version control system to keep track of the changes in the content.

♦ Plugins :- Plugins is a piece of code that expends the core functionality of Ansible. There are many useful plugins, and you also can write your own.

♦ Playbooks :- Playbooks consist of your written code, and they are written in YAML format, which describes the tasks and executes through the Ansible. Also, you can launch the tasks synchronously and asynchronously with playbooks.

♦ Hosts :- In the Ansible architecture, hosts are the node systems, which are automated by Ansible, and any machine such as RedHat, Linux, Windows, etc.

♦ Networking :- Ansible is used to automate different networks, and it uses the simple, secure, and powerful agentless automation framework for IT operations and development. It uses a type of data model which separated from the Ansible automation engine that spans the different hardware quite easily.

♦ Cloud :- A cloud is a network of remote servers on which you can store, manage, and process the data. These servers are hosted on the internet and storing the data remotely rather than the local server. It just launches the resources and instances on the cloud, connect them to the servers, and you have good knowledge of operating your tasks remotely.

♦ CMDB :- CMDB is a type of repository which acts as a data warehouse for the IT installations.

Ansible Uses 3 ways for automation :

  1. By using Ad-hoc commands
  2. By using Playbooks
  3. By using Inventories

Use case of Ansible:

Managing an organization’s many tools and business processes is becoming increasingly complicated as technology expands. Whether your teams are performing their weekly system reboot, or looking to configure instances to a desired state, it’s no secret that automation is critical to increase speed, efficiency, productivity, and accuracy. Listed below are several instances1 where automation can help across your enterprise.

  • Weekly system reboot: There’s nothing worse than doing the same thing for 8 hours a day! Eliminate repetitive, manual processes with automation.
  • Enforce security guidelines: Rules are rules. It’s best to automate in an effort to achieve strict security standards.
  • Monitor configuration drift: Use check mode with Ansible tasks to enforce desired settings and see if your configuration has drifted.
  • Disaster recovery: Disaster recovery can involve a wide range of components. Act across different variables of the technology stack to identify problems and eliminate cross team dependencies.
  • Command blaster: Remarkably easy to write, you can run commands across your environment for any number of servers.
  • Database binary patching: Several databases use outdated binary sets. Patch the binaries in accordance with the release of the latest patch.
  • Instance provisioning: Use modules for several cloud providers to create new instances and tailor their configuration.
  • Service license agreements: Mistakes cost time and money. Eliminate errors that can crop up in detailed software contracts.

Ansible puts Google Technology at Your Fingertips

Google Cloud Platform (GCP) provides scalable infrastructure and solutions to meet the needs of your organization. GCP offers on-demand instances, software-defined networking, storage and databases, and big data solutions — and they’re all available at your fingertips. GCP enables your applications to take advantage of Google’s significant infrastructure, utilizing their best-of-breed technology and innovation, and only pay for what you need when you need it.

Ansible and Google Native Integration

The Ansible/GCP integration gives you everything you need to manage your IT infrastructure. From provisioning instances and autoscaling, custom networks and load balancing, and even managing DNS and cloud storage, it’s all provided.

Solutions That grow with Your Organization

Take advantage of GCP, the way you want to:

Testing/Continuous Integration

  • Use Ansible to launch instances in any GCP Zone, configure networking setups to accurately simulate real-world scenarios
  • Deploy your code how you want: private disk images, startup scripts pointing to your own package repository and more — all within your native Ansible Playbooks
  • Tear-down instances when you’re done: right after a test or after a review with the team and even keep a snapshot of the disk

Production Deployment

  • Use GCP Managed Instance Groups (Playbook example) and autoscaling to ensure your application can meet the needs of its users
  • Easily use Cross-Region Load Balancing to have your application served by the closest-available zone
  • Enable Service Accounts with specific access, enabling only those who need it to run your playbooks in production

Leverage Containers Without the Hassle

  • Easily deploy containers in Google’s managed container environment (Container Engine)
  • Store and access your container images in our Container Registry
  • Autoscaling, advanced networking and Logging giving you full control to understand and tune your cluster

Google is an Active Contributor to the Ansible Community

The Ansible open source community is a vibrant, fast-moving place that strives to get things done. Google thrives in open source, but also understands the reliability needs of its users to safely run their infrastructure. Google Engineering actively builds Ansible modules, contributes code and documentation, and helps users deliver their solutions with GCP

🌟Thank you for reading…..

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store