iam-veeramalla / Jenkins-Zero-To-Hero

Install Jenkins, configure Docker as slave, set up cicd, deploy applications to k8s using Argo CD in GitOps way.
https://www.youtube.com/@AbhishekVeeramalla
MIT License
6.67k stars 12.51k forks source link

Jenkins Docker based agents. #312

Open amalkuriakose opened 2 months ago

amalkuriakose commented 2 months ago

I understand that the Docker agent approach involves running Jenkins agents as Docker containers. This offers flexibility and scalability, as containers can be dynamically created and destroyed based on demand. However, running multiple containers on a single node can lead to resource contention, potentially overloading the node, right? How can we overcome this?

mohammadsyed397 commented 1 month ago

To manage resource contention when running multiple Jenkins agents as Docker containers on a single node, you can set resource limits for CPU and memory using Docker's flags, implement dynamic scaling with orchestration tools like Kubernetes, and monitor resource usage with tools like Prometheus. Additionally, optimize job configurations to reduce resource consumption, utilize Jenkins' queue management features to control job concurrency, and consider separating resource-intensive jobs onto dedicated nodes. By combining these strategies, you can ensure efficient resource utilization and maintain optimal performance.

mohammadsyed397 commented 1 month ago

correct me if i am wrong