Build Docker Swarm Deployment Configuration
Closed this issue · 0 comments
mattheworris commented
As a developer I want to be able to deploy gateway services using Docker Swarm for orchestration.
Solution
- Define a local Docker Swarm for testing purposes. (Local ENV: Docker Desktop using DinD to build the swarm network and nodes).
- Modify the docker-compose.yaml files so that they work with Swarm.
- Confirm gateway services work with local swarm deployment.
- Write terraform files that can deploy the swarm on a local deployment.
- Modify terraform files to use AWS EC2 instances for deployment. (Test with LocalStack before real deployment to AWS)
Notes
profiles
are not compatible with Docker Swarm, so there is some re-work that needs to be done. This probably initially limits our adaptability, as we cannot re-use the work thatstart.sh
to enable service selectively. Specifically, swarm mode compose files are Compose V1 andstart.sh
depends on features introduced in Compose V2.- Docker Desktop does not support swarm mode.
- Docker Desktop with DinD to model different nodes partially works. Swarm stacks can be deployed but visibility into the individual services is very limited and only
aarch64
images will run DinD. Overall, we have learned how to modify compose V1 files to be used with swarm mode, but have not reached a functional local deployment that is easily used. - Quickemu to launch VMs: There is a bug in the macOs version that does not validate the hash of any
.iso
used to launch a vm. This is worked around by modifying the bash script. A PR will be created to contribute the fix. Once the VM is running, networking between the VM's was not possible on macOs, due to limitations between macOs and qemu emulation layers. - OrbStack: A macOs native (Swift) Docker Desktop replacement. Launches VM's very easily and provides automatic networking and connection to the host machine file system. Docker swarm was able to be deployed, however docker stops responding after the first command. Unclear what causes docker to stop responding.