hmm
?
happened to look into Cloudformation (the Yaml format, json used to be quite verbose and not even handcrafted but drawn with an editor leading to awkward layout data intermixed with resource definition)
the thing seems quite nice, a spec for that would allow some amount of local validation, would need to parse Refs though
for a moment though of local cloudformation interpreter
but that scope gets out of hand quick :)
maybe just trying to get the next goal of portkey
although there's already some amount of work in github issues also :)
@viesti If you’re looking to add CloudFormation to portkey in terms of being able to say “and I also want this fn
to store its output in a new Dynamo table” or similar …I guess I assume you know about this already, but SAM (https://github.com/awslabs/serverless-application-model) might act as a force multiplier there
Should we schedule a hackday?
If this ia in Finland, we have to have sauna too :)
I don’t know if it’s feasible though/if there would be interest
yeah, can accept sunny place in France too :)
so hmm, when and where would be next opportunity
The feasibility was not on the location but on the idea in general!
Next opportunity for? A sabbhacktical week or a hackday?
Learned a new word, sabbhacktical :)
For ClojuTre last fall, we did a couple remote idea/knowledge transfer sessions. They might have worked better when at same location
teleportation doesn't yet exist, so hmm
at work and at university we used to have codecamps. Work (possibly) and University are good places to gather people together.
anyways, I don't have any planned travels to conferences yet, excluding ClojuTre (but that doesn't require travel)
I know in about one month if I can attend ClojuTRE
do you have other conference travels before ClojuTre?
no
extreme talk driven development: hackday just before ClojuTre
maybe I should calm down :)
Calmed now?
enough so that I need more coffee
@chris_johnson yeah, whipped up a SAM example with two lambdas and one proxy route. Neat to express the configuration in one file (and more can be done). CF wise I guess this is done as a transform that expands into more verbose resource definition.
no clear thoughts yet though on CF
but hackday sounds like a good idea!
Yeah, that’s exactly what it is - the SAM declaration at the top of the template file gets “macro expanded” into a bunch of stuff that is effective but not optimized for developer readability
Personally I find even the CF/SAM/ServerlessFramework yaml syntax quite terrible to work with. It would be awesome to be able to manifest AWS infra as Clojure data structures and call a function to deploy it from REPL… 🙂
Heh.. Just needed to google for it https://github.com/brabster/crucible
true for CF data formats not being neat to work with, remembers me of Ansible (Ansible is imperative so even more awkwardness there)
Python alternative to crucible seems to be troposphere https://github.com/cloudtools/troposphere
wonder if there are models for CF language, as there are models for AWS API shapes
thinking spec generation like in aws-clj-sdk
CF has a service api within AWS so one can distribute the resulting data (ideally) without requiring the consumer to have anything else (say a box for running a tool that interprets the data)
although I guess a home grown interpreter could do more than the one provided by AWS
crucible could use aws-clj-sdk to call CF apis to create/update stack
another idea: keep CF as edn, but allow expansion with tagged literals
First hackday was before a talk I gave at clojure berlin (the user group). Second was before clojureD.
Somehow we had a hack morning in Helsinki
I’ve used Troposphere at work but the Python code tends to get verbose / hacky pretty quickly and it loses the benefit. At the moment my favourite is writing simple, clean and parameterised CF templates by hand. But I’m going to give Crucible a try!
For terraform, we do edn-like. There's a postwalk-ish thing done, when we encounter a namespaced key, we call a multimethod with the namespaced key. The arguments are the path to the current location, the whole map as currently resolved, the value of the key, and this context (for us, that's the config file).
We use it to do things like project/dns-route "x.t"
which then associates a matching route 53 (`(assoc-in whole [:route53-route (last path)] {...})`). We stop when the map stops changing.
It would maintain readability but it would still be nice to work with both programmatically and ‘by hand’. Promising! 🙂
I have never tried the remote formula.
In my case, edn is probably what I actually want. In my early CF-days templates felt overwhelmingly complex and generating the JSON using DSL (Troposphere) felt like a good idea. But after a while I began to “think in CF” and it started to feel more natural to just write the CF directly.
I just dislike yaml. And JSON lacks comments etc.
At times I entertain the idea of renting a large guest house (or a group of) in a sunny place in France to host some extended hack days/unconf. Family accepted.
somehow integrant came to my mind, and remembering that Leiningen project.clj has this form ~(fn [here-be-current-project-map]
although it's not edn. Saw https://github.com/walmartlabs/dyn-edn, but having whole map as resolved as argument allows access to more data, just thinking how dependencies work... data readers could be relatively easy to do, but to watch out not making edn into a "Clojure" :)