September 3rd, 2018
DevOps: Learning Terraform
Ever since I first heard about infrastructure as code (IaC) and Terraform 9 months ago, I’ve been intrigued by what the fuss is all about. I always developed software and nothing more. Digging through Linux or setting up email servers are things I have nightmares about. When told that learning operations is important for developers and warned of the combination of developer and operations (DevOps), I kindly said "no thank you, operations are not for me."
With my first website SaintsXCTF, I was exposed to the world of setting up linux servers to host websites. I set up an Apache web server with DNS routing and stumbled through a Postfix mail transferring agent. I felt very accomplished by all that, but quickly shifted my focus back to developing software. After all, writing code is what I love to do!
With my second website (which you are currently viewing) I started working in the cloud with AWS. I didn't enjoy my time clicking through the AWS UI, picking EC2 instances to start up and configuring S3 buckets. Clicking through a website to configure cloud infrastructure isn't fun, writing code is. If only I could configure all my infrastructure by writing code!
June 17th, 2019
Creating a Reusable Terraform Module
When programming with Terraform, I often find myself writing the same code again and again. In order to maintain the DRY principal in Terraform configuration, modules are used to encapsulate logic and design a layer of abstraction for infrastructure code. This article explains how I created Terraform modules that are reused throughout my AWS Infrastructure as Code.
DRY stands for "Do not Repeat Yourself." It's the design philosophy that similar code shouldn't exist in multiple locations. Instead, repeated code segments should be combined into a single component or function.
September 7th, 2018
Using AWS Lambda with API Gateway and Terraform
Traditionally when building a mobile app or website, the application is split into a few different layers. The necessary layers commonly comprise a front-end, backend, and database. In recent years, the backend is often a REST API that makes requests to a database. The front-end communicates with the REST API through HTTP requests.
To set up a REST API, a server is needed to host backend code. Using a backend server means app developers have to spend time managing infrastructure. As I mentioned in my post on Terraform, when cloud computing came along new techniques for handling infrastructure were introduced. With AWS Lambda, we have a new technique for handling code and infrastructure in our backend. AWS Lambda introduces containerized functions and serverless computing.
April 8th, 2019
Docker Part II - Building a Playground Environment
In my previous post about Docker, I explored the basic concepts of Docker containers. In this post, I'm creating a Docker playground environment on AWS with Terraform and CloudFormation. The playground consists of an EC2 instance with Docker installed. It's accessible from the internet to facilitate containerized web applications. To start I'll discuss why I used Terraform and CloudFormation to build the playground. Then I'll take a deep dive into the infrastructure code.
September 5th, 2019
AWS Lambda Function for MySQL RDS Backups Part II: Building the Function
In my previous article I discussed my existing AWS infrastructure and the additional resources needed to automate backups for a RDS MySQL instance using a lambda function. In this article I'll create those additional resources and further explain my design decisions. Finally, I'll test the lambda function and show the backup file in my S3 bucket.
September 15th, 2019
Introduction to Elasticsearch
Over the past few months I've read a book about the ELK stack. ELK stands for Elasticsearch, Logstash, and Kibana. Together these three technologies provide the ability to search, stream, and visualize data. In this article I discuss Elasticsearch, which is the core technology of ELK Stack. First I'll define Elasticsearch and provide details about what its used for. Second I'll create AWS infrastructure for Elasticsearch using Amazon Elasticsearch Service. Third and finally I'll populate Elasticsearch with data and show some basic queries.
February 15th, 2020
Hosting a Static React Application on Amazon S3
Amazon S3 (Simple Storage Service) is an AWS service for storing objects. Since objects are files, S3 can be viewed as a filesystem accessible over HTTP. I often use S3 for storing images, fonts, and other assets for my applications. Some examples include my jarombek.com assets and my global shared assets.
Since Amazon S3 stores files and acts as a filesystem, it can also be used to host static websites.
October 28th, 2019
Unit Testing AWS Infrastructure with Python
From October 2018 to May 2019, I moved the infrastructure for both my websites to AWS. The process for building and tearing down this infrastructure is automated with IaC, specifically Terraform. I've had a lot of fun working with Terraform and learning the different design patterns for infrastructure in the cloud.
After my infrastructure was built, I realized I needed a way to test that my IaC was behaving as expected. The obvious solution to this requirement was a unit test suite. I implemented this unit test suite in Python with the help of the AWS SDK. This article explains why I took the time to write unit tests and walks through of the basics of testing AWS infrastructure in Python.
September 21st, 2018
Exploring Jenkins and the Job DSL Plugin
So far in my DevOps journey I've explored Terraform and how to use it to deploy AWS Lambda Infrastructure. In this post I explore Jenkins, which is a Continuous Integration and Continuous Delivery (CI/CD) tool used for automating tasks.
Jenkins is not my first glance into the world on Continuous Integration (CI). That came with my post on TravisCI, which is a CI tool that hosts tasks on a server (free of charge!). I still use TravisCI to help unit test my code every time I push to GitHub.
May 20th, 2019
Orchestrating Containers with Kubernetes Part II: Single Node Cluster
In my previous Kubernetes article, I went over the concepts of container orchestration and the architecture of a Kubernetes cluster. In this article, I'm building a single node Kubernetes cluster that runs a Node.js application.
The Node.js application is the same one I used in my article on Containerization. The Kubernetes cluster environment is very similar to my Docker playground. The single node Kubernetes cluster is created with a CloudFormation template wrapped in Terraform. It installs Docker, kubeadm, kubectl, kubelet, and kubernetes-cni. You can check out the infrastructure code on GitHub.