Gravity Keep

00 · Gravity Keep

Say what should be true. Gravity Keep keeps it there.

An AWS control plane configured the way a network device is. Edit a candidate, check it, commit it, and the control plane pulls your cloud into line. Then it keeps it in line, every minute, whoever reaches for the console.

A satellite circles a planet on its assigned orbit. A console change pushes it off station; a small burn pulls it back onto the orbit, and it carries on. THE TREE COMMIT-42 DRIFT console, 10:02 PULL reactor, 10:05 THE ORBIT: COMMITTED CONFIGURATION IN ORBIT: STABLE
Station-keeping: a satellite makes small, regular burns to correct its drift and stay in its assigned orbit. Gravity Keep does that for every resource in your tree.

The idea

Three things are first-class.

A network engineer changes a router by editing a candidate configuration, checking it, and committing it, with a number, a comment, and a way back. Gravity Keep brings that discipline to AWS, and adds what a router never needed: a cloud that keeps moving after the commit.

The tree

One configuration for everything.

Namespaces are branches you name yourself. Resources are the leaves. Settings declared on a branch flow down to everything beneath it.

Tree →

The commit

The only way anything changes.

Atomic in the tree, checked before it lands, numbered, attributed, and kept forever. A bad one is undone by a commit too.

Commit →

Convergence

AWS is pulled into line, and kept there.

Reactors compare what AWS holds with what the tree says, and act on the difference, from every commit and every change anyone else makes.

Orbit →

The loop

Events say where to look. State says what to do.

A commit starts convergence. A change in the console arrives as a CloudTrail event a few minutes later. Either way, a reactor reads the resource from AWS, compares it with the tree, and acts on the difference, so a late, lost, or forged event does no harm.

A scheduled sweep reads every managed resource as well, in case an event never came.

Two inputs, a commit and a CloudTrail event, both lead to the reactor, which reads AWS, compares with the tree, and acts: stable, converging, drifted, failed, or unknown. CommitCOMMIT-42, by a person or pipeline CloudTrail eventa change made elsewhere Reactorread · compare · act AWSCloud Control API The treeresolved configuration STABLE CONVERGING DRIFTED FAILED UNKNOWN
The reactor never trusts an event's contents as the new state. It reads the resource with its own credentials.

Why build it

The costs Terraform and CloudFormation leave you with.

Both are good tools. Both share habits that cost real teams time, and Gravity Keep is designed around each one.

PainWhat happens todayWhat Gravity Keep does
Drift is found lateAt the next plan, often in the middle of an unrelated changeFound within minutes from CloudTrail, with the name of whoever made it, and handled by policy
State lives in a fileA state file and a lock table that can be corrupted, split, or lostDesired state is rows with full history; observed state is read from AWS; there is no third copy
Hierarchy is simulatedDirectories, workspaces, provider aliases, and module wiringThe hierarchy is the configuration: placement is inherited
Common settings are copiedEncryption and tags repeated in every module call, or checked after the factStated once as defaults and guardrails
Moving things is surgerystate mv and careful importsA move or rename is one commit and never replaces a resource
Changes that lock you outA bad security group cuts off the people who would fix itcommit confirmed 10 reverts unless you confirm it worked

A first session

If you've configured a Junos router, you already know it.

Two modes, edit and set, show | compare, commit check, commit, rollback. The client is gkeep; the same session runs in a browser terminal, and pipelines call the same API.

The plan is computed against what AWS holds now, not against a state file, and every action is recomputed again just before it runs.

$ gkeep tidewater
Gravity Keep 0.2  control plane tidewater  active COMMIT-41
eric@tidewater> configure
[edit]
eric@tidewater# edit /tidewater/lending/dev
[edit /tidewater/lending/dev]
eric@tidewater# set resource s3.bucket documents bucket-name tidewater-lending-dev-documents
eric@tidewater# set resource s3.bucket documents versioning-configuration status Enabled
eric@tidewater# commit check
configuration check succeeds
plan against observed state as of 09:14:02:
  create   1   /tidewater/lending/dev/s3.bucket/documents
  tags     + managed-by=gravity-keep  + application=lending  + environment=dev
eric@tidewater# commit and-wait comment "Pilot: Lending dev documents bucket"
commit complete: COMMIT-42
  /tidewater/lending/dev/s3.bucket/documents   stable   (6s)

What it is not

Deep on AWS, and nothing else.

  • Not multi-cloud. Terraform remains the better tool for estates that span clouds and SaaS.
  • Not a programming environment. Templates substitute typed parameters. There are no loops, conditionals, or expressions.
  • Not a deployment pipeline. A pipeline loads a reviewed configuration and commits it, as it applies Terraform today.
  • Not a substitute for service control policies. Guardrails are checked at commit; SCPs are enforced by AWS on every call.
  • Not a backup system. A rollback restores configuration, never data, and says so.

The worked example

Tidewater.

Every example follows Tidewater, the fictional lender from Gravity Standard: an organization, a foundation account, and three applications in production. Its whole tree and ten worked sessions are published with the full documentation.

Gravity Keep fits the Standard without depending on it, and the Standard never depends on Gravity Keep.

Draft 0.2. Gravity Keep is a proposed design, not a released product. It is independent of, and not affiliated with, Amazon Web Services or Juniper Networks. AWS service names are trademarks of Amazon; Junos is a trademark of Juniper Networks; Terraform is a trademark of HashiCorp.