What is LVM?

In Linux, Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management for the Linux kernel.

Goal of Program

To create a python script that can automate the LVM partitioning and related stuff. In the program, we’ll create a menu that will do the following things:

Head over to the program:

import osos.system("tput setaf 6")
print("\t\t\tLVM Automation Program")


Header image

What is LVM?

In Linux, Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management for the Linux kernel.

Head over to practical Implementation

Part 1. Create a LVM partition and mount to a data storage

Step 1: List all the hard disk available

fdisk -l

step 2: Create a PV (Physical Volume)

The physical volume over here will be created the same size as that of the disk size we are using.

pvcrete /dev/xvdf

Step 3: Create Volume Group with previously created PV

Create a volume group with the previously created Physical Volume. The name of the VG is medvg (say)

vgcreate medvg /dev/xvdf

To see the details of the VG (volume group) that we…


Increasing or Decreasing the size of the static partition in Linux

First, let’s see the current info about our storage using the fdisk -l command.

fdisk -l

Before jumping on to the implementation part, let’s first understand the tools and technologies that we are going to see in the upcoming parts:

What is Docker?

Docker is a set of the platform as a service product that uses OS-level virtualization to deliver software in packages called containers. Containers are the lightweight execution environments that are isolated from each other and have their own bundle, software, libraries and configuration files.

What is Apache httpd?

Apache httpd is a HyperText Transfer Protocol (HTTP) server program. It is designed to be run as a standalone daemon process. …


Python interpreter in the docker container

Before starting the implementation part, let’s answer a few questions that might be arising in your mind.

WHY do we need to run the python program (or any other program) in a docker container?

The main reason for this is to create a separate environment. As well as to leverage all the powers of containerisation.

The goal of this article:

Run the python programs in the docker container after configuring the python interpreter in a docker container.

Approach #1 (not a better approach)

Run any container and install a python interpreter inside that container. Create an image of that container for future use.

Approach #2 (this is a better approach)

Another approach can be - “Create the Docker Image using the Dockerfile”

Approach #1

step 1:

Run any container OS where you want to install the python interpreter. Here…


What is Routing?

Routing is a mechanism that allows a system to find the network path to another system. A routing table is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases, metrics (distances) associated with those routes.

Switch to the practical part

First, let’s print the routing table in our Linux OS:

route -n

OpenShift [header image]

What is OpenShift?

OpenShift is a family of containerization software products developed by Red Hat. Its flagship product is the OpenShift Container Platform — an on-premises platform as a service built around Docker containers orchestrated and managed by Kubernetes on a foundation of Red Hat Enterprise Linux.


Jenkins [Header Image]

What is Jenkins?

Jenkins is an automation server that is free and open source. It helps to automate parts of software development related to building, testing and deploying and facilitates continuous integration and continuous delivery.

It’s a server-based system that runs in server-based containers like Apache Tomcat.

Pipelines in Jenkins are like the set of sequential tasks that implement one after another. These tasks can be checkout from GitHub or building your package or even testing the code or deploying the whole app to the production server. Pipelines are a way to automate things in Jenkins.


Before starting our discussion on Kubernetes and its industry use cases, let’s first start from the very starting of these things. You might have guessed it till now, yes, I am going to talk about containerisation and docker first.

So, virtualisation technology existed for a long time but the containerisation technology came into focus when Solomon Hykes announced the first release (or debut) of Docker in 2013. Suddenly after its release, it gained everyone’s attention and even including top IT organisation like Google, Microsoft.

But what Docker actually do and how it’s useful?

Docker can package an application and its dependencies in a virtual container that can run on…


The motive of the DevOps automation

Create three Jobs in Jenkins

Job#1

If Developer push to the dev branch, then, Jenkins will fetch from dev and deploy on dev-docker environment

Job#2

If Developer push to master branch, then, Jenkins will fetch from master and deploy on the master-docker environment. Both dev-docker and master-docker environment are on different docker containers.

Job#3

Manually the QA team will check (test) for the website running in dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger #Job2

Project Introduction:

The workflow of the project:

As you have already understood from the above Image…

Adarsh Saxena

Hey Everone, I am DevOps Practitioner, Cloud Computing, BigData, Machine Learning are my favorite parts. Connect me on LinkedIn to know more about me.

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