May 13th, 2019
Orchestrating Containers with Kubernetes Part I: Concepts
I recently wrote a series of articles on Docker and containerized applications. In those articles I worked with a single Docker container at a time. Each container was mapped to a port on its host machines IP, making it accessible from the browser. In my case, the host machine was an EC2 instance.
While the single container approach works, it has a number of limitations and drawbacks. First off, a single container isn't scalable. As web traffic to an application increases, the load becomes too much for a single container to handle. Secondly, there isn't a zero-downtime approach to release a new version of an application. The container running the old version has to stop and a container with the new version has to start in its place. While both these limitations are deal breakers in themselves, the worst part about the single container approach is that its a single point of failure. If the container stops or the application crashes, the entire website goes down. This makes deploying a production application on a single container inadequate.
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.
September 29th, 2020
Jenkins Server Modern Infrastructure with Kubernetes on EKS
In a prior article, I discussed a Jenkins server I created on AWS EC2 and EFS. In this article I’ll discuss the second generation of that infrastructure, which uses Docker containers orchestrated by Kubernetes on an EKS cluster.
September 28th, 2020
Building an AWS EKS cluster with Terraform
Recently I made the decision to move my applications to Kubernetes, specifically hosted in an EKS cluster on AWS. Before making this decision, my applications (saintsxctf.com and jarombek.com) were hosted using different methods. saintsxctf.com was hosted on autoscaled AWS EC2 instances and jarombek.com was hosted on AWS ECS. I also had prototypes using different hosting methods and a Jenkins server which was hosted on EC2 instances. Moving all these applications to Kubernetes unifies the deployment process and allows me to take advantage of containerization and container orchestration.
In this article, I'll discuss the process for setting up my EKS cluster with Terraform. I'll also detail my experience deploying ALB Ingress Controller and External DNS pods on the cluster.
September 27th, 2020
Jenkins Server Legacy Infrastructure on EC2 and EFS
Back in 2018, I created a Jenkins server which automated tasks for my applications. Jenkins is a continuous integration and continuous delivery (CI/CD) tool which I've written about in the past. When I first created the Jenkins server, I had a few jobs which ran unit tests, but I never took full advantage of them. Over the past two years, I've gained a greater appreciation for CI/CD tools and their ability to save time deploying code and building confidence in codebases by automating tests. Nowadays all my applications have automated test and deployment jobs on Jenkins.
Since 2018 the Jenkins ecosystem has evolved along with my understanding of cloud concepts. My original Jenkins server was hosted on an AWS EC2 instance which utilized AWS EFS for persistent storage. In the spring of 2020, I decided to rewrite the Jenkins server infrastructure. With my added knowledge of containerization with Docker and container orchestration with Kubernetes, I hosted the Jenkins server on AWS EKS as part of a Kubernetes deployment. In this article, I discuss the original EC2 Jenkins server and its creation process with Terraform. In an upcoming article, I'll discuss the Kubernetes Jenkins server infrastructure.
April 1st, 2019
Docker Part I - Basic Concepts
When I worked on my first website saintsxctf.com during my senior year of college, it was a huge revelation that I could pay a company to host my website on their servers. The most surprising part for me was how they were hosting it. The web server was a virtual private server, which is a virtual machine (VM) sold as a service1. The VM ran a Debian Linux distribution. This means I wasn't paying for an entire bare metal server, instead provided a software program which acts like a physical server. In fact, there were likely many other virtual private servers running on the same hardware as mine.
The adaptation of virtual machines was a major milestone in software development history. Instead of needing a single physical server for each application, a single server could run a program called a hypervisor which would create one or many virtual machines. Virtual machines scaled as needed to match business needs. Eventually companies didn't need to invest in physical servers as cloud providers started offering VM IaaS (Infrastructure as a Service). An example of a VM IaaS is EC2 (Elastic Compute Cloud) on AWS.
October 1st, 2020
Interesting AWS Jenkins Jobs
I recently built a new Jenkins server hosted using Kubernetes on EKS. My main use of the Jenkins server is to automate application and infrastructure tests, deployments, and miscellaneous tasks. I get email notifications if these jobs fail, so I know when there is an issue with my software.
Many of my Jenkins jobs work with the AWS CLI and Terraform to interact with and manipulate my cloud infrastructure. I believe these jobs may be useful as templates for others wishing to achieve similar results.