Posts

How to Install jenkins in RHEL/Centos

Image
 Jenkins Installation ######################### # wget -O /etc/yum.repos.d/jenkins.repo \     https://pkg.jenkins.io/redhat/jenkins.repo Import Jenkins key # rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key Now run yum upgrade if required # yum upgrade #Add required dependencies for the jenkins package #yum install fontconfig java-17-openjdk Now install Jenkins service. # yum install jenkins Reload the system daemon #systemctl daemon-reload Enanble/start Jenkins service #systemctl enable Jenkins #systemctl start Jenkins #systemctl status Jenkins Unlocking Jenkins When you first access a new Jenkins controller, you are asked to unlock it using an automatically-generated password. Browse http://localhost:8080 and wait until the Unlock Jenkins page appears. From the Jenkins console log output, copy the automatically-generated alphanumeric password (between the 2 sets of asterisks). Jenkins initial setup is required. An admi...

How To Enable SSH Login for root user in RHEL9/CENTOS9

Image
  When you install RHEL9/CENTOS9 by default root login prohibited for ssh this article refers how to enable root login. Step 1. #vi /etc/sysconfig/sshd_config Search PermitRootLogin Step2. Commented out # and change the line prohibit-password to yes and save the file. Step3. Restart ssh service  #systemctl restart sshd and set the password for root from command passwd Take the putty/ssh  session and login with root  

File Permissions in Linux

  File Permissions In Linux ########################################################### File system permissions are very crucial in Linux systems, They determine who can access Files and Directories On a system.  Let's discuss the file system permissions. When we create any files by default files created with a permissions of 644 or -rw-r---r-- the ls command along with -l will show you files and directory along with the permissions associated with  [root@rohit ~]# ls -l -rw-r--r-- . 1 root root       50 Nov  4 16:12 a.txt drwxr-xr-x . 2 root root       21 Nov  4 16:16 test File type: - ·       Permission settings: rw-r--r-- ·       Extended attributes: dot (.) ·       User owner: root ·       Group owner: root The fields "File type" and "Extended attributes" are outside the scope of this article, but in the featured output above, the a.txt fil...

Kubernetes Services

Image
 Kubernetes Services In Kubernetes, a Service is a method for exposing a network application running as one or more Pods in your cluster. The main goal of creating Services in Kubernetes is that you don't need to modify your existing application to use an unfamiliar service discovery mechanism. You can run code in Pods, whether this is code designed for a cloud-native world or an older app you've containerized. You use a Service to make that set of Pods available on the network so that clients can interact with it. Advantages of service ####################   1. You can access the service from outside of your host/pod network   2. service select the pods on the basis of label selectors   3. while using service, Load balancer is inbuild or you can map your load balances on the service network   Types of service #################   1. ClusterIP:- if you don't want to expose your pods outside of your pod network e.g databases pods you can place here. ...

How to Add Users/Group/OU in OpenLdap

  ADDIGN  AN ORGANIZATIONAL UNIT (OU ) Create a temporary file called  users.ldif . (You can delete this file once its content has been added to LDAP, so in this example, we will create it in the  /tmp  folder.)   [root]# cd /tmp [root]# vi users.ldif   2.Add these lines to  users.ldif :      dn: ou=Users,dc=acme,dc=com      objectClass: organizationalUnit      ou: Users   Add the contents of  users.ldif  file to LDAP. [root]# ldapadd -f users.ldif -D cn=Manager,dc=acme,dc=com -w p@ssw0rd   ADDING USERS #####################   Create a temporary file called  bob.ldif . (You can delete this file once its content has been added to LDAP, so in this example, we will create it in the  /tmp  folder.)      [root]# cd /tmp      [roo...

Resource Quota

 Kubernetes Resource Quota ############################ A resource quota, defined by a ResourceQuota object, provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that namespace.  How resource quotas works 1. Different teams work in different namespaces. This can be enforced with RBAC(Role base access control) 2. The administrator creates one ResourceQuota for each namespace. 3. Users create resources (pods, services, etc.) in the namespace, and the quota system tracks usage to ensure it does not exceed hard resource limits defined in a ResourceQuota. 4. If creating or updating a resource violates a quota constraint, the request will fail with HTTP status code 403 FORBIDDEN with a message explaining the constraint that would have been violated. 5. If quota is enabled in a namespace for com...

Jenkins flow/installation

 Jenkins Installation ############################ There are two-three ways you can install Jenkins: 1. Native Installation Prerequisite You need to have a JDK and JRE installed Installation ############ wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stablebinary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt-get update sudo apt-get install jenkins 2. Jenkins Installation: Using Tomcat #################################### copy jeenkins.war to $TOMCAT_HOME/webapps, then access http://yourhost/jenkins If you are running Tomcat just to host jenkins, then remove everything from $TOMAT_HOME/webapps and  place jenkins.war as ROOT.war(Same configuration required) Tomcat should expand this and create the ROOT directory, and you should see Jenkins in http://yourhost EXPORT JENKINS_HOME $ export JENKINS_HOME=/path/to/jenkins_home/ $catalina.sh start 3. Jenkins Install run as a service ############################...