Remix.run Logo
gizzlon 3 months ago

> shitty shell scripts, ansible setup and co, i only write a little bit of yaml

Why are the shell scripts shity but the yaml not? When I look at those yaml files I always throw up just a little :P

Also, have you tried Cloud Run?

Deutschlandds 3 months ago | parent [-]

Yaml is declarative, you tell k8s what you want and how it looks.

For shell scripts, try proper error handling. You start doing some catch hooks, you have issues cehcking error codes of different tools, debugging is hard too.

In one infra project we swtiched from shell scripts to golang just to have a lot more control/stability of our scripts.

gizzlon 3 months ago | parent [-]

YAML is not declarative, it's a format. Well, according to Wikipedia it's a "data serialization language". IMO It's also bad choice for this, and those files become unreadable and hard to work with.

Agree that shell scripts are also hard to work with, especially if you did not write them yourselves. I guess it's a combo of the language features of, say bash, and that no one who writes them really know bash. I mean, at all. Including me.

Declarative is nice, but also have pros and cons. And, it's of course many ways to achieve this if that's a priority.

Usually, what you really want is: Low time to replicate AND no data loss if a server blows up. But this also have to extend to, say, the k8 cluster. And, again, many ways to achieve this.

The article does not call for Ansible setups and shell scripts though.

Cloud Run uses YAML btw. One of the things I personally don't like about it

Deutschlandds 3 months ago | parent [-]

Yes sry i was not precise but k8s is declaritive and in that particular case, i find it very fitting. I dont love it, but its direct.

What i like with that declaritive setup: The other side, the executer, can be actually something reasonable to build and be reused. This strategy or architecture, feels a lot better than the classical approach especially because its so so often always the same thing.