DEV Community

Cover image for Infrastructure as Code: A beginner's perspective

Infrastructure as Code: A beginner's perspective

Federico Kauffman on February 08, 2018

Originally published in WyeWorks blog. A couple of months ago, I came to realize I might actually like DevOps. I wasn’t sure what to do, so I talk...
Collapse
 
sambenskin profile image
Sam Benskin

Terraform is a fantastic tool, makes getting up and running with semi complex infrastructures very easy. I've been pretty of a team that introduced it to a business with great success. I love how it can just work out the differences between a current setup and the changes you've made and only apply the differences.

Have you looked into containerisation with docker/kubernetes/etc?

Collapse
 
fedekau profile image
Federico Kauffman

I have been learning about kubernetes, it is awesome! You could use both tools in conjuction, provision with Terraform and deploy with containers and kubernetes.

Collapse
 
sambenskin profile image
Sam Benskin

That's cool, would love to read another article about using those together then :)

Collapse
 
hungluong profile image
Hung Luong

I also started down the DevOps part for nearly a year now. My reaction back then was pretty much like you said: how can anyone not be thrilled with having the entire infrastructure as a simple text file you can change and store?

Kinda sad though that sometimes DevOps get abused and turned on its head i.e one person/team taking care of it while the development team carrying on with just coding and stuff. I'm hoping I could change that in my organization for the coming years :)

Collapse
 
fedekau profile image
Federico Kauffman

Hopefully you will! Good luck 🤞

Collapse
 
grahamlyons profile image
Graham Lyons

In my opinion, any infrastructure that's not going to be thrown away very quickly (and even then I'd argue that codifying it is still probably better) should be expressed as code. I once worked somewhere where everything was provisioned by someone clicking through the AWS control panel and it was an enormous mess. The repeatability of infrastructure expressed as code is invaluable, not to mention the documentation aspect of it.

You mentioned at the start things like, "DevOps position" or "DevOps job", and I'd have to assume you left your current organisation to do that. DevOps is a culture not a job title or a team within a company. Either everyone is doing DevOps or no one is. I guess that's something to take up with WyeWorks... :)

Developers should have full operational responsibility for the code they write, and that has to include the infrastructure it runs on. Infrastructure as code is a great tool for achieving that.

Collapse
 
fedekau profile image
Federico Kauffman

I've been there too, AWS is too complex to be clicking on it! Regarding DevOps I agree on what you said ☺

Collapse
 
thatjoemoore profile image
Joseph Moore

I love IaC. It has really changed the way I code, and I don't like it when I have to go back and work on some of our older code that doesn't take advantage of it.

In our organization, we use a mix of Terraform and AWS CloudFormation (we're moving towards being a mostly AWS shop). We've also been developing our own abstraction on top of CloudFormation called Handel, which abstracts away all of the IAM permission wiring for us, because that always seems to be the hardest part of IaC in AWS. It's really been fun to watch as IaC has started to change how all of our developers work - many of them can't imagine doing anything without it!

Collapse
 
fedekau profile image
Federico Kauffman

Totally agree 👍

Collapse
 
olivercole profile image
Oliver Cole

If you want to get started with Terraform, you can check out my article on here, or at olicole.net/blog/2017/07/terraform... :)

Collapse
 
jorotenev profile image
Georgi Tenev

Great article. It would be awesome to give some example good practices of how to do common tasks - esp. stuff like migrating/replicating databases

Collapse
 
fedekau profile image
Federico Kauffman

Great idea 💡. I will try to write more about this topic, so you might see something like that in the future ☺