Docs
Architecture
One manager in your AWS account serves the routers of both clouds, each beside its workloads.
5 min read
A router naps and wakes the workloads of one AWS account or Google Cloud project, in one region. The manager discovers, onboards and operates them all.
Each arrow goes from caller to called. Its scenarios, replayed: Installation, Discovery, Onboarding, Napping, Waking, Scheduler, Router update and Manager update.
- A visitor's request reaches your load balancer.
- Awake, the load balancer sends it straight to your workload: Dormeto stays out of the path.
- Asleep, it goes to the router's waker, which answers the waiting page.
- The waker asks the controller for a wake, through a Cloud Tasks queue on Google Cloud.
- The controller starts the workload, then gives the load balancer its route back.
- Every 5 minutes, the schedule runs the controller's idle check.
- The check reads the request counts, and naps each workload idle for its window.
- Routers put their events on the manager's bus.
- Google Cloud routers ask the API for credentials hourly.
- The manager calls each router to nap, wake or onboard; its watchdog, a silent Google Cloud router.
- It reads each AWS account as DmtDiscoveryRole, and installs its router as DmtCommandRole.
- For Google Cloud, it trades its AWS signature for short-lived tokens: no key.
- As its discovery account it reads your projects; as its command account it binds the tag.
- Operators open the dashboard: its pages from CloudFront, sign-in with Cognito, the API.
- dormeto aws calls the same API, signed with your AWS credentials.
- dormeto gcp, as you, installs the Google Cloud routers and connects the manager.
Service icons: AWS Architecture Icons and Google Cloud product icons, trademarks of their owners.
The manager
It runs in one AWS account and region, installed with Terraform (Get started). Its settings: Manager.
| Component | Service | What it does |
|---|---|---|
| The dashboard | Serves the dashboard's pages from a private bucket. | |
| Sign-in | Signs the dashboard's users in, with an authenticator app (Manager). | |
| The API | Answers the dashboard and dormeto aws; gives Google Cloud routers credentials. | |
| Its code | Runs the API, discovery, operations, savings, IP lists and the watchdog. | |
| Operations | Runs each operation and each discovery run, step by step. | |
| Its data | Holds the manager's table: workloads, history, operations and audit. | |
| Router events | Takes every router's events on its bus, queued for its code. | |
| Its schedules | Starts discovery, savings, the IP lists' downloads and the watchdog. | |
| Health alerts | Sends the alerts to alert_emails; an alarm watches the watchdog. | |
| IP lists | Keeps the lists it downloads, which its AWS routers read. | |
| The install | Plans and applies the manager's Terraform for dormeto aws install. | |
| Its roles | Its own roles, and those it assumes in your accounts (Roles). |
A router
What it creates: Router.
| Component | AWS | Google Cloud | What it does |
|---|---|---|---|
| Controller | Naps and wakes the workloads, runs the idle check, answers the manager. | ||
| Waker | Answers a napping workload's visitors with the waiting page, and asks for the wake. | ||
| Onboarding | Adds and removes a workload's routes to the waker (Workloads). | ||
| Its state | Holds its workloads, their settings and their runs. | ||
| Its queues | Carry its naps and wakes to the controller. | ||
| The idle check | Starts the check every 5 minutes (Workloads). | ||
| Request counts | What the check reads of your load balancer's requests. | ||
| Drift repair | — | Puts back what your tools remove of onboarding's changes. | |
| Its identity | Its own identity, with the permissions Roles lists. | ||
| Its code | The manager's release, or Dormeto's public image (Router). |
Your workloads
They stay yours: onboarding tags them, and the router acts on nothing else. What can nap: Eligibility.
| Component | AWS | Google Cloud | What it does |
|---|---|---|---|
| Load balancer | Routes to your workload, or to the waker while it naps. | ||
| Machines | Instances, VMs and their groups, stopped or scaled to zero. | ||
| Containers | — | Services scaled to zero tasks. | |
| Kubernetes | Deployments and StatefulSets scaled to zero (Router). | ||
| Databases | Companions that nap with their application (Router). |
The Google Cloud connection Google Cloud only
The manager reaches Google Cloud through a host project, which dormeto gcp connect sets up (Manager).
| Component | Service | What it does |
|---|---|---|
The pool dmt-<env> | Admits the manager's own roles, from its AWS account only. | |
| The tokens | Trades the manager's AWS signature for a short-lived token: no key. | |
dmt-<env>-discovery, dmt-<env>-command | Read your scopes; call the routers and bind the tag (Roles). |
Who comes in
- Operators: the dashboard in a browser, signed in with Cognito.
- The CLI:
dormeto awswith your AWS credentials,dormeto gcpwith your gcloud account (CLI). - Visitors: your load balancer only; Dormeto's waker answers them while a workload naps.