Live data from Hacker News

Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

github.com

131–140 of 172 posts

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#131
post #89
post #68

Earlier quoted context omitted.

My life on AWS the last five or so years really would have been a lot simpler if every new generation of EC2 servers didn't have the exact same ratio of RAM to cores.

At this point the memory:vcpu ratio is the defining characteristic of main general purpose C/M/R series, I'd think it would be pretty disrupting to change that significantly anymore. And they got also the special extra-high memory X series available. I would say ec2 is pretty flexible in this regard, you have options for 2/4/8/16/32 gigabytes per vcpu. It's mostly problem if you need even less memory than what C seri…

As products age they tend to use more memory. Add in space/time tradeoffs asking to use more. You either get stuck applying the brakes trying to keep the memory creep at bay, or you give in and jump to 2x the memory pool which will disappear too.

The old solution in on-prem was to populate machines with 2/3 to 3/4 of their max addressable memory and push back on the expensive upgrade as long as possible, or at least until memory prices came down for the most expensive modules. Then faster hard drives or new boxes are the next step.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#132

Earlier quoted context omitted.

I would agree with you, if HCL wasn't a bad language in itself: * You can't make have variables in an import block (for example, to specify a different "id" value for each workspace) * There is no explicit way to make a resource conditional based on variables. Only a hacky way to do that using "count = foo ? 1 : 0" * You can't have variables in the backend configuration, making it impossible to store states in differ…

For Terraform, most of the issues with conditionals can be resolved by creating dictionaries dynamically and looping through it to generate resources. You get the bonus of controlling the resource id and being able to selectively delete resources without worrying about ordering.

This massively depends on your provider code. Using loops to manage tf stuff can you you into really “fun” scenarios when you want to e.g delete an openstack firewall rule from the middle of the array.

I’ve been burned so many times here that I hate all of this stuff with an extreme passion.

Crossplane seems to be a genuinely better way out but there are big gotchas there also like resources that can simply never be deleted

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#133
post #63

Earlier quoted context omitted.

We had so much conflict with the ops team over their choice of Terraform. The three colors of variable thing is just fucking bonkers. Getting tests wrapped around it that actually did what we thought they meant was a giant pain in the ass. I won't go as far as to say we burned bridges arguing back and forth about it but they were definitely significantly singed. Config files simply don't work until they do. And if it…

Ever thought that "Ops" needs a different mindset than the devs are used to ?

[deleted]

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#134

Earlier quoted context omitted.

That makes sense I guess, I just never considered locals or data resources as variables.

Same, locals are in my head like consts. You define it and it stays that way. A shortcut for a repeated value. Data resources are you requesting a dynamic value of your environment. Variables are dynamic values that a user can change.

That’s only the case if you spend all day rerunning deployments. If your task is more frequently to transition the cluster config from A -> B then the distinction blurs and you go from a 10:1 delta ratio of the different classes of state to maybe 3:2, at which point it feels like splitting hairs.

Especially if the locals vary between prod and pre-prod, and worse if dev sandboxes end up with per-user instances, which for us was mercifully only needed for people working on the TF scripts, so we could run our tests locally.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#135

Earlier quoted context omitted.

Honestly curious, I've been writing terraform for a while but I have never heard of "The three colors of variable thing". Could you expand on that?

They mean var vs local vs from-a-resource. There are some places you can’t use some types of variables. It can be annoying but it’s not really a huge problem if you design your approach with that in mind. The worst part is that the Terraform team at Hashicorp often excuse not fixing these design issues as “safety measures” which isn’t entirely untrue but when over half of your users want something, sometimes you shou…

So would you go opentofu or pulumi or Sir Not Appearing in This Film?

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#137
post #78

Why's everyone going away from declarative? Terraform, CloudFormation, AWS Copilot etc have a lot of virtues and are programming language agnostic. Using a complex programming language (C++ of the browser world) just for this has a big switching cost. Unless you're all in on TS. And/or have already built a huge complex IaC tower of babel where programming-in-the-large virtues justify it.

A small CDK project is a lot more readable in my opinion. It doesn’t have a ton of yml files where your config is spread out

It seems to me that there's not a big difference in nr of files. You can have a single template in CF or Terraform files and similarly you can split your CDK code in many files, or not.

(For bigger stuff apparently CF has some limits relating to resoures per single stack)

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#138

Earlier quoted context omitted.

Yes

What's your argument here? For example, Typescript allows lots of operations on objects that cannot be known at compile time because it relies on the user to inform it of types accurately, anything can be coerced into anything without complaint with "as", and it allows for arbitrary operations on an "any" type without complaint. I've heard it referred to it as an "optionally typed" or "gradually typed" system, which,…

Pretty easy to add runtime validation at the edges with Zod https://github.com/colinhacks/zod

Great thing is that the zod schema also doubles as your typescript type so you don't have to write a duplicate/shadow TS type definition.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#139

My DO K8S cluster ist bugging me every couple of months to do an upgrade. I am always scared to just run it but moving shit over to a new cluster instead is so much work that I simply gamble on it. AWS ECS is worth over penny

DO's K8S is more equivalent to AWS's EKS offering, so of course ECS which abstracts away pretty much all of the other parts of K8s is going to require less maintenance. It's sort of a false equivalence to say ECS == that solution. On EKS, you need to do the same version updates with the same amount of terror. You do pay the extra for the further management to just run containers somewhere! (you might want to say "eve…

I definitely want to say is instead of ist but it is bugging me every couple of months. You do the upgrade and 6 months later it needs another one. No LTS in sight

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#140

Pulumi is really a royal piece of shit. Why the f*ck am I writing code to do "deployment". In C# --> new Dictionary when dealing with a values.yaml for instance. The whole need to figure out when and when not to use Apply. Give me Terraform (as much as I hate it) any day.

What about pulumi's declarative yaml interface which can be exported from type-safe languages like cue? https://www.pulumi.com/blog/extending-pulumi-languages-with-...
Post reply on HN