Designing the Container Layout for rdsys
There are two different kinds of container layouts we can choose from. Namely "Bundle" or "Individual". Here is an analysis of the advantages and disadvantages of both approaches in the context of rdsys.
Context
The sysadmin team have informed @meskio that there won't be a cluster to deploy our application, however, we will be allowed to use podman.
Bundle
Bundle means packing everything into a single image. This is the way most user-facing containers are designed. Softwares like minikube bundle an entire cluster consisting of different kinds of software into a single container. This allows a docker container to work as an LXC/OpenVZ container VPS.
Pros:
-
[+]
Easy deployment. A single image application can be deployed in almost all environments, including the one tor hosting has provided. -
[+]
Predictable behaviour. Since all components will be updated at the same time, there won't be any unexpected version inconsistency. -
[+]
Full Toolchains. Since a container has all the components, software like systemd will work as intended with Timers, Services, etc. Attention: -
[!]
No horizontal scaling. This is fine since the code does not support horizontal scaling anyway, and there is no cluster to scale on. -
[!]
Logging/Admin requires special care. The container runtime's tool will not work with a Bundle image. A separate design is required.
Individual
Individual means Packing each individual component as a separate image. This allows each component to be updated and restarted independently. This is the way recommended by cluster software.
Pros:
-
[+]
The container management tools will work as expected. This includes log and lifecycle administration. -
[+]
Each component can be updated individually. -
[+]
Different components with different runtime environments do not need to share same file system namespace. Attention: -
[!]
No horizontal scaling. Not supported by code design. -
[!]
No Timer. Podman does not come with corn. This can be solved by running containers with systemd Timer.