We have an existing configuration consisting of Dockerfiles that we deploy to AWS using ECS to manage containers and RDS for the database.
For ORMA, we now need to setup on infrastructure within the country, hence we need to move away from dependency on AWS services.
An added consideration is that this should be easy to manage by IT personnel within the country.
Ideally, we want a solution that will let us continue developing using containers, and not have to deploy a wildly different configuration inside Vietnam. We also want this setup to be simple to maintain.
Proposal
Use two machines / VMs. On one machine, setup a Postgres database. This can be setup via a simple provisioning script, and would just be a fairly normal postgres install, with security configuration so that it is accessible only from the other machine that runs the containers.
On the second machine, use docker-compose to run all the containers required for the ORMA project, passing in credentials to the Postgres host as environment variables. Scheduled tasks can be run as cronjobs that invoke docker run of a specific container.
This keeps the database on standard configuration, and the stateless containers well isolated from each other, and the process to run them being as simple as a docker-compose up.
I think this might keep a good balance between complex provisioning scripts for each application and handling application isolation, etc. and going for a full-blown cluster management system like Kubernetes, which would introduce its own over-head.
If we do feel we need to scale beyond a single node for all the containers, we can consider moving to Kubernetes, and then writing a docker-compose configuration would be a useful first step toward that anyway.
The Problem
Dockerfile
s that we deploy to AWS using ECS to manage containers and RDS for the database.Ideally, we want a solution that will let us continue developing using containers, and not have to deploy a wildly different configuration inside Vietnam. We also want this setup to be simple to maintain.
Proposal
Use two machines / VMs. On one machine, setup a Postgres database. This can be setup via a simple provisioning script, and would just be a fairly normal postgres install, with security configuration so that it is accessible only from the other machine that runs the containers.
On the second machine, use
docker-compose
to run all the containers required for theORMA
project, passing in credentials to the Postgres host as environment variables. Scheduled tasks can be run ascronjobs
that invokedocker run
of a specific container.This keeps the database on standard configuration, and the stateless containers well isolated from each other, and the process to run them being as simple as a
docker-compose up
.I think this might keep a good balance between complex provisioning scripts for each application and handling application isolation, etc. and going for a full-blown cluster management system like Kubernetes, which would introduce its own over-head.
If we do feel we need to scale beyond a single node for all the containers, we can consider moving to Kubernetes, and then writing a
docker-compose
configuration would be a useful first step toward that anyway.cc @geohacker