Skip to content

CICD

Use BATS to Automate Kubernetes Testing

BATS Testing
You can check out the bats-core project on GitHub.

PAGE UNDER CONSTRUCTION

Have you wanted to test things that you know how to run in your bash scripts or terminal, but aren't quite sure how to make it happen? Take a look at the Bash Automated Testing System (BATS) and make that dream a reality!

By writing automated and repeatable tests with BATS, you can create a validation framework that works equally well in your terminal and CI/CD pipelines, giving you the opportunity to pass "smoke tests" before flagging your k8s resources as production-ready.

In this post we will go over a few examples of how to test basic API connectivity, as well as some more complex tests that you may want to perform.

Build Your Own GitLab Runners on EKS

PAGE UNDER CONSTRUCTION

As more and more DevOps teams adopt GitLab for internal development, and furthermore use GitLab CI/CD pipelines, finding ways to manage costs while still delivering highly available, scalable pipelines is crucial.

In this post I will provide an overview of GitLab runners and their role in CI/CD pipelines, as well as how you can configure your own self-managed runners using the Kubernetes executor running in your own EKS cluster.

Overview

At a high level, a GitLab runner is an agent that runs CI jobs in your pipeline. This can be in the form of agents running on Linux, Windows, or Mac hosts, as well as Docker or Kubernetes.

Unit Test IaC with Terraform Tests

Testing Terraform

PAGE UNDER CONSTRUCTION

A challenge of being a DevOps engineer is that some of the typical dev parts don't always fit nicely. Unit testing is one example, where IaC is often hard to test in isolation and without some sort of actual deployment in a "test" or "sandbox" environment to validate against.

The lines between unit and integration testing become blurred for many DevOps or Platform engineers. Thankfully, HashiCorp has seen this gap and has introduced Terraform Tests to help bridge this gap!

In this post I will go over some basic unit testing that can be done for validating your IaC using terraform test to improve your code quality and provide additional peace of mind when making changes to your IaC!