How I killed my entire Kubernetes cluster

Intro One morning I woke up and tried to access my gitea just to find that it wasn’t running. I checked my cluster and found that the whole thing was dead as meat. I quickly jumped in and ran k get pods -A to see what’s going on. None of my services worked. What immediately struck my eye was a 100+ pods of my fork_updater cronjob. The fork_updater cronjob which runs once a month, looks like this: ...

October 1, 2019 · 2 min · hannibal

Using a Kubernetes based Cluster for Various Services with auto HTTPS

Intro Hi folks. Today, I would like to show you how my infrastructure is deployed and managed. Spoiler alert, I’m using Kubernetes to do that. I know… What a twist! Let’s get to it. What What services am I running exactly? Here is a list I’m running at the time of this writing: Athens Go Proxy Gitea The Lounge (IRC bouncer) Two CronJobs Fork Updater IDLE RPG online checker My WebSite (gergelybrautigam.com) Monitoring And it’s really simple to add more. ...

September 21, 2019 · 21 min · hannibal

Updated Face-recog architecture drawing

I had a lot of fun using Procreate to re-draw the architecture image I’ve drawn for my distribute face recognition application detailed in this post Distributed Face-Recognition App. Without much fanfare, here is the drawing: Thanks, Gergely.

September 19, 2019 · 1 min · hannibal

Efferent and Afferent metrics in Go

Intro Hi folks! Today I would like to write about a metric that I read in a book called Clean Architecture from Robert Cecil Martin ( Uncle Bob ). Abstract The metrics I mean are Efferent and Afferent coupling in packages. So you, dear reader, don’t have to navigate away from this page, here are the descriptions pasted in: Afferent couplings (Ca): The number of classes in other packages that depend upon classes within the package is an indicator of the package’s responsibility. Afferent couplings signal inward. (Affected by this package) (Fan-In). ...

April 21, 2019 · 6 min · hannibal

Living with a new Parser for a year

Hi folks! Today’s post is a retrospective. I would like to gather some thoughts about living with the new parser that I wrote for JsonPath. After a little over a year, some interesting problems surfaced that I thought I’d share for people who also would like to endeavor on this path. Let’s begin. Previously About, two years ago, I took over managing / fixing / improving this ruby gem: Json Parser. It’s a json parser in ruby. Amongst other problems, it used eval in the background to evaluate expressions. It was a security risk to use this gem to its full extent. Something had to be done about that. ...

April 12, 2019 · 8 min · hannibal

Deploy a Hugo Blog Github Actions

Intro Hi folks. Today I thought I show you how you can use Github Actions to deploy a hugo based blog like this one. Let’s dive in. Actions What are actions? If you read the above linked document they are basically steps performed in containers based on some events that happened with your repository. Events can be such as pushing, creating a PR or creating/closing an issue etc. We need an even on a push. ...

March 19, 2019 · 5 min · hannibal

Cronohub: Archive from anywhere to anywhere

Intro Good afternoon folks. Today, I would like to talk a little bit about Cronohub. It’s a Python application which you can use to archive anything from anywhere to anywhere. It uses plugins to archive this versatility. Let me show you some of its features. Main Usage Cronohub is a python application which uses the power and ease of usage of Python to give the user a framework. This Framework can then be used to implement concrete functionality in the form of plugins. ...

March 19, 2019 · 4 min · hannibal

Deploy a Hugo Blog with Travis on Git Push

Intro Hi folks. I’ve been using the Hugo build for wercker for a long time now. Recent problems occurred though where I did not understand at first what the problem was. It was quite difficult to debug since I did not have too much insight on the wercker build itself. Turned out that I deleted the GITHUB token that the process was using. However, the error message was telling me that a function failed to load some other function. Which was totally unrelated. ...

March 18, 2019 · 4 min · hannibal

Go SSH with Host Key Verification

Hi folks. Following a long search and reading lots of debates and possibilities of doing SSH within Go, I was shocked to see that not a great many tools and people use SSH with host key verification. What I usually see is this: HostKeyCallback: ssh.InsecureIgnoreHostKey() This is terrible. Now, I realise that doing HostKeyVerification can be tedious, but don’t fear. It’s actually easy now that the Go team provided the knownhosts subpackage in their crypto SSH package located here: KnownHosts. ...

February 17, 2019 · 2 min · hannibal

Extensive tutorial on go-plugin.

Intro If you don’t know what go-plugin is, don’t worry, here is a small introduction on the subject matter: Back in the old days when Go didn’t have the plugin package, HashiCorp was desperately looking for a way to use plugins. In the old days, Lua plus Go wasn’t really a thing yet, and to be honest, nobody wants to write Lua ( joking!). And thus Mitchell had this brilliant idea of using RPC over the local network to serve a local interface as something that could easily be implemented with any other language that supported RPC. This sounds convoluted but has many benefits! For example, your code will never crash because of a plugin and the ability to use any language to implement a plugin. Not just Go. ...

October 29, 2018 · 17 min · hannibal