Replies: 1 comment
-
Hi @BulzN Happy to review a prototype implementation though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thank you for the outstanding work on Containerlab
It’s such an incredible tool that I’ve even proposed it to my professor at the university here in Romania to become a standard solution for all our networking laboratories. I hope that it's going to be implemented across our faculty
I'd like to suggest an enhancement: adding support for Docker Swarm services as an alternative (or complement) to docker-compose for managing container lifecycle and orchestration
Motivation
While docker-compose is excellent for local and development use cases, Docker Swarm services could offer several advantages, especially in more resilient lab environments:
Improved orchestration and fault tolerance: Swarm provides built-in service replication, restart policies, and self-healing capabilities that can improve the robustness of lab deployments.
Scalability: Services can be dynamically scaled using docker service scale, which is helpful in large topologies or automated testing setups.
Enhanced lifecycle management: The service abstraction allows more controlled rollouts, updates, and rollbacks through native Docker tooling.
Proposal
This feature could be introduced as an optional backend for users who want to run labs using Swarm mode:
Detect whether Docker Swarm mode is active (docker info).
Generate and deploy Swarm services instead of (or in addition to) docker-compose stacks.
Use the Docker Engine API or CLI to create, update, and remove services.
Optionally allow the use of Swarm configs/secrets for more secure or modular lab designs.
Why Swarm Instead of Kubernetes?
While Kubernetes is the de facto standard in many environments, Docker Swarm has a much smaller footprint and is easier to adopt in lightweight, container-focused workflows like those used in Containerlab. It doesn’t require an external control plane and can be bootstrapped in seconds on a single node, which is ideal for education, experimentation, and rapid prototyping. Specially for those who want to test scaled services and how they behaved in different lab environments.
Compatibility Considerations
This would be an opt-in feature. The default behavior with docker-compose should remain unchanged, preserving the current simplicity and user experience.
I hope this could be considered as an idea for a future enhancement. But even if it’s not considered further, the tool is already absolutely great as it is. It’s more of a “would be nice to have” rather than something critical or major that needs to be implemented.
Beta Was this translation helpful? Give feedback.
All reactions