Image for post
Image for post
Photo by Federico Beccari on Unsplash

A dockerized python script that queries AWS EC2 API and generates an SSH config file ready to use.

Introduction

Connecting to our instances with ssh can be time-consuming since we have to know every time the IP to use.

This isn’t an issue in environments where public IPs don't change since we can configure our SSH Config File and we are ready to use aliases to connect to our instances.

In cases where the public IP of the instances is changing often though(e.g. …


Image for post
Image for post
Photo by Joe Caione on Unsplash

A guide to set up an AWS Lambda function with a Docker container as runtime using Amazon ECR and invoke it from Slack leveraging AWS Chatbot.

Introduction

In this article, we are going to create an AWS Lambda function via a custom Docker image and then learn how we can invoke this function from Slack. Running your Lambda functions from Slack can be super handy because it allows you to run your code or tasks without leaving Slack and show the results to all members of this channel.

A typical use case that I can think of would be reporting or…


Image for post
Image for post

A guide to set up automatic infrastructure provisioning with Terraform Cloud & GitHub Actions. Leverage Infrastructure as code(IAC) and GitOps to automatically update your infra based on a GitHub repository.

In this tutorial, we are going to connect Terraform Cloud with a GitHub repository and leverage GitHub actions to provision Cloud infrastructure on AWS.

We are going to combine IAC and GitOps approaches and manage our cloud resources via code.

Infrastructure as code(IAC)

The modern way to manage Cloud Infrastructure is to treat it like software. The number of resources that we have to handle is increasing daily along with…


Image for post
Image for post

A walkthrough on setting up GitHub repositories with Terraform and a workflow to validate your Terraform files with GitHub Actions

In this blog post, we are going to leverage Terraform’s Github provider to create a GitHub repository for a Github Organization.

Then we are going to use Github Actions and specifically the Hashicorp setup-terraform GitHub action to run some automated validation tests on our Terraform files.

To follow along you will need:

* HashiCorp Terraform 0.14.4 (or later)

* A GitHub Personal Access token

Use Terraform to provision and Manage GitHub repositories and team membership

Ok, let’s see how we…


Image for post
Image for post

TL;DR A first view & demo of Waypoint, Hashicorp’s new tool that simplifies build, deploy and release processes.

Waypoint promises to simplify our workflows around build, deploy and release pipelines. It’s not supposed to substitute any of your current tools but rather to abstract some of the painful details of these processes.

Featuring its simplistic configuration written in HCL (HashiCorp Configuration Language, attempts to help developers fast-forward their development lifecycles.

This is achieved but introducing a single workflow to build & publish images, deploy to any environment, and release them to the world.

Installation

To install Waypoint for your platform…


This material was gathered during my preparation for the CKA certification exam.

I created and curated this cheatsheet with useful commands and information that will be handy to review before taking the exam.

If you want to know how to prepare for the CKA exam, check my How to pass CKA post.

Core Concepts

View resources in namespace dev:

kubectl get pods -n dev

View all pods in all namespaces:

kubectl get pods -A

View all resources in all namespaces:

kubectl get all -A

Generate a pod yaml file with nginx image and label env=prod:

kubectl run nginx --image=nginx --labels=env=pro…


TL;DR How to prepare for CKA certification exam.

Just passed the CKA — Kubernetes Certified Administrator certification exam in January 2020 with the new format and I’ll share my preparation with you. Follow this recipe and you will be ready to get your hands on CKA too!

Study material & strategy

1) Get this course https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/ and go over all the videos at least once.

There are a lot of details so maybe you want to keep notes. If you don’t feel like taking notes, check my curated CKA Cheatsheet and study notes.

Complete successfully all the practice tests along…


Intro to volumes and storage.

TL;DR Overview of how docker storage & volumes work and how to manage them.

In this fourth part of the Dockerventure series, we are going to focus on how docker handles storage, how it manages container file systems, and showcase how we can effectively manage our data with volumes.

Check here for the first 3 parts: Intro Docker, Dockerfiles, Useful Docker commands.

Default Docker File System

By default at creation time, docker creates the directory /var/lib/docker where it stores all its data regarding containers, images, volumes, etc.

When a new container is started, a new…


TL;DR Useful docker commands to have in your arsenal.

So far we’ve seen the basic functionality of Docker, had a detailed look on Dockerfiles, and common commands used to manage/view/build/share containers and images.

In this post, I am going to try to gather some other useful Docker commands that will make our life easier operating dockerized systems.

Useful Docker Commands

In the previous 2 parts, we‘ve already seen:

docker rundocker ps docker ps -adocker stopdocker startdocker logsdocker helpdocker logindocker rmdocker builddocker imagesdocker push

So I’ll move forward to other more…


Build and share your own managed docker images.

TL;DR Dockerfile basics and usage showcase.

In this second part of the Dockerventure series, we are going to focus on how we can define our own custom images with Dockerfiles, how we can build those images, and publish them in Dockerhub so we can share them with the rest of the world!

If you missed my intro to Docker click here Exploring the Docker world.

Docker images & Dockerfile basics

In Docker’s world, the image definition is described inside a file called Dockerfile.

The Dockerfile describes how to assemble an environment for…

Ioannis Moustakis

Working as DevOps & Software Engineer for the past years. Grew up in Greece, based in Brussels. Check my blog www.devopsmadness.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store