-
The reason not providing agent docker image is that agent package is generated from current version of server, and always get upgraded automatically when server is upgraded. If maintain an agent docker image, I have to maintain a server/agent version compatibility matrix which adds overhead.
Also for large scale CI/CD jobs, OneDev can run them as pods in k8s without agents.
-
Hm I see. But I think it would be totally fine to not have a compatibility matrix and instead define that server and agent must have the same version. People usually use some tools to deploy docker swarm services, e.g. docker compose. I would be totally fine to update the version of the 1dev/server image as well as the version of 1dev/agent image in that docker-compose.yml file so that they always match.
My workflow would be:
- Scale down 1dev/agent docker swarm service to 0 replicas so that no remote builds can be done anymore
- Upgrade 1dev/server image in docker-compose and redeploy the 1dev/server docker service
- Download the new Agent, build and push a new 1dev/agent image matching the version of 1dev/server
- Update docker-compose again with new agent version and redeploy agent service.
Obviously step 3. is what I want to avoid and just pull from docker hub.
A different approach for an 1dev/agent docker image could be to just let it fetch the agent from 1dev/server when the 1dev/agent starts. When 1dev/server is updated the container could detect that and either terminate and be restarted by docker (which would mean the matching agent would be downloaded again automatically) or the current agent upgrade process could be triggered if the 1dev/agent image can make sure to not terminate itself after upgrade. So basically PID 1 must be always running while the container can still upgrade its containing agent.
-
OneDev
changed state to 'Closed' 4 years ago
Previous Value Current Value Open
Closed
-
OneDev
changed state to 'Released' 4 years ago
Previous Value Current Value Closed
Released
-
State changed as build #2259 is successful
| Type |
Improvement
|
| Priority |
Normal
|
| Assignee |
A ready to use docker image for OneDev Agent would be nice in order to make any docker host accessible to jobs via remote docker executor.
For example when having a docker swarm cluster such an agent could be easily deployed as a service on multiple cluster nodes (controlled via node labels and placement constraints).