Docker Community Forums

Share and learn in the Docker community.

Micro Services Dev Eco System

Hi,
We’ve a huge eco system of several microservices running in a docker environment. Considering the infrastructure requirements , It is becoming tough to run all these containers in local dev machine to verify the changes.

I’m thinking of having a centralized environment where all the containers can run and an option where we can route the requests between containers based on some profile routing. For example, Dev A working on service A and based on Dev A profile, the centralized environment should route the traffic coming on to service A to the developer machine.

I’ve used Docker Swarm to run all the containers in overlay network in manager node and the dev machine can join the swarm and run the microservice specific container on the worker node and stop this service specific container on the manager node. I’m able to achieve this, but this doesn’t support multi developer access to the centralized environment.

Any inputs on how we can resolve this ?

Your use case is still not clear enough to me.

Why don’t you use a swarm stack per developer? You could use Traefik as your ingress reverse proxy and use service labels to apply the reverse proxy rules to Traefik. This is far away from beeing perfect, but would allow each developer to run and control his own deployment.

If you’d switch to Kubernetes, you could leverage (k8s) namespaces to separate users und payload. Every developer could take care of his own deployment and as a bonus you bind container ports to a local port of the developer for debugging purposes.

Docker Enterprise provides user management and role based access control for swarm as well. It simply encapsulates the docker-api and allows to “jail” users to “stackname” or a different resource level. Though, this is exclusive for holders of an active Docker EE subscription.

Thanks @meyay for the reply. The use case is that the developer will build their own micro service locally and run the container and hook it to the centralized system and catch here is that the centralized system should support multiple developers at the same time and the containers should be isolated based on the user profile.

I could get this working with Docker Swarm, but the centralized system will be locked to only one developer in such cases.

i’ll try with Traefik. Please suggest if there is any documentation I can refer to.