Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityWindows-Update beschädigt wichtige Datenrettungsfunktion(22.09.2026 um 09:04 Uhr)
Sichere ProgrammierungBuilding an Accessible Ecommerce Product Page with WCAG 2.2(22.09.2026 um 03:39 Uhr)
Sichere ProgrammierungGet Your Website Protected in 10 Minutes with SafeLine WAF(22.09.2026 um 08:42 Uhr)
Sichere ProgrammierungIntroduction to SPRINGBOOT(22.09.2026 um 08:42 Uhr)
Windows Tipps & SecurityWindows-Update beschädigt wichtige Datenrettungsfunktion(22.09.2026 um 09:04 Uhr)
Sichere ProgrammierungBuilding an Accessible Ecommerce Product Page with WCAG 2.2(22.09.2026 um 03:39 Uhr)
Sichere ProgrammierungGet Your Website Protected in 10 Minutes with SafeLine WAF(22.09.2026 um 08:42 Uhr)
Sichere ProgrammierungIntroduction to SPRINGBOOT(22.09.2026 um 08:42 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Day 28: Jenkins Agents

Jenkins Architecture Overview The Jenkins ecosystem consists of two primary components: the Jenkins Controller (Master) and Jenkins Agents. Jenkins Controller (Master) Acts as the central hub, managing workflow…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Jenkins Architecture Overview



The Jenkins ecosystem consists of two primary components: the Jenkins Controller (Master) and Jenkins Agents.






Jenkins Controller (Master)




  • Acts as the central hub, managing workflow orchestration, job scheduling, and configuration.

  • Serves the Jenkins UI, providing a unified interface for users.

  • Delegates job execution to agents, ensuring efficient workload distribution.






Jenkins Agents




  • Separate machines or containers that execute tasks defined in Jenkins jobs.

  • Identified by unique labels, allowing the controller to assign jobs to the right agent.

  • Enable distributed job execution, making it possible to scale Jenkins infrastructure as needed.



Benefits of Distributed Architecture




  • Scalability: Handle increased workload by adding more agents.

  • Resource Management: Isolate builds and tests to prevent resource conflicts.

  • Environment Isolation: Run jobs in specific environments, ensuring consistency and reliability





Day 28 is one of the most important steps in Jenkins scaling: setting up agents (nodes).

Below is a step by step, to follow in order to complete Task 01 (Agent Setup) and Task 02 (Running jobs on agents).





🔹 Task 01: Create an Agent



We’ll create a new EC2 instance and connect it as a Jenkins agent.





Step 1: Create an AWS EC2 Instance for the Agent




  1. Go to AWS console → EC2 → Launch Instance.

  2. Choose Ubuntu 22.04 as AMI.

  3. Choose instance type (t2.micro is fine for testing).

  4. Configure:




  • Security group: allow SSH (22), Jenkins port (8080) if needed, and Docker ports (e.g., 5000) if your jobs run containers.


    1. Download your .pem key (you’ll need it to SSH).







Step 2: Install Required Software on Agent



SSH into the agent machine:




ssh -i mykey.pem ubuntu@<agent-public-ip>






Update and install Java + Docker (must match versions on master):




sudo apt update && sudo apt upgrade -y

# Install Java (example: OpenJDK 17, check your master’s version!)
sudo apt install -y openjdk-17-jdk

# Install Docker
sudo apt install -y docker.io
sudo systemctl enable docker
sudo systemctl start docker

# Allow jenkins user to run docker (create later)
sudo usermod -aG docker ubuntu









Step 3: Configure Jenkins Master to Add New Node



On your Jenkins Master UI:




  1. Go to Manage Jenkins → Nodes and Clouds → New Node.

  2. Enter a name (e.g., agent-1).

  3. Choose Permanent Agent.

  4. Configure:





  • Remote root directory: /home/ubuntu/jenkins-agent (or your preferred path).


  • Labels: e.g., docker-agent, build-agent.


  • Usage: "Use this node as much as possible".


  • Launch method: Launch agents via SSH.






Step 4: Setup SSH Authentication



On master, generate an SSH key for Jenkins (if not already):




sudo su - jenkins
ssh-keygen -t rsa -b 4096 -C "jenkins-agent"






Copy the public key to the agent:




ssh-copy-id -i ~/.ssh/id_rsa.pub ubuntu@<agent-public-ip>






Or manually add it to agent:




nano ~/.ssh/authorized_keys






Paste master’s public key.



Now test:




ssh ubuntu@<agent-public-ip>









Step 5: Verify Connection in Jenkins




  • Go back to Nodes → agent-1.

  • Click Launch Agent via SSH.

  • Status should change to Connected.






Now you have a working Jenkins agent.









🔹 Task 02: Run Previous Jobs on New Agent






Step 1: Add Label to Agent



On Jenkins Master:




  • Go to agent-1 config → Labels.

  • Example: docker-agent.






Step 2: Configure Pipeline to Use Agent



Update your Day 26 or Day 27 pipeline to run on the agent:




pipeline {
agent { label 'docker-agent' }

stages {
stage('Checkout') {
steps {
git branch: 'main', url: 'https://github.com/<your-repo>.git'
}
}

stage('Build Docker Image') {
steps {
sh 'docker build -t myapp:latest .'
}
}

stage('Run Container') {
steps {
sh 'docker run -d -p 5000:5000 myapp:latest'
}
}
}
}









Step 3: Trigger Build




  • Run your pipeline.

  • Jenkins master will delegate execution to the agent.

  • Check in Nodes → agent-1 → Build Executor Status → you should see your job running there.






Step 4: Verify




  • Run docker ps on your agent EC2 → you should see your container running.

  • Open browser → http://<agent-public-ip>:5000 → app should be live.






At this point:




  • Master only controls jobs.

  • Agent(s) executes heavy lifting (building, testing, running containers).

  • You can scale horizontally by adding more agents for different workloads.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Day 28: Jenkins Agents

Thematisch verwandte Begriffe: Jenkins, Agents · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-55210 | Joplin is an open source note-taking and to-do application that organise…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick