an ironic ❤️
HAL seems to gather those types of ❤️
that’s the “good” old decision (for output) to state that 1-items lists can be simplified to the item alone
haa
This decision has so many benefits: • when looking at samples you may overlook the fact that you may get several values for a field • if simplification is mandatory (or coder is mislead) then code outputting this stuff gets more complex because of a branch to check of there’s only one item • reader code has to deal with both cases all of these for saving two chars!
@cgrand I just discovered aws-clj-sdk, thanks for the good work! I noticed that only a subset of the SDK is currently supported. Since you have machine-readable descriptions to generate from, what’s preventing you from supporting everything?
xml?
🙂
and another question: I noticed you’re generating specs as well, could that lead to a good way of mocking AWS services for testing some day?
I guess mocking the data is one part, but testing against state and side-effects (some APIs don’t reflect changes immediately) is another thing to consider
@stathissideris AWS services do not all use the same protocol, so you have to write a code generator for each protocol. Most of the time a generator|portocol is used by many services.
@viesti yes, I sure it’s not as easy as having specs for the API, but it’s a good basis I guess!
there’s https://github.com/juxt/mach but it doesn’t have the concept of state tracking like Terraform
@baptiste-from-paris is working on the query
protocol atm
haven’t actually used Mach (read: have not forced my colleagues to it :)) but should have another look, it can be used to make playing with Terraform nicer
@cgrand understood! that explains the “protocol” issues on github
a propos, was briefly looking at https://github.com/portkey-cloud/aws-clj-sdk/issues/8, seems that https://search.maven.org/#artifactdetails%7Ccom.amazonaws%7Caws-java-sdk-models%7C1.11.289%7Cjar contains models, but didn’t find partitions
@viesti yeah, I know about mach, but I’m thinking stand-alone clojure. Also terraform does not support the whole of AWS, it sounds like aws-clj-sdk some day will
on specs: before a hiatus in dev I was working in splitting/refining generated specs
yeah, the goal is to find a nice description of stuff in AWS as data and then a way to put that data into the APIs
see branch wip-before-end-of-2017
at some point I was toying with the idea of using weavejester’s integrant for defining the aws stack, as if to start/stop services with it
@viesti haha, that blew my mind a little 🙂
but then you’d have to persist the system structure somehow
@stathissideris so all that is missing is someone willing (and having time) to tackle these protocols
because you want your clojure program to stop at some point without taking the remote stack with it
might end up with something like terraform, having previous state persisted somewhere, being able to diff it, and use this “lib” as a way to start new parts
@cgrand yeah, makes sense…
yeah I suspect when all protocols are in place, basic terraform-like functionality is a short hop
but then you have the problem of sharing the infrastructure state between multiple operators, locking etc
(terraform does it with dynamobdb and s3)
What’s wrong with CloudFormation? 😮
@valtteri does it let you update existing stacks in a declarative manner?
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/update-stack.html yes EDIT: maybe better link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html
re: locking, would it be naive to go with an immutable description and a mutable reference (and a conditional write on it).
@cgrand I think the problem is more how you share state between multiple users on different machines, terraform enables that scenario
@stathissideris I think that’s what I’m talking about too; nevermind I’m no infrastructure expert
@cgrand me neither, I’m a devops hack at most 🙂
I have fond memories of simple use of xml documents for a project file format for a desktop app, I guess bad practices kill minds, but there's needless complexity in xml (it being a markup language)
yeah it’s a good markup language (mixed context etc.) that has been abused as a data language.
so APIs were broader than required for data, allowing too many issues and the creation of a cottage industry to fix them through complexity
I guess Cloudformation solves this by having runner inside the aws environment and having it not run multiple copies of a stack
should probably look more into Cloudformation, but have been on Terraform track for now (after some maybe misguided fat fetching use of Ansible)
One tends to make modules in Terraform, each with own state, so less overlap
but hmm, would need some time for thought on aws-clj-sdk
Cloudformation has something equivalent to modules too
You can nest stacks in CloudFormation
and have cross-references between stacks, whether nested or not.
@stathissideris there a 5 “protocol” implement, we’ve done rest-json
and I am currently working on query
protocol
note that all “shapes” are done (aws data structure, kind of a swagger)
so the job right now is to format requests for each kind of protocol
and then to deserialize the response
@baptiste-from-paris I really like the project, I wish I had some spare time to contribute!