Skip to content

Instantly share code, notes, and snippets.

@gorsuch
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gorsuch/4a26adc4398fb47009e1 to your computer and use it in GitHub Desktop.
Save gorsuch/4a26adc4398fb47009e1 to your computer and use it in GitHub Desktop.
Platform Compiler

Platform Compiler

What follows is a description of how one might reasonably manage the core configuration of a stateless service platform.

definitions

  • input - initial inputs that help describe a desired state. includes information such as allowed amis, application manifests, etc
  • compiler - reads inputs, produces cloudformation templates along with other top-level metadata. (important to note that there could even be multiple compilers)
  • metadata - top-level, global data that describes ideal state of the platform

flow / interactions

inputs -> compiler -> metadata
metadata -> s3://my-platform/metadata/{git-ref}/{sha-256}/metadata.json
testing is done (by human, likely), and new 'golden' url is promoted

Your CI system (jenkins, etc) can take care of compiling and shipping the output to the appropriate location in S3.

Note that your compiler might not produce a single metadata.json, but multiple files. It might be handy to produce an index.json containing a list of each piece with description.

but what happens next?

The system is intentionally open-ended. Ideally the inputs and compiler are open to your organization. The outputs are meant to be made globally available to the platform. Any / all convergence of your platform is meant to be derived from these outputs by downstream tooling.

For example, prehaps you build a cli tool that can execute those templates, intended for bootstrapping and / or repairing the system in the event of an emergency.

$ bootstrap -u s3://my-platform/metdata/{git-ref}/{sha-256}/my-web-stack-prod.json
...

Further innovation is limited only by your imagination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment