Posts from 2018
Running an ansible task on one node in a group
I've been using Ansible to provision and upgrade my Kubernetes clusters. As part of bootstraping my hosts ansible installs flannel, kube-router, kube-dns and in some cases kured. The deployment manifests that are used to create these resources need to be on a single node. When I was reasoning through the best way to approach this problem two ideas came to mind: Run kubectl create on one of the controllers Use delegate_to: localhost to apply the manifests Both options work but the second one brings up an interesting question…
$ read more →Commenting out large blocks of code with vim
Last night I was helping a friend debug a really cool problem. During our debugging session he saw me use vim short cuts to comment and uncomment large chunks of code and append strings to numerous lines. He thought this was pretty cool and asked me to show him how to do this. I love teaching folks and sharing my knowledge so I put him on the keyboard and walked him through each item…
$ read more →Getting the bcc tools working on Fedora 27
While digging through the Ansible gluster_volume module I wanted to fire up the bcc execsnoop utility to see what commands were being run. When I ran it from the shell I got the following error: I started poking around /usr/lib/python3.6/site-packages/bcc and noticed that the AggString and printb functions weren't present in utils.py. The version of python3-bcc that ships with Fedora 27 is a bit dated and doesn't contain these functions. As a quick fix I downloaded the latest version of utils.py from GitHUB and replaced the version on my debug host…
$ read more →Learning how Ansible modules work with execsnoop
I've been digging into Kubernetes persistent volumes and storage classes and wanted to create a new cluster to storage my volume claims. Ansible version 1.9 ships with the gluster_volume module which makes creating a new cluster crazy easy. The module is written in Python and you can find it in /usr/lib/python2.7/site-packages/ansible/modules/system/gluster_volume.py on Fedora-derived distributions. To create a new cluster you need to create a new file system and then define a gluster_volume task to actually create the cluster: Jeff Geerling describes how to build a cluster in gory detail and I would definitely recommend checking that out if you want to learn more about the module options listed above (his Ansible for DevOps book is also a must have)…
$ read more →Making sense Of Linux namespaces
Containers are pretty amazing. What's more amazing is the technology in the Linux kernel that makes them a reality. As Jesse Frazelle mentioned in her containers aka crazy user space fun keynote containers aren't actual things. They are a combination of Linux kernel technologies…
$ read more →