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

Designed for multi-tier deployments since day one, Ansible models your IT infrastructure by describing how all of your systems inter-relate, rather than just managing one system at a time.

Inventory

Ansible can work with one or multiple systems in your infrastructure. To work with these systems/servers, it needs to create a connection with these servers. This is done using SSH for Linux and power shell remoting for windows that makes Ansible agentless. …


Docker provides different ways to inject the dynamic values during the build phase and the run phase. we can use Docker build arguments to dynamically injecting the values at the build time and environment variable to inject values at run time and can combine both to maximize their benefit.

Docker build arguments

It is used to dynamically injecting the values during the build time. It gives us the flexibility to create an image in different modes. Build arguments are used when we need to create multiple images with a specific value difference. …


A Regular Expression (or Regex) is a pattern (or filter) that describes a set of strings that matches the pattern.

Regular expressions are used to search strings for a specific pattern or to validate the user-input value like to validate the email address entered by the user.

Colosseum, Rome, Italy

Why we use Regular Expression?

To perform a certain action on a given string based on the characters present in it. Action can be validating the string or it can be changing certain parts of it.

Types of Regular expression:

1. Character classes:

A character class allows you to match any symbol from a certain character set. …


Docker-compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.

Why Docker-compose?

Let say we want to containerize an application having Node backend, React-js frontend, and MongoDB database. If we go by the simple approach then we need to first create the images of all the applications individually then run those images using the docker run command. It requires multiple long docker commands. …


Java 9 Features

- Immutable List

Creates a immutable list (read-only), cannot modify the list once it is created.

List.of(1,2,3);
  • Cannot add null value, it will throw NullPointerException.
  • Cannot add more values to the list, it will throw UnsupportedOperationException.
  • Can add values only at the time of initialization.

- Immutable Set

Set.of(1,2,3);
  • Cannot add duplicate values like Set.of(1,1,2), it will throw IllegalArgumentException.
  • Cannot add null value, it will throw NullPointerException.
  • Cannot add more values to the set, it will throw UnsupportedOperationException.
  • Can add values only at the time of initialization.

- Immutable Map

we can create immutable map in 2 ways:

Map.of(K1,V1,K2,V2);      // K refers to key and V refers to value


Collectors is a final class that extends the Object class. It provides reduction operations, such as accumulating elements into collections, summarizing elements according to various criteria, etc. Java Collectors class provides various methods to deal with elements.

1. Creating list: toList()

It is used to accumulate elements into a list. It will create a new list (It will not change the current list).

List<Integer> integers = Arrays.asList(1,2,3,4,5,6,6);integers.stream().map(x -> x*x).collect(Collectors.toList());// output: [1,4,9,16,25,36,36]

2. Creating set: toSet()

It is used to accumulate elements into a set, It will remove all the duplicate entries.

List<Integer> integers = Arrays.asList(1,2,3,4,5,6,6);integers.stream().map(x -> x*x).collect(Collectors.toSet());// output: [1,4,9,16,25,36]

3. Creating specific collection: toCollection()

We can accumulate data in…


Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

If you are working on any software project, then there are good chances that you already heard of GIT before. In this article we will deep dive into some useful but not so common git commands which can make out life easier.

Stashing in GIT

It is used to store all the local changes (staged and unstaged changes) for future use and reverts them from your working copy. It takes you back to the working directory HEAD (last…


In this blog, we will learn about how we can containerize a react application. Here we will see the generic steps which we can follow with any react application. Just for the sake of completion, we will start from scratch, we will first create a react application and then we will containerize it.

If you just started working on docker, I will highly recommend you to check my other blog first which is moreover related to the basic of docker commands

https://medium.com/swlh/important-docker-commands-you-should-know-60735f821068

Creating react application

npx create-react-app my-app
cd my-app
npm install

The first command will create our project, the second command is…


Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security allow you to run many containers simultaneously on a given host.

What are a docker image and docker container?

As per the official website, a Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries, and settings.

And docker container is an instance of the docker image, docker container is a docker image brought to life.

Breakdown of docker commands syntax:

Every docker command can be broken down into 3 parts :

1. Keyword 'docker'
2. Main…


As ECMAScript11 came, let’s quickly revise all the major features of ES6 to ES10.

ECMAScript6 -ECMAScript 2015

Its the protocol on which Javascript works. So we can say its javascript version.

Features introduced in EC6

let keyword

The let statement allows us to declare a variable with block scope and we cannot redeclare the same object in the same scope

var x = 10;
{
let x = 2;
let x = 4; // ERROR (cant redeclare)
x = 5; // works fine
// In this block x is equal to 5
}
// here x is 10

const keyword

The const statement is the same as let, the only difference…

Rohan Aggarwal

Full stack developer

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