A dockerized python script that queries AWS EC2 API and generates an SSH config file ready to use.
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. …
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.
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…
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…
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)
Use Terraform to provision and Manage GitHub repositories and team membership
Ok, let’s see how we…
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.
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.
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.
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…