jenkinsci / jenkinsci/docker-swarm-plugin

Limit number of container instances for each agent template

Open
#116 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
56
Forks
55
PR merge metrics
No merged PRs in 30d

Description

### Feature Request

As requested in #16 , I also would like to limit the number of containers similar to the [Docker plugin](https://github.com/jenkinsci/docker-plugin).

My use case involves needing to limit the number of jobs running based on non-RAM or CPU resource constrains. For example:

There are 4 test platforms total. Two platforms are configured to support "A" labeled jobs, and have a docker image that is compatible with this "A" configuration. One is configured to support "B" labeled jobs, and the last is configured to support "C" labeled jobs, with "B" and "C" compatible images.

With the Docker plugin, I can create three Docker agent templates for each type of job (A, B, and C) with appropriate images, limit the instance capacity for each template according to the number of each resource exists (2 of A, 1 of B, and 1 of C), allowing jobs to be executed as resources become available.

I'm struggling to scale with the Docker plugin, as the number of test platforms and servers involved are growing. It would be much more elegant to have all docker hosting servers pooled into a swarm, and agent template instance capacities would apply to the swarm rather than each server.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by comparing the Docker plugin's per-template capacity behavior with this plugin's swarm agent-template provisioning; done means each template can limit concurrent container instances across the pooled swarm resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.