How to test Terraform built-in functions locally.


Terraform has a bunch of built-in functions that allow to perform common operations when writing infrastructure code. Some of them are so common in many programming languages, that you can guess what they are for even without reading the documentation. For example, you’ll probably recognize the length() function which returns the number of elements in a given list or map, the list() which returns a list consisting of arguments given to a function and the join() which joins a list with the delimiter for a resulting string. You can look through the whole list of these functions in the documenation.

There is a question though. How do you try out these built-in functions locally and see how they work? In this post, I’m going to show a couple of ways you can do that…
Read more


How to build a CI/CD pipeline using Kubernetes, Gitlab CI, and Helm.


In today’s post I want to share an example of a CI/CD pipeline I created for my test application using very popular nowadays orchestrator Kubernetes (k8s) and Gitlab CI.

Deploy a Kubernetes cluster

NOTE: if you plan to follow my steps make sure to change domain name in the my-cluster/dns.tf config file and make appropriate changes in the name server configuration for your domain.

I’m going to use my terraform-kubernetes repository to quickly deploy a Kubernetes cluster with 3 worker nodes (2 for running my applications and one for Gitlab CI) to Google Cloud Platform.

$ cd ./my-cluster
$ terraform init
$ terraform apply

Read more

How to visualize your workflow with GitHub projects using AWS Lambda.


The problem

In our company, we use GitHub for source control of our projects. We have tens of different GitHub repos and almost every one of them has outstanding issues and pull requests (PRs) and as the number of projects grows, it becomes very difficult to manage our work on those projects. Although, we receive notifications about new issues and PRs in our chat, they are not organized. We clearly needed a central place to store and visualize all our issues and PRs, so that we could see the problems we have and prioritize our work

GitHub has project boards that allows you to create Kanban boards for your GitHub issues and PRs. But the problem with this is that the process of adding new issues and PRs to a project board is manual. And we clearly didn’t want to go to GitHub and add a new card to the board for every new issue we receive in our chat.

Thus, we decided to automate this process and create a simple GitHub bot using AWS Lambda.
Read more


Master Linux CLI (part I). Useful Linux commands.


Interestingly, when you start reading books about Linux or going through different tutorials, they often don’t tell you about some of the cool commands that make your work sometimes so much easier. Maybe they are hiding them from you to make sure you still have to learn something in the future? ¯\_(ツ)_/¯

Anyway, today I decided to make a quick overview of some of the commands which I find useful, but which are sometimes hard to find out about.
Read more


What are Docker OS images and why would I want to use them in my Dockerfile?


Docker is not new these days. Everybody knows how to run a docker container at least on a local machine, because it’s so easy. You find an image on DockerHub, you run docker run -d <image-name> and that’s it.

You probably also know how to build docker images, because all you need is create a Dockerfile, use 7-8 commands to describe how to package your application and all its dependencies, finally build the container image with docker build command and run it.

Let’s look at this simple Dockerfile.

FROM ubuntu:14.04
COPY ./hello-world .
EXPOSE 8080
CMD [ "./hello-world" ]

It looks simple, right? Nothing special.

You specify the OS image, add you binary file, … wait, it just struck me. Look again, at the Dockerfile.
Read more


Pagination