Monthly Archives: October 2016

Bootstrapping CFEngine agent to a regional (AWS) hub

Hat tip to my DevOps buddy Joaquin Menchaca for this one-liner to find out what AWS region your VM is in: AWS_REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//') I am going to use it to bootstrap my Kubernetes VMs to … Continue reading

Posted in Uncategorized | Leave a comment

Looking up Postgres table name by id

When working with [TOAST][1] tables, I had the relid (relation or table id) of the parent table, and needed to get its name. Here is how to perform the lookup. For example, if the relid is 19665: SELECT relid, relname … Continue reading

Posted in postgres | Leave a comment

Safely updating /etc/sudoers non-interactively

I recently added my account to /etc/sudoers on N servers using Ansible in raw mode (running a shell oneliner). We use visudo to edit /etc/sudoers when we are logged into a server, but since I was doing this in “batch” … Continue reading

Posted in Uncategorized | Leave a comment

Introducing Infrastructure Inventory with CFEngine Enterprise

CFEngine Enterprise makes it absurdly easy to track deployed servers. All you have to do is spin up a hub, install the lightweight agent on each host, and run cf-agent –bootstrap <hub> to setup a trust relationship between hub and … Continue reading

Posted in Uncategorized | Leave a comment

CFEngine Inventory of Windows Server 2012

I am working on setting up a “reporting portal” CFEngine Enterprise hub to aggregate inventory from several hubs in different parts of a company (managed by different organizations). This one “superhub” would allows executives instant insight into infrastructure integrity. While … Continue reading

Posted in Uncategorized | Leave a comment