Using Terraform, Packer, and Ansible Together - Aaron Krauss: DevOps OKC

preview_player
Показать описание
There's a good chance that you have projects running on a server somewhere. What happens if that server gets accidentally erased, or if you need to spin up an identical server? Even if you have backups, you'll still need to spend precious time setting things back up the way you had them - and there's no telling if you'll get it exactly right. That's where this powerful dev tooling combo comes into play. By using Ansible, Packer, and Terraform, you can automate this entire process, getting as granular as you need to be.

In this talk, we'll review what Ansible, Packer, and Terraform are individually, as well as how you can use them together. As a demo, we'll be automating the creation and deployment of a digital ocean droplet that's pre-configured to run a fun personal-project website.

Aaron is a developer at Clevyr and Clevyr Labs where he builds data-driven applications and games in JavaScript, .NET, Ruby, Shell, and anything else awesome.

Keep up with Aaron:

You can support our non-profit through any of the following:
Рекомендации по теме
Комментарии
Автор

I was following along with the talk and created all the files by copying them from the video and was able to successfully create a test image and deploy it on DO. I never used Packer, Ansible or Terraform before. Afterwards I spent a couple of days and I've completely automated deployment of my website on DO! Thanks Aaron :)

NitWomba
Автор

This was pretty awesome. I started here, but extended it to build and deploy to KVM and vSphere. I can deploy several projects including a k3s/golang/CSI dev environment all configured using Ansible within Packer and more in cloud-init in Terraform. I am also supporting both centos and ubuntu. When terraform deploys, the entire team's public ssh keys are installed.

Using make has been hugely useful. zsh completions on make allow us to type very little and have to remember even less. For us, the Makefile becomes executable documentation.

sqqqrly
Автор

Nice talk! Each (logical) line in a Make recipe is executed in a separate shell so there is no need to "cd -" in the end, but if you have two lines, you'll need to "cd blah &&" in the beginning of both.

-ion
Автор

"Droplets", "EC2 instance", etc. Is it just me or cloud providers are using euphemisms to refer to virtual machines? No wonder i was confused for the longest time.

StormWolf
Автор

Ansible question re: @23:00 - if the GitHub repo has been updated, but has already been locally cloned, will Ansible update the local directory?

grvlmaml
Автор

Thanks. It's very useful. Can we not use docker instead of packer and build the image ? Is there any advantages of using packer over docker

seshibejawada
Автор

So the 3 do what ZCS does 10 years ago?

marklowe
Автор

Hi Aaron, love the chat and trying to get my head around it all. What Linux flavour are you running in this demo please as I want to simulate your setup?? Thanks

Twigster
Автор

Hi Aaron, i cloned your repo from GitHub, while executing $ make packer-build command I'm getting following error "make: *** No rule to make target '.env'. Stop."

palanisamy-dlqe
Автор

He is like the better version of Richard Hendricks

shrine
Автор

I worked for a Microsoft subsidiary for 5 years. I'm deeply offended by your joke. However, I will refer you to the department that isn't offended by the joke. Expect 5 business days for a reply.

distantignition
Автор

Hashicorp has likes and comments turned off, at least on the Terraform vids. I don't trust that.

prezadent