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...

AWS ELB redirect http to https except for healthcheck

With some of the recent search engine changes, It's not uncommon to want your site to run completely under https. If you're running on AWS with an Elastic LoadBalancer in place, then you have to go about it a bit differently so you don't end up with a redirect loop....

Opshell

I work with a large number of clients who host their services within AWS. For that reason I'm constantly having to login to the AWS console to get the IP and key of the server that I want to connect as. In the past I had a small ruby script that I was using to assist...

Replace Apache with Nginx and PHP-FPM on AWS Beanstalk

If you find yourself wanting to use Nginx and PHP-FPM instead of apache for your AWS Beanstalk PHP App, well good for you! This is a sample deployment with all of the .ebextensions to do so without having to make a custom AMI What's accomplished here? We swap out PHP...

Rick Baker

Rick Baker

DevOps Engineer