4 ms·
> Ansible, Puppet, etc. don’t have intermediate stores of the hosts’ configuration, but then again they are used for different things. Ansible, Chef, Puppet an
by m1keil 4y ago
> Ansible, Puppet, etc. don’t have intermediate stores of the hosts’ configuration, but then again they are used for different things.
Ansible, Chef, Puppet and co existed long before Terraform. If the stateless way would work better, these tools take over the cloud infrastructure space. But they didn't. To me it seems like a good sign that the their approaches didn't fit to infra.
Additionally, one of the biggest terraform selling points in the early days was the change plan feature. The ability to see the entire change that is about to happen as a result of a config change. I don't think it's easy to implement such thing in a stateless system.
Is it possible to create a stateless config for a subset of the resources/providers with a better functionality? Absolutely! Octodns seems like a good example. Another great example would be any of the serverless frameworks out there that do a much better job than Terraform at managing the lifecycle of the functions. But can this approach be applied to every provider and resource?
- Xylakant 4y agoOne of the fundamental issues that I’ve encountered in all of the puppet managed environments is that people would remove resources from the configuration without first explicitly setting them to “absent”, effectively leaving them in an unmanaged state of the previously management configuration. If that state differs from the default, a new machine would end up with a different configuration, potentially breaking things.
- Jasp3r 4y agoAnsible and Puppet are for infrastructure automation across multiple VMs. Terraform is a way to declare cloud (native) infrastructure as code. Ansible and Puppet are not used anymore because of the shift to cloud native, not because they are stateless.
- m1keil 4y agoI wasn't suggesting that CMS fell from grace because they were being stateless. I was saying that when TF just started, these tools were in the right position to take lead over the IaaC space and didn't because the stateless model didn't fit. Take a look at Ansible's cloud modules, they tried. TF's success, in my opinion, can be boiled down to: a) Having a state - allowed them to provide declarative config with plan functionality b) Choosing Go - removed the burden of installing or having to invest in self contained setup like they did with Vagrant & ruby. I'm not a TF zealot. I hate my life every time I need to use it. And yet I know that there are no better alternatives out there. I'm sure there are some nice things in Pulumi or cdk-tf but I doubt switching to any worth the investment with existing TF project. I would be glad to try and play with a tf-like project that works without state - "talk is cheap, show me the code".
- whydoineedthis 4y agoOff topic, but, cdk-tf is useless because it doesn't have a data layer. It gives you the power to write real code, but with no vars to utilize. It's rubbish.
- sgt 4y agoWe adopted Ansible two years ago. Still using it. So clearly there are some users.
- candiddevmike 4y agoYou can manage cloud resources using puppet and Ansible...
- outsomnia 4y ago> If the stateless way would work better, these tools take over the cloud infrastructure space. The tools are not comparable in what they do.
- m1keil 4y agoIn what way? All these tools are "DSLs to API calls with idempotency guards" engines. This is exactly what a stateless TF would be. They all been extended with DSLs that allowed them to manage resources in AWS and other cloud providers. These are in use but far cry away from popularity of tools such as Terraform, Cloudformation and others.
- Too 4y agoAnsible, despite its declarative syntax, is actually just running actions imperatively from top to bottom. Each tiny action itself may be idempotent but removing one action will not undo it on the server. Even within single modules, modifications only add and don’t remove. Consider apt install module, this just keeps installing listed packages but never removes any unlisted, unless you set parameters like apt autoclean, which nobody dares to do. Terraform defines and end-state and uses dependencies between resources to reach that state. Removing a resource from a tf file will remove it from the infra.
- outsomnia 4y agoFrom the article: Ansible, Puppet, etc. don’t have intermediate stores of the hosts’ configuration, but then again they are used for different things.
- inferiorhuman 4y agoLast I checked Ansible can cache facts to a persistent store like a file.
- InvertedRhodium 4y agoPuppet also has PuppetDB, which is functionally similar.