Start or Restart a Forever process with ansible
Have a few processes that we run with Forever that I have been working on automating. Needed to be able to start them if they are not running and restart them if they are. The restart was a bit tricky. Usually you can just restart the process name, but since some...
Tag your AWS cloudwatch log groups
Been on a new job for a few months now. One of the first things I noticed is we were getting a huge bill for AmazonCloudWatch PutLogEvents and we weren't quite sure what was the primary culprit. So, ended up creating a small tool to tag all of our log groups and then...
AWS EKS kubelet error updating node status
Recently started setting up an AWS EKS cluster. Everything working fine, but decided to look at the kubelet logs on one of the nodes and saw a bunch of errors like these: Dec 01 09:42:52 ip-172-26-0-213.ec2.internal kubelet[4226]: E1009 09:42:52.335445 4226...
mysqldump with where clause in a bash script
So, this has been an interesting one to work out with a bunch of trial and error. The mysqldump command has a very useful --where option that allows you to only dump out specific rows that match your where clause. Say you want to mysqldump all rows where...
root : problem with defaults entries ; TTY=pts/2 ; PWD=/root ;
In a previous post I wrote about how to use Realmd and SSSD to join Ubuntu 16.04 to active directory. This has been working fine, but I noticed my root mailbox had a bunch of repeated entries with the following: root : problem with defaults entries ; TTY=pts/2 ;...
Auto Sync AWS AMIs to another region with Lambda
If you're using AWS for a critical application then you probably have a disaster recovery region setup. If it's automated well, then everything you need to spin up the disaster recovery region should be quick and easy. One thing that can be a bit of a pain is...
Automate Ubuntu joining Windows Active Directory Domain
Previously I wrote a post about joining your Ubuntu 16.04 server to Active Directory. This works well and what I have done with one of my clients is create an AMI within AWS that handles most of this. But, it still requires some manual interaction because during the...
How to keep your secret credentials out of code
I spend a lot of time doing freelance / consulting work for a variety of businesses. One thing that I see more often than not is git repositories that are littered with passwords, access keys, secret credentials, etc. It's bad practice from a security standpoint, so...
Install Docker CE on Ubuntu 16.04
In the middle of upgrading a bunch of servers from Ubuntu 14.04 to Ubuntu 16.04. One of the services we utilize heavily is Docker. So, below you'll find a simple guide to getting Docker CE running on Ubuntu 16.04. I won't go into details on usage because there are so...
Join Ubuntu 16.04 into Active Directory Domain
There are quite a few guides lying around the internet for getting Ubuntu 16.04 working with Active Directory. I followed a few of them, and always ended up with problems. Can su - to the user, but can't ssh. Can su - to the user and ssh as the user, but cannot...
Rick Baker
DevOps Engineer