slub / ocrd_kitodo

Docker integration of Kitodo.Production and OCR-D
MIT License
9 stars 6 forks source link

Improving separation of concerns #19

Closed SvenMarcus closed 2 years ago

SvenMarcus commented 2 years ago

Separations of concerns is currently a bit messy between the submodules and the main repository. The submodules each provide a single service, but at the same time contain configuration and scripts to make them work together. E.g. kitodo-production-docker contains ssh configuration in order to work with ocrd manager in startup.sh, for_production.sh in ocrd_manager contains the commands to trigger ocrd in ocrd_controller. And all of the above only works if one generates the SSH keys and configuration in the main repository. This leads to a situation where one sometimes has to either change the main repository or a submodule in order to adjust the configuration on how the services work together.

Therefore I suggest the following approach: The submodules kitodo-production-docker, ocrd_manager and ocrd_controller should only provide docker-compose files that can set up the services. The main repository should contain all the details on how the services work together and provide docker-compose files that selectively override settings from the submodules as needed.

I've already started working on docker-compose files that override some settings for the communication, mainly to remove duplication. If we decide to go along with this I can make a couple of PRs to main repository and the submodules in the next couple of days.

markusweigelt commented 2 years ago

Yes exactly we had a similar idea here and already started with the controller. I also think it makes sense to roll that out to the other parts. The main repository should therefore contain e.g. env file, ssh key generation, etc.

It would be useful to have a short call here to avoid duplications?