New Level of Automation with Ansible

Automated Migration to AWS with Terraform and Ansible
March 20, 2018
AEM Mobile App Publishing Blog banner
Discover the New Epoch of AEM Mobile App Publishing
March 29, 2018
Show all

Introduction

The Ansible DevOps Tool and configuration management tool work hand in hand. We see some debates between using configuration management with Ansible or the option to simply kill and spin new application instances using a Docker container. With Docker, we don’t need to upgrade machines but spin new machines instead, which reduces the need to upgrade the EC2 cloud instances. Ansible is used mostly for deployment configuration. We use it to push changes and re-configure newly deployed machines which also has the easy option to write custom applications.

What Is Ansible?

Simple IT Automation
  • Very easy to get up and running
  • Simple architecture – just a control machine for basic deployments
Agentless
  • Works over SSH
Push-Model by Default
  • Ansible server connects managed hosts and executes commands

Ansible Modules

Modules are Ansible’s way of obstructing certain system managements or configuration tasks. Ansible is able to make system management idempotent. This is a key concept that makes configuration management tools like Ansible more powerful and safe than any custom shell script. It is actually challenging to write a shell script that can configure a system to a particular state.

There is a large catalog of modules available for Ansible. Here is a sample of things that can be managed with Ansible modules:

  • Users
  • Groups
  • Packages
  • ACLs
  • Files
  • Apache Modules
  • Firewall Rules
  • Ruby Gems
  • Git Repositories
  • Mysql and Postgresql Databases
  • Docker Images
  • AWS/Rackspace/Digital Ocean Instances
  • Campfire Or Slack Notifications

If there is no specific module available to accomplish the task, it can be run with some arbitrary commands or created by their own custom module.

Ansible Container

Ansible containers enable you to build container images that can only be orchestrated using Ansible playbooks. It provides an Ansible-centric workflow for building, testing, and installing containers. We can describe applications in a single YAML file and, rather than using a Dockerfile list, Ansible roles that make-up into your container images.

With Ansible container, you no longer have to build and configure containers differently than you do traditional VM or bare-metal systems. We can apply the powers of Ansible and re-use your existing Ansible content for your containerized ecosystem. We can also use templates to copy files, drop on encrypted data, handle errors, add conditions, and more.

Using Ansible containers, you can run applications and push images to private and public registries. When you are ready to deploy to the cloud, use it to generate an Ansible playbook that automates the deployment.

Preparing for What’s Next with Royal Cyber

Ansible believes you do not need another framework to validate basic things. Ansible is an order-based system that will fail instantaneously on unhandled errors for a host, and prevent further configurations. However, as Ansible is designed as a multi-tier orchestration system, it makes it stress-free to incorporate tests into the end of a play book run, either using lose tasks or roles.

Royal Cyber is an industry leading cloud solutions provider. We help in automation, deployment, and the best practices.

For more information, check Amazon Web Services.

Overall, testing is a very organizational and site-specific thing. Everybody should make the most for your environment by deploying, and benefit from a more robust and reliable deployment system. For more information on how we apply these kind of open source technologies, email us at [email protected] or visit www.royalcyber.com.

By Kamran Kanwar Siraj

Leave a Reply