Prefetch Technologies // Keeping your cache lines cozy

Debugging ansible playbooks, plays and tasks

ansibleJul 19, 2017 7 min read

I am a long time ansible user and have wrangled it into automating just about everything I do. As my roles and playbooks have increased in quantity and size I've found it's essential to have a good grasp of the debugging capabilities built into ansible. These are useful for detecting syntax errors, finding ordering issues and most importantly for learning how ansible works under the covers. In this post I'm going to cover a number of methods to test playbooks and troubleshoot issues when they pop up…

$ read more →

Simplifying python development with virtual environments

pythonJul 19, 2017 2 min

Over the past year I've spent a considerable amount of time beefing up my development skills. One of the best ways I've found to improve my skills is by reading code from well respected developers, watching udemy and youtube videos, fixing bugs in code I'm not familiar with (you will find some doozies this way) and benchmarking code to see what the system and resource ramifications of a change are. To allow myself to experiment in isolation I've relied heavily on Python virtual environments. Virtual environments are code sandboxes and everything (libraries, packages, etc.) in a given virtual environment is isolated from everything else on your system…

$ read more →

Using VirtualBox host networks with vagrant

infrastructureFeb 2, 2017 1 min

I have a few VirtualBox VMs that I use to test clustering, Gluster, Ceph and various other technologies. These hosts have a NAT interface as well as a host network for internal communications. This week I revamped several of my Vagrantfiles to use a host network and learned a few things in the process. To get a machine to 'vagrant up' and connect to an existing VirtualBox host network I first had to install the vbguest plug-in: Once this plugin was installed I added a "private_network" stanza similar to the following to each Vagrantfile: Then I ran 'vagrant up' and my machines could see the host networks my VirtualBox VMs reside on…

$ read more →

Using fail2ban to lock out unwanted visitors to your SSH daemon

securityJan 25, 2017 3 min

I have a number of digital ocean droplets and AWS instances that I use for personal projects. For convenience I leave SSH open to the world so I can access these systems wherever I'm at. This DEFINITELY isn't a best practice but my personal instances don't contain anything sensitive and can be rebuilt in minutes with ansible. A wide open TCP port 22 doesn't come without issues though…

$ read more →

What are bash return codes > 128?

shellJan 25, 2017 1 min

I like to keep PS1 pretty simple. I like to see the host I'm working on, the directory I'm in, the user I'm currently logged in as and the return code from the last command I executed. This is easy to cobble together with bash escape s equences: The other day I was testing some new ansible playbooks and saw a return code of 130. Several years ago I read learning the bash shell and recalled something about the magic number 128…

$ read more →