Terraform vs. Ansible vs. Puppet

Terraform vs. Ansible vs. Puppet


Related discussions:

I would never use Ansible for my IaC. Love it to bake my images. Didn’t puppet die like 5 years ago?
Terraform can’t complete with CloudFormation (esp. if slap Troposphere on top). That’s just my opinion though.

Terraform cannot compete? In that it is much easier to use and much more powerful, then yes it cannot compete because it destroys cloudformation.

Terraform can’t complete with CloudFormation

Interested in hearing why you think this. I’ve used CF on multiple projects and we always end up migrating to terraform.

No rollback support, that’s super critical.

Beyond that when you look at the whole suite of AWS Managed Services and their tight integration. CFN carries the day dude. The CodePipeline integration alone brings more value than anything Terraform could.

  1. Tight integration with all AWS managed services
  2. Troposphere gives it the juice that CFN is missing
  3. StackSets
  4. Vendor support under an existing contract
  5. YAML syntax is bomb (we all know that the JSON was rough)
  6. Rollback support
  7. ChangeSet Support

Just off the top of my dome.

https://aws.amazon.com/blogs/devops/using-aws-step-functions-state-machines-to-handle-workflow-driven-aws-codepipeline-actions/

Like that, explain to me how I achieve that with that level of ease with any of three above technologies?

Not having rollback is a good thing. At first it was a little weird, but once you realize the power of Terraform it’s awesome. Have an apply fail in the middle of a deploy? Fix the error and re-run and it will happily continue where it left off.

If you are 100% in AWS and you will never touch any outside service ever( Github, Datadog, PagerDuty, etc ) than CF makes total sense. The minute you need to touch infrastructure outside of AWS Terraform is hands down the winner.

Alternatively, Apples vs. Oranges vs. Corpses.

I disagree, I run just fine in a hybrid environment at an extremely large scale.

That’s why rollback is important. When something fails and a minute costs you LARGE amounts of cash, automated rollback is very important. Also, rolling deployments anyone?

EDIT: I do use Github and PagerDuty, it all integrates fine. Webhooks and SNS topics man.

Breaking your Terraform modules up into small state files is key. You want to keep the ‘Blast Radius’ small. We run separate stacks for each module. So if someone borks the state file for the firewall stack it doesn’t take down everything.

Using lifecycles in Terraform is very important and should go a long way to preventing outages like you’re referring to. Terraform can wait until it has fully built the new piece before it tears down the old.

What if you have software that has a huge cache? You don’t want to canary or blue-green. You want to do a rolling deployment 1 node at a time?

So I don’t have that issue( using kubernetes ), but I found this article on how to do Rolling updates in AWS with Terraform.

That assumes that service is behind an Load Balancer. Plenty of services aren’t, and its not a true rolling deploy, it still kills the old ASG.

Why wouldn’t you want a service behind a load balancer. We use to do that for everything even if I only wanted one. If the node dies it gets spun back up.

Because a load balancer doesn’t work with services that require persistent TCP connections and sharding.

Well said.
EDIT: /u/singlecoilpickup Like Run the Jewels says “Stay Gold”

Would this help?

Requirements:
An HTTP/HTTPS load balancer.

This isnt HTTP or HTTPS. It’s TCP like I said above.

Right sorry. Have you looked into the newish Network Load Balancers they have?