eliasgranderubio / dagda

a tool to perform static analysis of known vulnerabilities, trojans, viruses, malware & other malicious threats in docker images/containers and to monitor the docker daemon and running docker containers for detecting anomalous activities
Apache License 2.0
1.16k stars 164 forks source link

Dagda swarm mode #42

Open eliasgranderubio opened 6 years ago

eliasgranderubio commented 6 years ago

Short description

Create the new feature Dagda swarm mode for running dagda in a distribute way.

Solution

A possible solution for this issue would be develop a swarm mode which works as docker swarm, I mean, a Dagda agent could join/leave a swarm and these agents would be controled by Dagda server (master) for running static analysis or monitoring the containers no matter where those containers are. For this version it wouldn't be neccessary multiple Dagda server (master) run in a colaborative way.

denzuko commented 5 years ago

Wouldn't it be easier to have Dagda talk to the swarm api with a global deployment model and instead of doing rewrite for client(agent)/server(master) design?

eliasgranderubio commented 5 years ago

Maybe that option you describe would be better. Nowadays, Dagda has an agent for remote static anlaysis which is a different process but could be interesting to reuse the functionality already developed instead of rewrite both client and server, define a global model for Dagda agents and masters working together.

denzuko commented 5 years ago

Looks like one is using docker-py already so that would make it rather easy to just query for services within the docker driver.

With that then one should have an array of services which contains the image and container ids of all items on that swarm cluster.

I don't have a strong enough grasp of the code at this point to implement a PR but hopefully this gives some ideas as to how this can be implemented.