Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts from 2019

Linting Jenkinsfiles to find syntax errors

developmentDec 18, 2019 2 min read

As a long time Jenkins user I periodically need to add new steps or Groovy logic to my Jenkinsfiles. The last thing you want to do when updating your pipeline configuration is to make a typo which causes a build to break. To avoid these scenarios, I like to use a git pre-commit hook along with the Jenkins CLI "declarative-linter" option. To use this super useful feature to check for syntax errors, you will first need to download the Jenkins CLI client…

$ read more →

Converting X509 certificates to JSON objects

Dec 10, 2019 2 min

Years ago when I wrote ssl-cert-check I looked far and wide for an easy way to parse X509 certificates. I wasn't able to find a utility so I ended up using a combination of sed and awk to extract various fields from the certificate. That worked, but over the years it's proven to be an unmaintable solution due to diferences in formatting between the issuers. I was recently converting some certificate management scripts to Ansible roles when I came across Cloudflare's certinfo utility…

$ read more →

How the docker container creation process works (from docker run to runc)

Nov 11, 2019 5 min

Over the past few months I've been investing a good bit of personal time studying how Linux containers work. Specifically, what does actually do. In this post I'm going to walk through what I've observed and try to demystify how all the pieces fit togther. To start our adventure I'm going to create an alpine container with docker run: This container will be used in the output below…

$ read more →

Seeing what changed in a docker containers file system

containersNov 7, 2019 1 min

Docker has a number of nifty options to help investigate containers and container images. One option I have used over and over to debug issues is the docker ["diff" command.] (https://docs.docker.com/engine/reference/commandline/diff/) This dumps out the files that have been aded ), deleted ) and created ) since the container started. Here's a simple example showing diff in action: Cool stuff!

$ read more →

Creating a set of random numbers from the command line

shellNov 6, 2019 1 min

This past weekend I was doing some database testing and needed to generate some random numbers to populate a table. My typical go-to utility for generating one random number is head piped to od and tr: This works well and can be aded to a loop to get more than one number. But I was curious if there was a native Linux utility available to do this work. A quick poke through the Linux man pages turned up the coreutils shuf utility: This was exactly what I was after…

$ read more →