Monday, July 27, 2015

Kubernetes + Boinc for a better world.

Kubernetes, Docker and Boinc make it ridiculously easy to donate cpu cycles to solve earth's scientific challenges.

tl;dr: https://github.com/ckleban/boinc-on-k8

I figure, if we are deploying example applications to clusters to learn and test, why not deploy work loads that might add some benefit. So that is what I did. To get this all going, it was real simple. I reused a docker image that Ozzy Johnson @ozzydidact put together and I created a replication controller yaml file to spin up a group of containers on a cluster. Check out the above github link for the source code and some further instructions.

Here is me using all this:

MacBook-Pro:boinc ChrisKleban$ kubectl create -f ~/GitHub/docker-boinc/boinc-rc.yml 
replicationcontrollers/boinc-workers

MacBook-Pro:boinc ChrisKleban$ kubectl get rc,pods
CONTROLLER      CONTAINER(S)    IMAGE(S)              SELECTOR                        REPLICAS
boinc-workers   boinc-workers   ckleban/boinc-on-k8   name=boinc-workers,version=v1   1
NAME                  READY     STATUS    RESTARTS   AGE
boinc-workers-oprmg   1/1       Running   0          24s

MacBook-Pro:boinc ChrisKleban$ kubectl scale rc boinc-workers --replicas=20
scaled

MacBook-Pro:boinc ChrisKleban$ kubectl get rc,pods
CONTROLLER      CONTAINER(S)    IMAGE(S)              SELECTOR                        REPLICAS
boinc-workers   boinc-workers   ckleban/boinc-on-k8   name=boinc-workers,version=v1   20
NAME                  READY     STATUS    RESTARTS   AGE
boinc-workers-036t8   1/1       Running   0          17s
boinc-workers-5yjas   1/1       Running   0          17s
boinc-workers-6jogy   1/1       Running   0          17s
boinc-workers-frp3w   1/1       Running   0          17s
boinc-workers-giob9   1/1       Running   0          17s
boinc-workers-h55wg   1/1       Running   0          17s
boinc-workers-hlh9k   1/1       Running   0          17s
boinc-workers-idcds   1/1       Running   0          17s
boinc-workers-j7uln   1/1       Running   0          17s
boinc-workers-kg6nb   1/1       Running   0          17s
boinc-workers-lgzkd   1/1       Running   0          17s
boinc-workers-ngbz5   1/1       Running   0          17s
boinc-workers-nvdi9   1/1       Running   0          17s
boinc-workers-oprmg   1/1       Running   0          1m
boinc-workers-s1m5t   1/1       Running   0          17s
boinc-workers-twnoj   1/1       Running   0          17s
boinc-workers-wixrg   1/1       Running   0          17s
boinc-workers-xge9n   1/1       Running   0          17s
boinc-workers-xgy33   1/1       Running   0          17s
boinc-workers-yo0du   1/1       Running   0          17s


Sometime soon I'll be using this to test out kubernetes's current resource quota features to ensure a group of containers do not use more than a specified amount of CPU resources in a cluster.

In the future, kubernetes will be releasing priority (QOS) feature which will allow users to specify which groups of containers should take priority when resource starvation occurs. Once this is realized, users will be able to run work loads like this without impacting the higher priority business functions occurring in the cluster. This end goal would be similar to how priority would be used to ensure batch jobs don't cause real time customer facing workloads due to resource constraints.

Enjoy and thanks
Chris



7 comments:

  1. Found this when setting up my server - exactly what I was looking for. Thank you! :D

    ReplyDelete
  2. Great article ...Thanks for your great information, the contents are quiet interesting.
    Docker and Kubernetes Training

    ReplyDelete
  3. We as a team of real-time industrial experience with a lot of knowledge in developing applications in python programming (7+ years) will ensure that we will deliver our best in python training in vijayawada. , and we believe that no one matches us in this context.

    ReplyDelete
  4. Brilliant work Chris - I have a pi cluster currently running diskless from a central netboot, but this looks like a much more scalable way of doing it!

    ReplyDelete
  5. I am really happy to say it’s an interesting post to read. I learn new information from your article; you are doing a great job. Keep it up…

    Power Bi Training in GUrgaon
    SQL Training in Gurgaon
    Advanced Excel /VBA training in Gurgaon
    Tableau Training in Gurgaon

    ReplyDelete
  6. I have a mission that I’m just now working on, and I have been at the look out for such information.
    data science course in malaysia

    ReplyDelete