-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
worker approach: generic or specialized #8
Comments
@kelson42's propose:
|
Here a comments on the cons about a generic approach:
|
Docker should not run as root. We can discuss long if this is standard or not to have the docker socket writable for a specific container, the only thing I can say is that Portainer which is a minimal UI on the top of Docker has a dedicated option for this so.... It can not be so special. All your usability points are not relevant to me (1 is not a problem, 2 I already answered - see exit code, 3 the log is enough, 4 problem not specific to that solution, 5 I do not want to execute big scripts). If you disagree with that tech solution, you can choose an other approach but I definitely need an easy solution to execute X various scripts to make ZIM files. The requirements are:
Otherwise I will have to continue to run the scripts manually as it will be the only practicable solution to create new ZIM files. |
BTW, part of the agreement problem we have might be solved by creating/starting Docker containers in a a Docker container. That would avoid the RW access to the TOP Docker daemon. So far I know this kind of things also work well. |
How about this? I will implement both approaches, you are free to try any of them. To be specific:
|
After discussion we have decided that:
|
Another alternative to worker design: a single docker compose file, containing
Benefit:
Problem to solve:
Downside:
|
I think we can close that discussion now. I'm glad about the way it is done. |
Regarding how workers should be designed, there are two approaches, generic and specialized. And we need to make a decision to go forward.
Note: the work task used in this issue is referring to things like
mwoffliner
and maintenanceGeneric
Dispatcher send name of script to worker, worker download the script and execute it. Or dispatcher directly send content of the script to worker. In both situation, worker trust the script it receives is legit and executes it.
Pros:
Cons:
Specialized
Every worker is specialized, i.e., one type of worker can and can only handle zim file generation, another type of worker can and can only handle maintenance task in dispatcher. Only parameters / settings are transferred from dispatcher to worker. Worker then do the necessary work. In the case of
mwoffliner
it will be to make sure redis server running, runmwoffliner
command with parameters, upload the file.Pros:
Cons:
The text was updated successfully, but these errors were encountered: