Fork me on GitHub
#portkey
<
2018-03-17
>
viesti12:03:45

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)

viesti12:03:58

the thing seems quite nice, a spec for that would allow some amount of local validation, would need to parse Refs though

viesti12:03:27

for a moment though of local cloudformation interpreter

viesti12:03:03

but that scope gets out of hand quick :)

viesti12:03:27

maybe just trying to get the next goal of portkey

viesti12:03:40

although there's already some amount of work in github issues also :)

Chris Bidler14:03:57

@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

cgrand15:03:35

Should we schedule a hackday?

viesti19:03:56

Would this be remote or next to another event (say conference) where people could gather to a same location or both? (remembering that there was unrepl hackday before/after a conference but can't remember now which one)

cgrand19:03:07

First hackday was before a talk I gave at clojure berlin (the user group). Second was before clojureD.

cgrand19:03:34

Somehow we had a hack morning in Helsinki

cgrand20:03:20

I have never tried the remote formula.

cgrand20:03:14

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.

viesti06:03:40

I like that idea :)

viesti12:03:21

If this ia in Finland, we have to have sauna too :)

cgrand14:03:59

I don’t know if it’s feasible though/if there would be interest

viesti18:03:45

yeah, can accept sunny place in France too :)

viesti18:03:56

so hmm, when and where would be next opportunity

cgrand20:03:58

The feasibility was not on the location but on the idea in general!

cgrand20:03:51

Next opportunity for? A sabbhacktical week or a hackday?

viesti17:03:08

Learned a new word, sabbhacktical :)

viesti17:03:52

For ClojuTre last fall, we did a couple remote idea/knowledge transfer sessions. They might have worked better when at same location

viesti18:03:55

teleportation doesn't yet exist, so hmm

viesti18:03:55

at work and at university we used to have codecamps. Work (possibly) and University are good places to gather people together.

viesti09:03:56

anyways, I don't have any planned travels to conferences yet, excluding ClojuTre (but that doesn't require travel)

cgrand09:03:53

I know in about one month if I can attend ClojuTRE

viesti09:03:06

do you have other conference travels before ClojuTre?

viesti09:03:37

extreme talk driven development: hackday just before ClojuTre

viesti09:03:47

maybe I should calm down :)

cgrand11:03:51

Calmed now?

viesti12:03:59

enough so that I need more coffee

viesti17:03:39

@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.

viesti17:03:27

no clear thoughts yet though on CF

viesti17:03:48

but hackday sounds like a good idea!

Chris Bidler17:03:34

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

valtteri18:03:42

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… 🙂

valtteri18:03:02

Heh.. Just needed to google for it https://github.com/brabster/crucible

viesti18:03:22

true for CF data formats not being neat to work with, remembers me of Ansible (Ansible is imperative so even more awkwardness there)

viesti19:03:49

Python alternative to crucible seems to be troposphere https://github.com/cloudtools/troposphere

valtteri19:03:59

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!

viesti19:03:47

wonder if there are models for CF language, as there are models for AWS API shapes

viesti19:03:16

thinking spec generation like in aws-clj-sdk

viesti19:03:58

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)

viesti19:03:17

although I guess a home grown interpreter could do more than the one provided by AWS

viesti19:03:08

crucible could use aws-clj-sdk to call CF apis to create/update stack

viesti19:03:20

another idea: keep CF as edn, but allow expansion with tagged literals

valtteri19:03:22

It would maintain readability but it would still be nice to work with both programmatically and ‘by hand’. Promising! 🙂

valtteri20:03:58

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.

valtteri20:03:34

I just dislike yaml. And JSON lacks comments etc.

viesti19:03:56
replied to a thread:Should we schedule a hackday?

Would this be remote or next to another event (say conference) where people could gather to a same location or both? (remembering that there was unrepl hackday before/after a conference but can't remember now which one)

dominicm19:03:40

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.

viesti21:03:07

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" :)