Posts

Showing posts from March, 2022

Maven Build Example

Image
  What is maven ? Maven's primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal, Maven deals with several areas of concern: Making the build process easy Providing a uniform build system Providing quality project information Encouraging better development practices Demo on how to convert your Java code to JAR file.

Enable SSL for Jenkins

Image
It is very important to secure Jenkins by enabling SSL which runs in a production environment.  This post walks you through the step-by-step guide for configuring SSL on a Jenkins server. Following are the steps involved in configuring SSL on the Jenkins server. 1) Obtain SSL certificates. 2) Convert SSL keys to PKCS12 format. 3) Convert PKCS12 to JKS format - JKS[Java Key Store] Since Jenkins is a Java based application. 4) Add JKS to Jenkins path. 5) Configure Jenkins startup to use the JKS file. 6) Validate Jenkins SSL. To run Jenkins with HTTPS, you need to configure SSL in Jenkins: Generate CSR certificate: root@devops:/openssl_cert# openssl req -new > jenkins.ssl.csr Generating a RSA private key .....................................................................................................................................................+++++ ......................+++++ writing new private key to 'privkey.pem' Enter PEM pass phrase: Verifying - Enter PEM pass phra...

Jenkins Installation - Ubuntu

Image
Jenkins is a continuous integration tool that allows continuous development, test and deployment of newly created codes.  Primary requirement for Jenkins is Java. Lets install Java. root@jenkins:~# apt install openjdk-8-jdk Rebooting the server after java installation. root@jenkins:~# java -showversion openjdk version "1.8.0_282" OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~18.04-b08) OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode) root@jenkins:~# Add the repository key to the system for Jenkins installation. root@jenkins:~# wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - OK root@jenkins:~# root@jenkins:~# sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' root@jenkins:~# apt-get update Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease Hit:4 http://us.archive.ubuntu.com/ubuntu bi...

Kubernetes Installation - Ubuntu 20.04.3 LTS

Image
Kubernetes is an open-source tool that is crucial in container orchestration. Kubernetes works by orchestrating and managing clusters at scale across various cloud environments or even on-premise servers. A cluster is a set of hosts meant for running containerized applications and services. A cluster needs a minimum of two nodes to work – one master node and a worker node. Keeping scalability in mind, you have the option to expand the cluster with as many worker nodes as required. A node in Kubernetes refers to a server. A master node is a server that manages the state of the cluster. Worker nodes are servers that run the workloads – these are typically containerized applications and services. 1) Disable swap memory on the master and worker nodes but commenting the swap configuration in /etc/fstab and reboot the servers. 2) Set static IP across the nodes. We will use netplan to setup static IP across the nodes. root@masterk8s:/# cat /etc/netplan/01-network-manager-all.yaml # Let Networ...