ADR: Cloud Provider

Which cloud provider will host my container-based services and websites? All applications run inside containers, so there is no need for traditional Virtual Machines. VMs are handled by the local Proxmox server. Docker images are hosted on DockerHub.

Status = Done (2022-05-19)

Requirements Overview

  1. All application run in containers. The cloud provider must offer a way to deploy and run Docker images.

  2. Since there is not much load that needs to be handled, there is no need for sophisticated high availability and failover. Containers don’t need to run in kubernetes. Containers should run "directly" in some way without provisioning a VM with Docker first.

  3. Cloud provider must allow Infrastructure as Code using Terraform.

  4. Cloud provider must offer DNS servers so that subdomains can point to services in the cloud but the www-subdomain still is handled traditionally by the classic web hoster.

  5. There is no need to build the images in the cloud. There will be a separate build process and images are deployed to DockerHub. The cloud provider must use these images from DockerHub.

Quality Goals

  1. Everything is Infrastructure as Code.

  2. All services run in containers.

Decision

Digital Ocean is the cloud provider of choice. Based on the active community, AWS or Google Cloud Platform are the clear winners. But since they are (way) more expensive, the cloud provider of choice is Digital Ocean. Linode comes in second and can be relevant when the usecase does not need docker images outside of kubernetes (for VMs, Linode seems slightly cheaper plus Terraform support and docs seem slightly better).

Todos resulting from this decision

  1. Setup docs.sommerfeld.io with Terraform (Run container, add Load Balancer, use https)

Decision details

AWS and Google Cloud Platform offer by far the larger feature set, DigitalOcean and Linode provide much less. But most of these features are not relevant to sommerfeld.io and other project usecases.

For further information and comparisons, see https://comparecloud.in.

AWS and Google Cloud Platform offer the most active community with good help on StackOverflow and SuperUser plus the most information for Terraform. AWS is more or less the default cloud provider for most Terraform tutorials and blog posts.

AWS seems to be 10x more expensive than Ditigal Ocean. Google Could Platform seems to be twice as expensive than Digital Ocean. Linode seems similar in cost and feature set seems to lack easy Docker container deployments.

AWS DigitalOcean Google Cloud Platform Linode Info / Comment

Run Docker Images directly with App Runner

Easily run Docker Images directly with Apps

Run Docker Images directly with Cloud Run

From a first look at the Web UI it seems that Container deployments need Kubernetes

Essential requirement - No VM with Docker, Kubernetes, etc. should be needed.

App Runner works with AWS container registries ony. DockerHub not supported

Deploy images from DockerHub

not checked

not checked

$0,064/ hour vCPU + $0,007/hour GB = (for April) 30 days * 24 hours = 720 hours - hours * costs = $51,12 for whole april

1 App (= Docker Image): 5,00€

Simple calculation for "Cloud Run" results in $11,50 per month

From a first look at the Web UI it seems that Container deployments need Kubernetes

All calculations are based on 1 Docker app (= 1 running Docker container)

Most resources (tutorials, etc.) available - Terraform AWS Provider

Good documentation from vendor but not too many tutorials, howto articles and blogs on the internet - especially when Terraform is involved.

Lost of resources (tutorials, etc.) available - Terraform Google Provider and Terraform with Google Cloud

Good documentation from vendor but not too many tutorials, howto articles and blogs on the internet regarding Docker. Better Terraform docs than DigitalOcean

Good StackOverflow support

The first PoC showed, that StackOverflow and SuperUser don’t provide much help with questions.

Good StackOverflow support

No really checked for this ADR but it is expected that Linode feels similar to DIgitalOcean.

Active community with large forum is really important.

Provides a CLI tool

Provides a CLI tool

Provides a CLI tool

Provides a CLI tool

CLI should not really be needed because Terraform should handle everything.

Allows IaC with Terraform

Allows IaC with Terraform

Allows IaC with Terraform

Allows IaC with Terraform

Complex Web Management UI

Simple Web Management UI

Complex Web Management UI

Simple Web Management UI

Terraform should reduce the need to use the Web UI.

DataCenter Location in Germany (Frankfurt)

DataCenter Location in Germany (Frankfurt)

DataCenter Location in Germany (Frankfurt)

DataCenter Location in Germany (Frankfurt)

not checked

Simple HTTPS setup and domain configuration for Docker apps

not checked

not checked

Not yet checked with Terraform