Posts

Jenkins Slave on AWS EC2 instances with SSH configuration

Image
After c onfiguring the  Jenkins Maste r we need to configure the slave or agent on EC2 instance. There are various methods to connect with the Slave node. In this post,  I would like to share the SSH key-based remoting method. Pre-requisites Jenkins Master already Up and Running Java (JDK) installed on the Slave node Here we are in the slave machine and proceed with the following steps for configure a SSH based Jenkins slave. How to create user and generate ssh-key on Slave? Login to slave node terminal using ssh or PuTTY switch to root user.  useradd jenkins_slave mkdir -p /home/jenkins_slave usermod -d /home/jenkins_slave jenkins_slave tail -1 /etc/passwd # To check useradded to userlist Now switch to the newly created user 'jenkins_slave'. sudo su - jenkins_slave SSH Key generate for 'jenkins_slave' user with the following command: cd .ssh ssh-keygen -t rsa -N "" The above command will create two files in /home/jenkins_slave/.ssh folder id_rsa (p...

Learn how to use git tag for Code Revisions

Image
In this post, let's do an experiment with git tag command options. In GitOps we need to know what is a tag? How many types of git tags? We will learn about Creating, deleting, and listing tags for a project repository. Once everything is done, we need to know how to push the tag to the remote repository. Work tree for git tag creation Why git tagging? Tagging is used to mark a commit stage as important We can tag a commit for future references  Typically tagging wiil be used to book mark release points in a Project. Annotated tags will be recommend where you are working in team and collaborating for a project development. Before you start on git tag You must have a GitHub or GitLab account to work on a remote repository. Knowledge of basic repository creation on these Git clouds. On your git client shell (git bash as well) you must create the global user identity entries in the configurations. [vagrant@mydev tags_handson]$ git config --list user.email=bhavanishekhar@gmail.com user...

Configuring Fresh Jobs in Jenkins

Image
Hello, Dear DevOps Automation enthusiast! This post is intended targeted to those who have just started the journey in the Continuous Integration and Continuous Deployment on the Cloud Platforms or On-premises environments. Pre-requisites Latest Stable version of Jenkins installed   Jenkins Master is in  running state  on your machine/VM/Cloud instance Able to login to the Jenkins Console In the left pane, you can click on 'New Item' or Click on the 'Start Using Jenkins' link. The welcome screen shows a link to create a new job! Jenkins First Job Project creation You need to enter the value for  Name for the build project Type of project Freestyle Project Pipeline Multi-configuration Project Folder GitHub Organization Multibranch Pipeline Enter the name of the project, Select the ' Freestyle project ' for the first time and click on the 'OK' button. New page loads with 6 sections/tabs for build project inputs. Job Configuration Sections In ...

Microk8s Installation on Ubuntu and Configure Kubernetes Dashboard

Image
Microk8s is the most happening thing in Kubernetes World. Here I would like to share my exploration of microk8s. Earlier there was 'Minikube' which is targets to Developers community to reduce the operations. Assumption You know how to create a VM using Vagrant, VirtualBox that we had discussed in the other blogposts already so here I'm skipping it. Microk8s installation on Ubuntu  To install you should be super user on your Ubuntu VM sudo -i The snap is a package manager available in all Linux distributions. Here in the Ubuntu 18.04 validating is it available. Check snap package tool available snap version Now we all set, run the install the microk8s command here the --classic is must snap install microk8s --classic --edge Check the version microk8s.kubectl version --short Create an alias to simplify your command alias k="microk8s.kubectl" Let's use k now k get nodes k get nodes -o wide # check the namespaces list k get namespaces k get a...

Kubernetes (K8s) StatefulSet (sts)

Image
Greetings of the day dear Orchestrator!! In this post, we will discuss exploring the Kubernetes StatefulSet( sts )  What is the purpose of Stateful deployment? Kubernetes' basic unit is Pod, which will be ephemeral in nature and it was designed in such a way that it cannot store the state. To store and maintain the state of the application, Kubernetes introduced a new type of deployment manifestation called it as StatefulSet. Here in this post, we will be experimenting with the most important deployment model that is StatefulSet which will be interconnected with the multiple storage related objects PersistantVolume(PV) and PersistentVolumeClaim (PVC).    Assumptions To work on this experiment you must have Kubernetes cluster running on single node or multi-node and it should have a NFS remote storage access that depends on your platform. Here I've EC2 instance having  NFS service configured and run: Kubernetes Cluster configured and Up Prepare a NFS...

K8s Storage Volumes part 1 - EmptyDir

Image
Hello, Dear DevOps enthusiasts, In this post, we are going to explore the emptyDir Volume, which is going to work as local data share between containers in a Pod. I had read the book titled ' Kubernetes in action ', from that book I want to understand Persistance Volumes and Persistence Volume Claims in detail. will run the following example for PV that uses emptyDir volume type. Every new learning is like a game! if you take each trouble as a game level it will be a wonderful game. Once you finish the desired state it's winning the game! why to wait let's jump on this game Kubernetes emptyDir Volume Assumptions Docker installed Kubernetes Installed and configured Cluster AWS access to EC2 instances We need to create a Tomcat container and Logstash container in the Kubernetes pod. In the below diagram, it will share the log file using Kubernetes volume that is empty dir. The tomcat and Logstash cant use the network via loc...

K8s Storage NFS Server on AWS EC2 Instance

Image
Hello DevOps enthuiast, In this psot we would like to explore the options available on Kubernetes Storage and Volume configurations. Especially in AWS environment if we have provisioned the Kubernetes Cluster then how we can use the storage effectively, need to know all the options. In the sequence of learning on 'Kubernetes Storage' experimenting on the NFS server on AWS EC2 instance creation and using it as Persistent Volume. In the later part, we would use the PVC to claim the required space from the available PV. That in turn used inside the Pod as specifying a Volume.  Assumptions Assuming that you have AWS Console access to create EC2 instances.  Basic awareness of the Docker Container Volumes Understand the need for Persistency requirements Login to your aws console Go to EC2 Dashboard, click on the Launch instance button Step 1: Choose an AMI: "CentOS 7 (x86_64) - with updates HVM" Continue from Marketplace Step 2: Choose instance type: Step 3: Add stora...