My Mentor

The original purpose of this post was to recognize the teachers and mentors which have helped shape me. I planned to write about how Mr. Cassidy, my high school drafting teacher, taught me the importance precision. I prepared to explain how Mr. Mercuri, my college computer science professor, ignited my desire to engineer software. But […]

SmartOS Ubuntu guest, apt-get not working because IPv6

Turns out I don’t have IPv6 setup properly in my network so when apt attempts to connect to the Internet it tries IPv6 and fails. To disable IPv6 on the ubuntu guest, add this to end of /etc/sysctl.conf and restart the guest: sudo vim /etc/sysctl.conf: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 This […]

A Python script which searches for available interpreters

This post describes how to write a polyglot — in this case a script which runs as valid Bash or Python, to search for available Python interpreters. The script initially runs as Bash but upon finding a first match, the script will call itself again this time using the expected Python interpreter in interactive mode! […]

Migrating libvirt KVM guest to SmartOS KVM guest

The following tutorial documents how to migrate a libvirt/KVM guest from Ubuntu to SmartOS. akuma: Ubuntu Hypervisor guy: SmartOS Hypervisor sagat: guest to migrate These commands were run on akuma: WORKDIR=/KVMROOT/migrate sudo mkdir $WORKDIR cd $WORKDIR # this tool simply stops and tarballs up the qcow and xml for libvirt KVM guest. sudo /usr/local/bin/virt-back –path=$WORKDIR […]

Setting region programmatically in Boto3

At work I’m looking into the possibility of porting parts of our AWS automation codebase from Boto2 to Boto3. We desire this port because Boto2’s pagination of records and results appear fundamentally defective. Like normal when I first start playing with a new library I like to poke around with it using the Interactive Python […]

Securely publish Jenkins build artifacts on Salt Master

Do you want a secure setup for publishing and staging build artifacts from a Jenkins build server to a Salt Master? This guide describes my fully automated pipeline to transport binaries using Salt’s encrypted “bus”. We start off with some Salt States to stand up a Jenkins build server “client”: jenkins/client.sls: # # manage […]

Set postgres user password on PostgreSQL SmartOS Zone

Connect to zone and determine the auto generated password for postgres user: cat /var/svc/log/system-zoneinit\:default.log | grep PGSQL_PW document the result and log into postgres with the following command, entering the password when prompted: [root@psql ~]# psql –user postgres Alter the postgres role’s password: postgres=# ALTER ROLE postgres UNENCRYPTED PASSWORD ‘new-password'; Now exit (\q) then try […]

Risk, Process, and Balance

The operations of a company will have intrinsic risk. Risk occurs each time we decide to take an action or an inaction. This means that anything we choose to do, or not do, has associated risk. An organization which has an unhealthy aversion to risk has a much higher chance of failure. As time goes […]

autofs /net automount stopped working

So autofs randomly stopped working on one of my Ubuntu hosts (this issue has been found on Arch as well so its most likely a change upstream). I found this error in the logs: attempting to mount entry /net/ get_exports: lookup(hosts): exports lookup failed for key “” not found in map source(s). failed to […]

Custom Rundeck HipChat notification templates

Today I built a GUI and workflow around Ansible using Rundeck. Tonight I started diving into sending HipChat notifications and after a bit of research, I managed to create a custom notification template for each Rundeck project. Modify your project’s configuration file, on Ubuntu it was in /var/rundeck/projects/pname/etc/, and add the following line to the […]