Making Amazing things Simple

Too old to geek and too young give up.

Read this first

Elli: New in EKS 1.31

Its quite critical to track what’s changing in the EKS landscape as new versions release. The latest in that batch is Elli, and on AWS dubbed as EKS 1.31. Since EKS does not provide too many nobs on the feature gates, it ia critical to understand all that’s new in the Kubernetes do not make it to EKS- only those are that are stable(also known as general availability) do make it there. As of this writing EKS 1.31 is already out, and there is plenty of literature already there to tell whats out. Then “why this one”, and the answer is, “just for my record”. So here we go, and the order denotes my understanding so far, or relevance to usage at my workplace.

Allow StatefulSet to control start replica ordinal numbering

Now there is a new section in the statefulset spec, called ordinals, which specifies which ordinal number to start number the statefulset pods from.

type StatefulSetOrdinals
...

Continue reading →


Quarantine a EKS Node with Docker Containers

While performing these step please practice caution, and have the right dashboards that will point to any issues.

Step 0. Annotate the node, ip-10-102-11-188.ec2.internal, in question, to not participate in the auto-scaling.

$ kubectl annotate node ip-10-102-11-188.ec2.internal cluster-autoscaler.kubernetes.io/scale-down-disabled=true

Step 1. Cordon the affected the node.

kubectl cordon ip-10-102-11-188.ec2.internal

Step 2. Get the list of app pods running on that instance

$ kubectl get pods -n podinfo --field-selector spec.nodeName=ip-10-102-11-188.ec2.internal --show-labels
NAME                      READY   STATUS    RESTARTS   AGE   LABELS
podinfo-ffb8d6b8d-bbs5r   1/1     Running   0          48m   app=podinfo,pod-template-hash=ffb8d6b8d
podinfo-ffb8d6b8d-jfs9b   1/1     Running   0          48m   app=podinfo,pod-template-hash=ffb8d6b8d
podinfo-ffb8d6b8d-mpskj   1/1
...

Continue reading →


Sensu Installation

The installation of sensu will involve first installation components that sensu depends on. So first we will install the required components, we would right doing this installation within a single node.

OS: Ubuntu Linux 14.04 server
Architecture: x86_64

Redis Installation

Since we are using the Ubuntu 14.04, we would want the add a ppa that provides a slightly newer version of the redis. So add the following ppa.

$ sudo add-apt-repository ppa:chris-lea/redis-server
$ sudo apt-get update

Then we proceed with the installation step.

$ sudo apt-get install redis-server

Set the ulimit in the /etc/default/redis-server file. Maybe anython greater than 4096

Since we are doing a basic standalone installation we would not be getting details of the how redis needs to configured, but keep this for reference.

Sensu Specific Configuration

Copy the following json block into /etc/sensu/conf....

Continue reading →


Sequencing Mongodb

Many of us who have moved from the traditional RDMS based applications, would be in for a rude shock if I said auto-increment Integer fields are not a norm in the Distributed NoSQL database MongoDB. Why?

Although traditional databases often use increasing sequence numbers for primary keys. In MongoDB, the preferred approach is to use Object IDs instead. The concept is that in a very large cluster of machines, it is easier to create an object ID than have global, uniformly increasing sequence numbers.

The above is taken from the MongoEngine documentation. And mongo has a good enough document that explains how to create an auto-incrementing field. But the Python’s ODM for MongoDB, MongoEngine, provides an special field call the SequenceField to around this pain of creating the sequencing generator by hand.

Setup Sequence

It is fairly interesting to see how the SequenceField works, it...

Continue reading →


Riakting to Docker

Riak is really for me the true key value store that epitomizes everything about a distributed database system. I had presented about it in Feb 2010.

Distributed Key-Value Stores- Featuring Riak from samof76

Docker is this new thing on the block with this fantastic mechanics of delivering packages are self contained the images ready to run anywhere docker is installed(linux).

Now here is the Dockerfile on how to create a docker image with Riak in it.

FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y curl lsb-release
RUN curl http://apt.basho.com/gpg/basho.apt.key | apt-key add -
RUN bash -c "echo deb http://apt.basho.com $(lsb_release -sc) main > /etc/apt/sources.list.d/basho.list"
RUN apt-get update
RUN apt-get install -y riak

The above docker file gist is available here.

Why ubuntu:12.04 and not ubuntu:latest?

The there is not build candidate of riak for the...

Continue reading →


Wonder Fonts

I was doing a collage with my son yesterday and cutting out letter from the news paper advertisements. I was telling him, who turns 8 tomorrow, that these are called fonts and he quickly said, “I know!”. Followed it with, “I have seen it on MS Paint.”. But he asked, “How do know which font this is?”.

What the heck, how do I know a font? Ya really, how do I know? How the hell do I know the font type of all those print ads that I see? Do many all these beautiful fonts on all these ads, adhere to copyrights(or copylefts)?

Well of course there should be an intelligent system when submitted with a font’s photograph, knows and tells what font that is? Of the many from the search one seemed to be promising, what MyFonts website had here.

So I decided to check it out, and I put the following images of fonts to test.

Font one

Font two

Font three

The first font one is Maze Font, second one is Sans Serious and...

Continue reading →


Kernel of Love

According to Leonard Cohen the kernel of love is,

You go your way.
And I will go your way too.

Isn’t that very simple to say, and yet very true.

View →


Follow your Passion?

Take moment off your following that passion, and think about what real skill do you need for your passion, get really good at it(the skill) and start over again. This I am sure will make following you passion really simple, and really easy. But all make sure you keep your skill levels at their peak. More about this in this video.

View →


The Greatest Leveler of them All

In his book How to Avoid Work, William J Reilly, explains the great leveler that we know of, this way.

Everything requires Time. Time is the only permanent and absolute ruler in the universe. But she is a scrupulously fair ruler. She treats every living person exactly alike every day. No matter how much of the world’s goods you have managed to accumulate, you cannot successfully plead for a single moment more than the pauper receives without ever asking for it. Time is the one great leveler. Everyone has the same amount to spend every day.

The next time you feel that you ‘haven’t the time’ to do what you really want to do, it may be worth-while for you to remember that you have as much time as anyone else — twenty-four hours a day. How you spend that twenty-four hours is really up to you.

Continue reading →


Go says Hello 3x times more than Node

Just had to take wrk for a ride. Wrk installed cleanly on the laptop, just was minssing “openssl/ssl.h”. And …

$ sudo apt-get install libssl-dev

did the fix. Now it is off to test it out.

Have been hearing quite a bit about Go and its capabilities as a web framework, driven by the need to explore. Wanted to check how it performed. And needed to pit against something. Node was an obvious choice. Pit a hello-server.go against a hello-server.js. The hello-server.go looks like this.

package main

import (
  "fmt"
  "net/http"
)

func handler(w http.ResponseWriter, r *http.Request) {
  fmt.Fprintf(w, "Hello world!")
}

func main() {
  http.HandleFunc("/", handler)
  http.ListenAndServe(":8080", nil)
}

Ran go’s hello-server like this.

$ go run hello-server.go

And ran the wrk like this

$ ./wrk -t12 -c400 -d30s http://127.0.0.1:8080/
Running 30s test @ http://127.0.0.1:8080/
  12
...

Continue reading →