Learn how to set up and configure a Linux-based agent node in Jenkins with this comprehensive guide. Perfect for DevOps engineers looking to scale their CI/CD pipeline.
** 💡 Key Topics: **
1. Prepare the Agent Machine
sudo dnf install java-21-openjdk -y
java --version
ssh-keygen -t rsa
touch ~/.ssh/authorized_keys
cat cat ~/.ssh/id_rsa.pub | tee -a ~/.ssh/authorized_keys
cat cat id_rsa
2. Add Agent Node and Create Credentials for node
Navigate to "Manage Jenkins" -- "Nodes and Clouds"
Click "New Node"
Enter node name "linux-agent"
Select "Permanent Agent"
Click "Create"
Configure these settings:
• Name: linux-agent
• Description: Linux build agent
• Number of executors: 2
• Remote root directory: /home/devops
• Usage: Use this node as much as possible
• Launch method: Launch agents via SSH
• Host: [Your Agent IP]
• Credentials: Add -- Jenkins -- SSH Username with private key
• Host Key Verification Strategy: Non verifying
Add SSH Credentials
Click "Add Credentials"
Select "SSH Username with private key"
Set scope to "Global"
Enter ID: "jenkins"
Description: "SSH key for Linux agent"
Username: devops
Private Key: Enter directly
Paste the private key from agent machine
Click "Add"
Test Connection
Click "Save" to create the node
Check agent status in dashboard
Verify connection logs
3. Test Agent Node Functionality
Create a freestyle project and force to run this job on linux agent node.
🔔 Don’t forget to like, subscribe, and hit the bell icon to stay updated with more DevOps tutorials!
#Jenkins #Linux #DevOps #CI/CD #agent-node #tutorial