Terraforming the Cloud

About two semesters ago, I took quite possibly one of the most difficult Undergraduate Classes at Stony Brook; that being CSE 354: Cloud Computing. I still consider that class to be a turning point for my education as a developer because before that, the extent of my knowledge of the cloud was occassionally ssh’ing into a server and setting up a basic nginx reverse proxy for my webapp. I learned quite a lot and the class in retrospect was a great introduction to distrubuted computed although we just scraped the surface. The end goal was building a Twitter clone that could handle the same amount of traffic that Twitter was facing with a very limited amount of resources. It was a very involved process and gave me tons of hands on experience but I completely missed a very important aspect of the class. The professor, Mike Ferdman, warned us to “avoid snowflakes” when it comes to the cloud. According to him it’s a trap that many beginners fall into. Once they’ve had all of their services set up and configured on the VM they’ll just let that VM be and in case something fails or they need to replicate the setup to other VMs they have to go through the process of re-configuring their setups.

We were warned about this very early and our second assignment was to setup an Ansible script that would setup a basic nginx server that serves a “Hello World” page pulled from GitHub. I personally never went farther than that… and it definitely cost me later on. It’s been almost a year since then I’ve definitely wisened up to provisioning my VMs in a very efficient manner using various tools (Ansible still remains a favorite). I’ve come to appreciate simply deploying docker images as well but for Cloud Provider specific resources the process had become quite tricky.

I was manually setting up VPCs, creating auto-scaling groups through the AWS Console and all sorts of basic infrastructure management by hand. I thought it would be quite useful to learn something that abstracts out this process of instracture ochestration and there is a plethora of different technologies that could work here. I personally gravitated towards Terraform which turns the entire manual process of creating the infrastructure into what essentially amounts to a simple .json file. It was an absolute breeze to get started with and I immediately started to appreciate the power this provided. One of the goals for myself is to build a moderately complex personal project utilizing a microservice-based architecture that is entirely orchestrated by a few commands. It sounds like a really cool thing to learn and I’ll definitely gain a better understanding DevOps through this exercise as well.

I hope to have some form of a MVP by next week if time permits!