DevOps Classroom Series – 14/Feb/2021
Jenkins User Administration
- Enabling and disabling global security on Jenkins
- Navigate to Manage Jenkins => Configure Global Security
- Authentication Methods in Jenkins are
- Delegate to Servlet container
- Jenkins own user database
- LDAP: In this we configure jenkins to connect to our organizations active directory
- Unix user/group database
- Navigate to Manage Jenkins => Configure Global Security
- Creating new users inside jenkins
- Navigate to Manage Jenkins => Manage Users
- Navigate to Manage Jenkins => Manage Users
- Authorization Methods of Jenkins
- image
- Anyone can do anything
- Legacy moded: when we choos this mode Jenkins behaves the way it was before jenkins release 1.164. In Legacy mode jenkins will look for a user named Admin This user will have administrative privilege all the other users will be considered anonymous
- Logged-in users can do anything
- Matrix-based:
- This is most widely used Authorization method in Jenkins
- This is most widely used Authorization method in Jenkins
- Project-based Matrix Authorization Strategy
- image
Configuring High Availability for Jenkins
- Jenkins Standalone set up looks as below
- To configure High Availability
Distributed Builds in Jenkins
- Lets consider the scenario as mentioned over here Refer Here
- Now lets configure one linux system as jenkins node
- OS: ubuntu 18 os
- Softwares: jdk8, maven
- user: ubuntu and password authentication is enabled
- Commands to be executed after login into ubuntu instance
sudo apt update
sudo apt install openjdk-8-jdk maven -y
- In Jenkins to configure the nodes we have to choose the authentication strategy
- ssh
- ssh
- Now lets try to create a jenkins project which will run on node 1
- Now lets create one more centos node
- sofwares: jdk 11 and maven
- OS: centos 7
- Authentication: username and key
- Commands:
sudo yum install java-11-openjdk git -y
sudo yum install maven -y
- Now add a node
- Add a credential and select ssh with private key
- Now lets create a jenkins job to build spring petclinic on this node