Posts

Switching storage drivers for Docker on Ubuntu

Image
 Switch Storage Driver for Docker on Ubuntu This blog post is aimed to experiment based on "How to switch to a different storage driver on an existing docker installation in Ubuntu". Prerequisites Ubuntu Linux VM instance on any Cloud or Local VM Knowledge about filesystem how it works Step1: What filesystem provided by your OS cat /proc/filesystem or grep btrfs /etc/filesystem Is your docker version supports the filesystem available on your VM instance. grep brtfs /proc/filesystem Step 2: Take a backup of docker folder cp -au /var/lib/docker /var/lib/docker.bk Create loop devices attach them using images created by dd command dd if=/dev/zero of=test1 bs=1 count=1 seek=4294967295 dd if=/dev/zero of=test2 bs=1 count=1 seek=4294969343 Here the /dev/zero provides an endless stream of zero bytes when read (if). This function is provided by the kernel and does not require allocating memory. and all writes (of) to given file location. As a result, when ...

Docker Restart policies

Image
Hello DevOps/DevSecOps team, welcome back for another intresting post on Docker. In this post we will be discussing and experiment on "docker restart policies".   What is Docker restart policies? Docker provides restart policies to control whether your containers start automatically when they exit, or when Docker daemon restarts.   A Docker container’s status can be controlled by providing the restart policy while the container is instantiated with docker run sub command.   Docker container restart policies Docker restart policies are there to keep containers active(Up status) in all possible downfalls, we can leverage it in multiple ways as an example if we have a Tomcat/Nginx web server running on a container and have to keep it Up and running even on bad request we can use restart policy with a flag, it will keep the server "Up" and running till we stopped it manually. Syntax : docker run --restart [policy-type] IMAGE [COMMAND] [ARG...]    Below are t...

Git Config different scopes

Image
Hello DevOps or DevSecOps team here in this post I would like to expose more details about how the Git configurations can be done and viewed and where it is going to stored as file. Git Basic Configurations and scopes Let's see what are options we have for "git config" command in a Linux system, here I've used Ubuntu Linux to execute all 'git config' commands.  git config scopes There are three different levels : local, global, system-level configuration values attributes defined in Git.  System Global Local System level config Git allows us to define System wide configuration that means the configured values will be available for all users in the system and for every project repository as well. # System level configurations will be stored in /etc/gitconfig file git config --system core.editor "vim" git config --system merge.tool "vimdiff" The execution of the commands  git config --global command example Global level config Git c...

Jenkins Seed Job using DSL Script to Generate Job

Image
 Hey Guys!! How are you? In this learning post I would like to share with you awesome Jenkins feature experiment -  Infrastructure as a Code (IaC). The entire Jenkins Job or Project can be configured manually step-by-step in the regular fashion, when you click on the "new item" on the Jenkins Dashboard to create a project. But here story is different - with DSL script you could do the same thing that is dynamically creating a Job with a single flexible scalable durable way with Groovy script.  Jenkins DSL Groovy script generating dynamic Job Groovy is more like Shell scripting but totally executable on Java Virtual Machine. Those who know Java it will be easy to understand the Groovy syntax and its blocks. If you don't then no worries we will be coming up with easy to use DSL script in the following sections. Prerequisite for DSL Job creation Jenkins master-slave installed up and running. SCM installed/github Up and running Jenkins must have plugins installed such as ...

Jenkins Continuous Delivery

Image
👋 Warm Welcome 🤗 to my dear DevOps DevSecOps /SRE engineers here in this post we will exploring about Jenkins configured to run a full fledged CI/CD flow. Preparation for CI/CD The full length end-to-end automation can be done with the Jenkins Jobs. We need to identify how the dependencies forms the Job chain, what job become upstream and what all jobs can be downstream to which job also you need to plan as per your project needs. Here I'm taking the scenario where Java based web application package and deployment to different environments such as QA, Staging and for Production with approval to run the Build. The sequence of steps involved in this process are: Install Tomcat server  Using Jenkins CICD job deploy  Install Tomcat Server on a VM/Cloud instance Here the VM/Cloud instance assuming as Ubuntu Linux machine. d Step 1: Install JRE/Java To install Tomcat on any Platform there should be JRE available. To have JRE we do install JDK which is suitable to the Tomca...

How to Integrate JFrog Artifactory with Jenkins on Ubuntu

Image
 Hello Dear DevOps/DevSecOps engineers and automation team members. Today we will experiment on JFrog Artifactory integration with Jenkins. Step-by-step guide to setting up JFrog Artifactory and integrating it with Jenkins for efficient CI/CD pipelines. To do this we need to break down the task into two phases in the first phase we will do JFrog Artifactory setup. after that next phase we will do integrate it in Jenkins. Prerequisites for Integration Minimum requirement to run the JFrog artifactory we need 4Core CPU, 8 GB of RAM system configuration Virtual Boxes or VM instance on the Cloud is the basic requirements. On the AWS Cloud: An AWS   t2.small  EC2 instance (Linux) if other cloud please select at least 2GB RAM providing instance. Open port 8081 and 8082 in the  Security Grou p=> Inbound or on the firewall allow ports. Vagrant boxes for Jenkins and jfrog artifactory On premises setup using Vagrant # Ubuntu boxes for Jenkins and Jfrog Vagrant.configur...

Jenkins installation on Windows

Image
 Hello DevOps Guys, We will install the Jenkins Controller on the Windows machine.  How to install Jenkins on Windows machine? Here in this post we will explore Step-by-Step installation instructions for Jenkins on Windows platform. Jenkins installation on Windows Step 1: Install and set Java Please visit the Oracle Java SE download page:  http://www.oracle.com/technetwork/java/javase/downloads/index.html . Oracle providing the new option on the download page, that is "JDK Script Friendly URLs" page. Choose the JDK for your operating system (Windows 10 or 11) 64bit to download. Double click downloaded file launches installer wizard, proceed with the agree and set up the installation location as per your disk/drive availability. Verification of Java installation  Open a CMD prompt run "java -version" if Java installed correctly in the PATH you will get the installed version as output. if not set the PATH from the type ENVIRONMENT VARAIABLES search ->EDIT ENVIRONME...