Heka, World2!

This article expands on my “Hello World” for Heka blog post. Check that one out first if you are new to Heka. In this guide we introduce using Heka over the network and by utilizing two Hekad processes on localhost. For discussion purposes we name one of the Hekad processes “sender” and the other “receiver”. […]

Mailpile Salt States for Ubuntu or Debian

I wrote these Salt States to install Mailpile on an Ubuntu host. Fun fact, it took me 20 minutes to write these states and they worked the first time I ran them. Disclaimer – I used a throw away server and wasn’t concerned that buckets of packages were installed to the system instead of using […]

You can hack on FreeNAS 9

This post analyses the FreeNAS 9 code base and discusses the various places users may feel confident to hack on. FreeNAS uses the following software stack: Django A Python Web Application Framework which complies with WSGI Nginx A very fast web server which may act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, […]

Nginx with SSL and mixed content errors with upstream WSGI servers

Mixed content errors occur because Nginx (the front-end server) communicates to the upstream WSGI server using http. WSGI does not know (or care) about the SSL session between Nginx and the user. The WSGI server will naively generate URIs and serve assets as http. To fix mixed content errors, we need to communicate the inbound […]

How to patch Heartbleed OpenSSL defect (libssl) on Ubuntu

Lots of people claim that you need to upgrade openssl package, but this will not fix the issue. The issue is not the openssl package, it is one of the libraries that the package relies on (libssl). http://www.ubuntu.com/usn/usn-2165-1/ The output of openssl version -a command should have a built on date older then Mon Apr […]

Filter Salt Stack Return Data Output

Sometimes you only want to see what has changed, and that is OK. Create a file like this: filter.py #!/usr/bin/python from json import loads from json import dumps import fileinput stdin_lines = [line for line in fileinput.input()] ret = loads(”.join(stdin_lines)) for minion_id, data in ret.items(): print(minion_id) print(‘=’*len(minion_id)) for key, value in ret[minion_id].items(): if value['changes'] or […]

Replace the Nagios Scheduler and NRPE with Salt Stack

Note: I will update this post as I progress. So the idea is to use Salt Stack’s remote execution to communicate with all nodes and run the Nagios checks and collect the return output instead of using the NRPE client/service protocol. This reduces the number of agents running on each host and appears significantly more […]

Configuration Management and the Golden Image

When operations first became a thing, system administrators stood up servers using a base image from their favourite distribution. Things were done manually. Some administrators created their own distros, some wrote customised shell scripts to be run once-and-only-once to provision software and settings. This method worked, but it was slow, manual, and the human element […]

Automatic Backups

I maintain many scripts and applications for creating automatic backups or various systems. This page will act as a hub to each of those solutions. tar-back tar-back is a backup utility to tar and gzip target filesystems. It supports a custom retention, filter exclusions, and backup directory. virt-back virt-back virt-back is a python application that […]