On Premise CI/CD Pipeline

So I set out to write an application…

And there starts the story of my long journey to setting up this entire contraption.

 

What?

I wanted to write an application which will keep me focused and provide some kind of visual representation of my daily productivity. The plan was to write some kind of a webapp which can take a set of activities as input which will then display on a screen. So for a given day I will have this set of activities and I check them off as I go along the day.

 

Why?

At the end of the day, it runs an algorithm to see what is the numerical representation of my entire day’s activities. This calculation takes account of how impactful that application is, how many days in a row I did this, how many times I did this etc. And then plots a line graph which show the tangent of my productivity curve.

More days I skip it starts affecting the angle more severly. This gives me a pictorial, objective representation of my path.

 

How?

I decided on writing a Ruby app in Sinatra framework with MySQL database. And I wanted this to be running on my own hardware at home. For absolutely no reason other than I can.

 

Components

Version Control

I need some kind of version control. So that is git. Now I will be running this on a vm in my homelab. That means I need to move code from my local machine to that VM. What better way to do this than to setup a git repository. Gitea it is! Now I can push code to gitea repo and pull it from VM.

This will sync every 8 hours or so with github and bitbucket.

Jobs Manager

Jenkins fits the bill almost perfectly.

Container Registry

Sonatype Nexus repository has a hosted docker feature which was nice.

Routing

Nginx Proxy manager was very userful. It can provision SSL certs through LetsEncrypt and Cloudflare DNS challenges. Very handy!

Runtime

I need somewhere I can run the apps. Microk8s was the tool of choice for this.

Monitoring

Prometheus

To be Continued….