aixigo / PREvant

Composing Microservices into Reviewable and Testable Applications
MIT License
12 stars 10 forks source link

Bootstrapping Companions #146

Open schrieveslaach opened 9 months ago

schrieveslaach commented 9 months ago

The support of companions is very limited and is less capable of Docker Compose or Kubernetes files. For example, it is possible to specific files that will be put into the container but something like an additional job is impossible (some applications may rely on a oneshot database migration). This limitation restricts the use of PREvant to simple applications but applications composed of multiple complex applications are impossible to manage on PREvant.

Thus PREvant should be able to bootstrap the companions with a predefined set of configuration files (docker compose or Kubernetes files). Each infrastructure type can start an external container based on an OCI images that generates the desired file format. This format will be parsed and merged with the defined deployment unit before it will be deployed.

schrieveslaach commented 8 months ago

On the architecture level PREvant's backends (Docker or Kubernetes) can start a set of containers that receive a configurable and templated list of arguments and then the containers pipe some Docker Compose or Kubernetes manifest into STDOUT. This can then be used by PREvant to have an set of companions and other configurations (such as volume mappings, see #123) in place. So, applications that can be expressed on Docker Compose or Kubernetes manifest could be deployment and enriched by PREvant.

The payload that PREvant receives in the request body will be merged into the parsed outputs and thus users can reconfigure certain values on the API level.