Commit graph

15 commits

Author SHA1 Message Date
joeduffy
97f5f54fd0 Update the library mu examples to the latest 2016-12-16 11:23:37 -08:00
joeduffy
540d058cf2 Use a separate service for AWS cluster
This change encapsulates what's required for an AWS cluster in new service,
mu/clouds/aws/Cluster, so that mu/Cluster can remain fairly simplistic (it
just switches on the names and dispatches to the appropriate sub-modules).
2016-12-14 15:15:29 -08:00
joeduffy
4bc7737545 Eliminate quotes from module/import statements
There's no need for quotes here and having them makes it feel somehow
"dynamically typed" (I was subconsciously influenced by Go, I think).
Removing them...
2016-12-13 16:47:27 -08:00
joeduffy
468d7f8f3e A few renames
This change renames a few things; more to come, but this is at least
a self-consistent checkpoint:

* Use the "new" keyword to create service objects and not "resource".

* Use the "func" keyword to indicate functions and not "macro".

* Use "bool" instead of "boolean" for boolean types (more Go-like).
2016-12-13 16:39:37 -08:00
joeduffy
e1c3494ba3 Fix two minor issues in the *.mu files
First, I meant to rename "func" to "macro".  This is perhaps contentious,
however my thinking was to differentiate between functions which have runtime
representations -- like lambdas, API gateway handlers, and the like -- and
macros which are purely a metadata/compile-time construct.

Second, there was a resource naming typo.
2016-12-13 15:44:12 -08:00
joeduffy
2d003a2df3 Sketching out a minimal configuration language
This sketches out a minimal configuration language, inspired by a combination
of the Mull document, Hashicorp's various language efforts, Protobufs, and a
mixture of TypeScript.  I'm attempting to whittle down the concepts to the bare
minimum necessary for a universal "intermediate language" for our runtime that
is (a) complete enough to serve our needs, (b) advanced enough to deliver some
of the improvements in componentization and reuse that we desire, (c) appealing
enough that humans are able to write code in the language while possibly even
enjoying it, and, yet, (d) sufficient for machine interoperability needs.

Of course, I will capture all of this in a proper specification (overwriting
the existing Mull one), however I wanted to land these as a proof of concept and
for feedback purposes.  Obviously, none of this code actually compiles or works!
2016-12-13 15:33:13 -08:00
joeduffy
832bb80b47 Checkin an initial Mu container that targets AWS ECS
This is a work-in-progress.  In fact, it's going to radically change
given the new approach to representing resource construction, however
I wanted the snapshot in source control as we evolve things.
2016-12-12 17:56:54 -08:00
joeduffy
e731229901 Make the Mu library a Node package; get it compiling
This change morphs the Mu library into a Node package and gets it
compiling against the latest AWS library and SDK changes.
2016-12-12 17:56:13 -08:00
joeduffy
5f647b6cc0 Create proof of concept TypeScript resources
This demonstrates what infra-as-code might look like.  Given the difficulties
in expressing everything purely as metadata, I've decided to embark upon a little
spike to see what this would look like.  At first glance, I like it.

To see the difference, compare these to the Mu.yaml files alongside them.
2016-12-12 14:35:00 -08:00
joeduffy
a28f02ce68 Use intrinsics in place of predefineds
This change leverages intrinsics in place of the predefined types.
It remains to be seen if we can reach 100% on this, however I am hopeful.
It's also nice that the system will be built "out of itself" with this
approach; in other words, each of the types is simply a Mufile that can
use conditional targeting as appropriate for the given cloud providers.
If we find that this isn't enough, we can always bring back the concept.
2016-12-05 16:13:49 -08:00
joeduffy
5591103218 Fix a few minor metadata mistakes
As of this, the full cluster Mufile, and its dependencies, typechecks
and produces a valid CloudFormation template!
2016-12-03 15:26:12 -08:00
joeduffy
68181fd0fd Eliminate <>s in cap names
I wasn't sure at first how we'd distinguish between strings and cap names.
At first, I thought we'd need special syntax, e.g. `<vpn>`; however, now I
am leaning towards a "type inference" approach, where we will interpret the
string as a cap name rather than string if that's what the target property
expects.  Although this isn't quite as explicitly typed, that's probably a
good thing in this case, as it eliminates verbosity and weird characters.
2016-11-29 14:48:55 -08:00
joeduffy
d722cc284f Inject the availability zone from cluster settings 2016-11-28 16:30:32 -08:00
joeduffy
6f572a6a5b Add an initial whack at a cluster Mufile
This change adds a super simple initial whack at a basic cluster topology
comprised of VPC, subnet, internet gateway, attachments, and route tables.
This is actually written in Mu itself, and I am committing this early, since
there are quite a few features required before we can actually make progress
getting this up and running.
2016-11-28 16:18:38 -08:00
joeduffy
6e77e0f462 Sketch out some cross-cloud abstraction thinking 2016-11-23 16:20:40 -08:00