This repository has been archived on 2023-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
soft-arch/src/sa/model/decisions/0002-use-docker-for-distrib...

50 lines
2.0 KiB
Plaintext

## ADR #0002: Use docker for distribution
1. **What did you decide?**
The software should be packaged using Docker and docker-compose.
2. **What was the context for your decision?**
An easy to use package format should be used to distribute Smarthut to users effectively, allowing
for ease of installation and upgrade.
The chosen format must be convenient to use both for
the (tinkerer) end user and for the development team
of Smarthut. The format should seamlessly integrate with DevOps pipelines, and should be easily distributable though already established platforms.
The scope of this decision potentially affects the design of the DevOps pipeline and the final performance of the application.
3. **What is the problem you are trying to solve?**
How should the components making up Smarthut be packaged in a single distributable artifact?
4. **Which alternative options did you consider?**
- Virtual machine images, possibly generated through
automated tools like Vagrant or Chef;
- Direct binary distribution, employing static linking
for dependencies and an orchestration script;
- Docker images for each component, and a docker-compose
specification for orchestration.
5. **Which one did you choose?**
- Docker images for each component, and a docker-compose
specification for orchestration.
6. **What is the main reason for that?**
Docker is a de-facto standard for containerization and it pairs nicely
with docker-compose for orchestration.
Pros:
- Seamless integration with modern DevOps pipeline solutions;
- Established distribution channel (Docker Hub);
- Low performance overhead;
- Existing integrations with low performance and IoT level hardware (e.g. [Balena](https://www.balena.io/))
Cons:
- Lack of proper support for Windows and MacOS systems without
building multiple container images, likewise for different
processor architectures (e.g. arm64).