If you are familiar with using Ansible, you might have come across certain situations where you won’t be able to get the benefit of the Idempotence nature of Ansible.

For example, you may want to restart a service if a task updates the configuration of that service, but not if the configuration is unchanged.

Ansible uses handlers to address this use case. Handlers are tasks that only run when notified. Each handler should have a globally unique name.

We provide a notify keyword to a task, which triggers handler. This handler only runs when any changes in task happen.

Let’s…


route command in Linux is used to modify or work with IP/kernel routing table. Its primary use is to set up static routes to specific hosts or networks. This command mainly used for showing the routing table content.

Installation of route command:

Most OS comes with route command preinstalled. In case of not having this command, it comes with software package named net-tools.

# in case of ubuntu/debian distribution
$ apt-get install net-tools
# in case of redhat distribution
$ yum install net-tools


To provision a container using Docker, we mostly go with manual way using Docker CLI or used Dockerfile to built own pre-configured Docker Image to launch container.

In this article, we are going to learn how to configure server inside docker container using Ansible. Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

Task:

Setup Ansible Dynamic Inventory Plugin for Docker.

Prerequisites:

  • Assuming that Ansible is already running properly.
  • Docker Engine is installed and running in Host VM.

Steps:

1. Install Docker SDK for Python:

The SDK needs to be installed on the machines where…


Nowadays, Container is almost used everywhere either in the production world or to set up local environment. Containers are a solution to the problem of how to get software to run reliably when moved from one computing environment to another.

A container consists of an entire runtime environment: an application, plus all its dependencies, libraries, and other binaries, and configuration files needed to run it, bundled into one package. By containerizing the application platform and its dependencies, differences in OS distributions and underlying infrastructure are abstracted away.

Docker is one of the powerful tools which help in launch and manage…


Ansible is a very powerful tool for automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

In today’s demo, First I’m going to launch Instance over AWS using Ansible, then configure WebServer and LoadBalancer over those instances using Ansible Roles. It also fetches the webserver’s IP dynamically and updates it in the LoadBalancer config file dynamically. You don’t need to update the config file of HAProxy LoadBalancer as Ansible updates it dynamically.

Steps to Configure this whole Setup:

  • Setup Dynamic Inventory for AWS Instance using Ansible Plugin.
  • Launch EC2 Instance over AWS tagged for webserver and lbserver using Ansible.
  • Setup Webserver…

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

Provision a Hadoop Cluster manually takes a lot of time and also lead to error sometimes, so we need some configuration management tool which does this job better than human.

I assume you have Ansible installed on either your workstation or an Amazon EC2 instance — Ansible has great documentation for installation…

http://docs.ansible.com/intro_installation.html

http://docs.ansible.com/intro_getting_started.html

Task:

  • Create an Ansible-collection for Hadoop Configuration.

Prerequisites:

  • Ansible Installed in your machine.

Tested On:

  • Redhat
  • Amazon Linux 2

Steps:

1. Define Hosts in Ansible Inventory file:

In your inventory file, define two different host…


Jenkins - an open-source automation server that enables developers around the world to reliably build, test, and deploy their software.

Jenkins is used to building and testing your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build.

When we run a job, it is necessary to have that command/program installed in the node where Jenkins running. Like if we need to run git plugin for SCM, it is also compulsory to have git installed in the local node.

And We all know that it…


Ansible is an IT automation tool and at the current time, many companies are adopting it and getting benefits from this amazing tool. NASA is also one of them which is using Ansible to solve their problems and this is so helpful for them. To discuss more the problem and the solution let me first introduce Ansible.

What is Ansible?

Ansible is an open-source automation tool, or platform, used for IT tasks such as configuration management, application deployment, intraservice orchestration, and provisioning.

Ansible runs on many Unix-like systems and can configure both Unix-like systems as well as Microsoft Windows. In this agile world…


For storing the static content(images/videos) of our website, we normally use the AWS S3 service which gives us an endpoint(URL) that we linked to our website to showing content. But this is not a good way because it increases the latency of our website. Here the role of Content Delivery Network(CDN) comes into play.

A content delivery network (CDN) refers to a geographically distributed group of servers that work together to provide fast delivery of Internet content.

A CDN allows for the quick transfer of assets needed for loading Internet content including HTML pages, javascript files, stylesheets, images, and videos


Some Prerequisites we need to check…

  • The only way to change a static partition size using fdisk is by deleting and recreating it so ensure that the information on the file system is backed up.
  • Make sure the partition you are resizing is the last partition on a particular disk.

Steps:

1. Creating a partition and store some data:

  • Use fdisk -l to check disk and partiton details…

Gaurav Gupta

Tech Enthusiasts, Passion to learn and share

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