Logo Yassir

KSSIMI CI & DIUN

Updating custom containers

Sep 28, 2024 - 2 minute read
feature image kssimi-ci git source code

Updating my containers: Watchtower

All containers, including custom containers, are deployed using the Docker Hub registry or the private kssimi registry (itself in the form of a docker container).

This way, I can use the Watchtower service (also a docker container). It automatically updates containers with the latest version available on the registries when a new image is available.

DIUN

Diun is a service that triggers actions when a new image is available on a public or private registry. It allows for a multitude of action types such as launching a script, REST API signal (which I use), sending an email, etc.

To update custom containers, I set up a KSSIMI-CI program using DIUN notifications to trigger my build automations.

KSSIMI-CI

Written in Go for simplicity, builds are triggered by a REST API signal. The actions to be performed are done via SSH on a virtual machine dedicated to this task. Logs are recorded in a log file per month and an email is sent to the administrator (aka me).

image
Email to administrator

The story

I started developing this program because no other was available to set up an automated build system while being lightweight and easily usable (at least for me).

The goal was to avoid having a huge code base and to use all the solid and “open source” building blocks available.

KSSIMI-CI is therefore composed of a single Go file that contains all the code of 305 lines.

Dependencies

Only two dependencies used, excluding “standard” dependencies:

  • github.com/joho/godotenv
  • golang.org/x/crypto/ssh

Github repo

kssimi-ci-go