Cloud Infrastructure
Since www.sommerfeld.io and the corresponding website image(s) experienced refactoring, …
|
This is the latest and up-to-date Terraform configuration for all *.sommerfeld.io services running in the cloud (meaning every service/subdomain outside www.sommerfeld.io). The cloud provider of choice is DigitalOcean although some services might run at Linode.
For further information on the decision process take a look at ADR: Cloud Provider.
For information when to use which DigitalOcean object / platform, take a look at the "Guidelines and Conventions" page.
Building Block View / Whitebox Overall System
The domain provider needs some DNS settings to ensure the name resoulution for all subdomains for sommerfeld.io point to the right cloud provider. Each cloud provider has its own subdomain and for which the proper NS recores are set. The NS records need to be added under the DNS zone of the main (sub-) domain. This way name resolution for further subdomains is delegated to the respective cloud provider.
These basic subdomains are configured for the domain "sommerfeld.io" through the domain providers management console. This initial setup takes place once for each subdomain.
Domain | Provider | Target |
---|---|---|
apps.sommerfeld.io |
tbd |
Reserved for different cloud (similar to |
cloud.sommerfeld.io |
DigitalOcean |
Used for DNS settings → NS records point to http://ns1.digitalocean.com, http://ns2.digitalocean.com and http://ns3.digitalocean.com. |
digitalocean.sommerfeld.io |
DigitalOcean |
DNS config is exactly the same config as |
linode.sommerfeld.io |
Linode |
Reserved for Linode (similar to |
www.sommerfeld.io |
All-Inkl |
Classic webhosting - no cloud |
The subdomain cloud.sommerfeld.io with correct NS records (configured at the domain hosters web ui) takes care of name resolution. A domain record inside DigitalOcean, which has the same name and NS records, ensures apps can use CNAME records and subdomains inside DigitalOcean. This way the cloud.sommerfeld.io subdomain "controls" the name resolution for all subdomains nested under cloud.sommerfeld.io without the need for additional configs at the domain providers management console. These subdomains / CNAME records (<xyz>.cloud.sommerfeld.io) point to a services <random>.ondigitalocean.app URL.
Inputs
Name | Description | Type | Default | Required |
---|---|---|---|---|
Domain used for DigitalOcean → all Services will be subdomains of this base domain |
|
|
no |
|
Smallest DigitalOcean instance type |
|
|
no |
|
Default location for DigitalOcean resources (= Frankfurt) |
|
|
no |
|
Subdomain for docs-page |
|
|
no |
|
Access token for DigitalOcean API ( |
|
n/a |
yes |
|
Domain used for Linode → all Services will be subdomains of this base domain |
|
|
no |
|
Linode resources size: |
|
|
no |
|
Default location for Linode resources (= Frankfurt) |
|
|
no |
|
Access token for Linode API ( |
|
n/a |
yes |
Outputs
Name | Description |
---|---|
The email address of the DigitalOcean account in use |
|
The <random-subdomain>.ondigitalocean.app domain |
|
The <subdomain>.cloud.sommerfeld.io domain |
|
The email address of the Linode account in use |
-
Take a look at https://api.linode.com/v4/linode/types for Linode resource types (node sizes to use with Terraform).
-
For DigitalOcean resource types take a look at https://slugs.do-api.dev (the slugs are the node sizes to use with Terraform).
Risks and Technical Debts
Scale for Probability and Impact: Low, Medium and High
# | Title | Description | Probability | Impact | Response |
---|---|---|---|---|---|
1 |
none |
none |
none |
none |
none |
Further Information
-
For docs on DigitalOcean with Terraform see https://docs.digitalocean.com/reference/terraform and https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs.
-
Also see the Tutorial Series: How To Manage Infrastructure with Terraform on the DigitalOcean website.