Modularize / uniformize / refactor Bash management scripts
The management Bash scripts are currently hard to write (at least for me) and to maintain (at least for me). It would be great if we could refactor them to treat similar things in the same manner. Does that make sense? An example:
Often, we want to start a service (either locally or via Slurm), then wait for it, and then possibly do something with it. It would be great if this could be treated in a uniform manner across all services. For example, literally every start / wait script currently has an if / else at the bottom that checks whether the action is to be taken locally or via Slurm. That repetition should not be necessary.
Another example is the writing and sourcing of env files. We have multiple services, each with their own env file, yet we still manually write and source them in multiple Bash scripts.
And the list goes (probably) on. So I'd propose we try to simplify the management scripts incrementally. A caveat is, of course, that I don't know in how far it's feasible / reasonably easy to do in Bash to modularize all this.
I'll start with the above two items, but please extend and keep up-to-date this list as we continue working on the project:
-
uniformize / refactor start-wait-act loop for services -
uniformize / refactor env files creating / waiting / reading