Skip to content

Instantly share code, notes, and snippets.

View eheydrick's full-sized avatar

Eric Heydrick eheydrick

View GitHub Profile
https://launchpad.net/api/1.0/~adiscon/+archive/ubuntu/v8-stable/signing_key_fingerprint
{'Content-Length': '742', 'Content-Encoding': 'gzip', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding', 'Server': 'Apache', 'Last-Modified': 'Wed, 19 Nov 2014 16:06:07 GMT', 'Connection': 'close', 'ETag': '"6ca"', 'Date': 'Sun, 22 May 2016 00:14:51 GMT', 'Content-Type': 'text/html'}
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en"
lang="en"
>
<head>

Ubuntu 16.04

Having just upgraded from Ubuntu 14.04 Trusty to 16.04 Xenial, I thought I'd share the pain points I encountered.

kswapd uses 100% CPU on smaller instances

There's a bug in newer kernels on EC2 that causes kswapd0 to consume 100% CPU. It seems to happen more often on smaller instances with less RAM (t2.micros for example). There is a workaround changing a udev configuration.

kernel doesn't boot on some larger instances

@eheydrick
eheydrick / rename-chef-org.txt
Last active August 13, 2018 04:50
Rename a chef org
It's not officially supported but you can rename an org on Chef Server 12+
# connect to the DB
sudo -u opscode-pgsql /opt/opscode/embedded/bin/psql -U "opscode-pgsql" -d opscode_chef
# get the id of the org you want to change
select * from orgs;
# update the org name
update orgs set name='NEW_ORG_NAME' where id='ORG_ID';
@eheydrick
eheydrick / monitoring.md
Last active August 8, 2018 17:34
Monitoring talk

Monitoring Overview

Why monitoring

  • Distributed systems are complex, things fail in unexpected ways
  • Monitoring gives you visibility into the system
  • Monitoring tells you stuff is broken before the customer notices

Types of monitoring

@eheydrick
eheydrick / fastly-datacenters
Created August 28, 2020 16:55
Get list of Fastly datacenters with curl
$ curl -s -H "Fastly-Key: <API Key>" https://api.fastly.com/datacenters | jq .
[
{
"code": "AMS",
"name": "Amsterdam",
"group": "Europe",
"coordinates": {
"x": 0,
"y": 0,
"latitude": 52.308613,