Ansible Case Study

Task Descriptionđź“„

✍🏻 Research on usecases of Ansible and create a blog, Article for the same.

What Is Ansible?

Ansible is a popular IT automation engine that automates tasks that are either cumbersome or repetitive or complex like configuration management, cloud provisioning, software deployment, and intra-service orchestration.

Ansible is used for the multi-tier deployments and it models all of IT infrastructure into one deployment instead of handling each one separately. There are no agents and no custom security architecture is required to be used in the Ansible architecture. The deployment is simple plain English like language that is used in Ansible called YAML which stands for “YAML Ain’t Markup Language.”

To work with Ansible is very easy; it pushes out small programs called “Ansible Modules” to your nodes to connect. It can deploy and connect using the SSH agent to execute the modules and then removes it when finished. There are no servers, daemons or databases required these modules can reside anywhere in the machines. We need to work with any text editor or terminal programs and along with a version control system to manage the changes in the content. Ansible has over 750 modules built into it.

In Ansible the passwords are supported, However, we can use SSH keys with the ssh-agents as one of the methods to work with Ansible. We can create any user account and the root user is required. To configure what machines can access which hosts there is a module called “authorized_key”.

We can add machines to the Ansible in a simple text format and manage our inventory. It can use the inventory and variable information from other sources such as Rackspace, EC2, and Openstack, etc.

If we need to write our code then also we can use Ansible in languages such as Python, Ruby, and Bash, etc which return JSON. We can write our modules, API, and Plugins.

Playbooks are the simple and powerful automation language used to orchestrate multiple infrastructures in one goes. This can be done in Ansible.

Do we need Ansible? Why

Ansible is very useful and we would appreciate it with the example when there are 4 or 5 web servers to be configured and deployed, and when there are more than 4 database servers to be configured and deployed. There are applications in the web servers and it connects the database servers at the backend. Now the traditional situation demands that you separately configure these servers and manage them.

However, these servers will have various application updates. Even a system admin cannot handle if there are more servers and their configurations will not be identical. These tasks are complex to do and to manage the number of servers without putting a lot of effort into system admin as well as by developers who are developing the applications. Just imagine other servers which the organization has such as DNS, NTP, AD, Email, etc

This is where Ansible comes into the picture. Infrastructure automation and orchestrations can be done by Ansible. All the similar servers can be handled and managed in one go by Ansible.

Uses of Ansible

The use cases of Ansible are listed below

  • Infrastructure Provisioning
  • Configuration Management
  • IT automation
  • Continuous deployment
  • Application Development
  • Network Automation
  • Security Automation
  • Infrastructure Orchestration

Top 10 benefits of using Ansible

  1. Agentless –There are no agents or software deployed on the clients/servers to work with Ansible. The connection can be done through the SSH or using the Python.
  2. English Like Language — To use the Ansible, configure, and deploy the infrastructure is very simple and it is English like the language used called YAML.
  3. Modular — The Ansible uses modules to automate, configure, deploy, and orchestrate the IT Infrastructure. There are around 750 + modules built-in Ansible.
  4. Efficient — There are no servers, daemons, or databases required for Ansible to work.
  5. Features — Ansible comes with a whole lot of features and can be used to manage the Operating systems, IT Infrastructure, the networks, the servers, and services in very less time.
  6. Secure and consistent — Since the Ansible uses SSH and Python it is very secure and the operations are flawless.
  7. Reliable — The Ansible Playbook can be used to write programs or the modules and can be used to manage the IT without any downside.
  8. Performance- The Ansible’s performance is excellent and has very little latency.
  9. Low Overhead — As it is agentless and does not require any servers, daemons, or databases it can provide a lot of space in the systems and has low overhead in terms of deployment.
  10. Simple — It is very simple to use and is supported by YAML

What Ansible Can Do?

  • Configuration Management — The enterprise hardware and software information is recorded and updated in detail, thus maintaining the consistency of the product performance.
  • Application Deployment — The applications can be managed in Ansible from Development to Production when you define and manage the applications using Ansible.
  • Orchestration — To manage as a whole and how the configurations interact.
  • Security and Compliance — Wide security policy can be deployed across the infrastructure when the policy is defined in Ansible
  • Provisioning — Helps to automate and manage the process

Ansible Architecture

USECASES:-

ANSIBLE AND GOOGLE CLOUD PLATFORM

Ansible puts Google Technology at Your Fingertips

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

Ansible and Google Native Integration

The Ansible/GCP integration gives us everything we need to manage our IT infrastructure. From provisioning instances and autoscaling, custom networks and load balancing, and even managing DNS and cloud storage, it’s all provided. Use the Ansible/GCP tutorial and examples in our Playbooks.

Solutions That grow with Your Organization

Take advantage of GCP, the way we want to:

Testing/Continuous Integration

  • Use Ansible to launch instances in any GCP Zone, configure networking setups to accurately simulate real-world scenarios
  • Deploy our code how we want: private disk images, startup scripts pointing to our own package repository and more — all within our native Ansible Playbooks
  • Tear-down instances when we’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 our application can meet the needs of its users
  • Easily use Cross-Region Load Balancing to have our application served by the closest-available zone
  • Enable Service Accounts with specific access, enabling only those who need it to run our playbooks in production

Leverage Containers Without the Hassle

  • Easily deploy containers in Google’s managed container environment (Container Engine)
  • Store and access our container images in our Container Registry
  • Autoscaling, advanced networking and Logging giving us full control to understand and tune our 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.

Ansible and Cisco

CISCO ENABLES DEVOPS

As customers embrace the DevOps model to accelerate application deployment and achieve higher efficiency in operating their data centers, the infrastructure needs to change and respond faster than ever to business needs. These changes can help us achieve an agile operational model by improving on automation, innovation, and consistency.

The Cisco Nexus platform allows you to easily:

  • Integrate our applications into our customer’s existing DevOps tools chain
  • Improve flexibility in installing and deploying whatever protocol package or custom applications we need on the switch
  • Get open and full access to switch resources and data

Integrated Solution

The feature richness in Cisco Nexus NX-OS combined with the scaling and performance capabilities enable customers to build efficient data centers.

The Ansible integration with Cisco Nexus platforms enables customers to take advantage of programming and automating the infrastructure at scale with speed.

Ansible accelerates Day 0, 1 and 2 operations in the following ways:

  • Day 0 — Automates device bring up
  • Day 1 — Push network configurations to maintain consistency across the infrastructure
  • Day 2 — Optimizes network compliance and operation

Solution Benefits

The combined Ansible and Cisco solution provides:

  • Speed IT Transformation
  • Leverage Open Ecosystem
  • Efficient Operational Model
  • Faster Adoption
  • Improve Speed and Agility

--

--

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