Personal Programming Notes

To err is human; to debug, divine.

Jsonnet Code Recipes

If you are sending/working with lots of JSON data in files such as AWS CloudFormation templates, Jsonnet tool can help reducing the hassle of maintaining. Using Jsonnet templates, it is easier to organize data and reduce repeated code present in such JSON data. This post goes over a few common Jsonnet code recipes for generating JSON data.

Groovy in Jenkinsfile

Groovy is supported in Jenkinsfile for quick scripting. However, lots of features in the Groovy language is not supported and simple works in Groovy can be really tricky in Jenkinsfile.

Sending Emails From Docker Containers

In this post, we looks into how to set up notification emails at the end of CI pipelines in a containerized Jenkins system. First, we look into conventional Jenkins system (directly hosted) that has direct communication to the SMTP server. After that, we will look into adjustments required for a containerized Jenkins system to run in the same environment.

Maven and Gradle Builds in Jenkinsfile

In this post, we will look into how to securely authenticate with Nexus for Maven and Gradle builds in Jenkins pipelines. Nexus username and password should NOT be stored in plain text on Jenkins slaves or Docker images. Instead, those credentials should be passed into Jenkins pipeline using withCredentials step.

Kubernetes: Kube-router

Kubernetes is one of the most active open-source project right now. I’m trying to keep up with interesting updates from the Kubernetes community. This kube-router project is one of them although I’ve not get an idea how stable or useful it is.

Kube-router is a distributed load balancer, firewall and router for Kubernetes. Kube-router can be configured to provide on each cluster node:
* IPVS/LVS based service proxy on each node for ClusterIP and NodePort service types, providing service discovery and load balancing
* an ingress firewall for the pods running on the node as per the defined Kubernetes network policies using iptables and ipset
* a BGP router to advertise and learn the routes to the pod IP's for cross-node pod-to-pod connectivity