Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / dm-cache-status
Last active March 19, 2017 12:06 — forked from oernii/dm-cache-status
fragile as fuck but keep around
#!/bin/bash -e
# $Id: dm-cache-status,v 1.1 2014/08/19 09:02:46 oernii Exp $
# Status
# ------
#
# <metadata block size> <#used metadata blocks>/<#total metadata blocks>
# <cache block size> <#used cache blocks>/<#total cache blocks>
# <#read hits> <#read misses> <#write hits> <#write misses>
# <#demotions> <#promotions> <#dirty> <#features> <features>*
#cloud-config
# Set up the package repository to get Rudder.
# We use the "latest" pseudo-version name to always get an up-to-date agent.
write_files:
- content: |
[Rudder_4.1]
name=Rudder 4.1 EL repository
baseurl=http://www.rudder-project.org/rpm-4.1/RHEL_7/
@FlorianHeigl
FlorianHeigl / install-rudder-agent-rpm-latest.yml
Last active May 16, 2017 01:27 — forked from jooooooon/install-rudder-agent-rpm-latest.yml
These files allow to install a Rudder agent automatically using cloud-init. All you need to do to use them is set the user-data field in your cloud provider to contain "#include" on one line, and the URL to the raw version of this script on the second line. Assuming you're using an image with cloud-init pre-installed, your new instance will spin…
#cloud-config
# Set up the package repository to get Rudder.
# We use the "latest" pseudo-version name to always get an up-to-date agent.
write_files:
- content: |
[Rudder_4.1]
name=Rudder 4.1 EL repository
baseurl=http://www.rudder-project.org/rpm-4.1/RHEL_7/
@FlorianHeigl
FlorianHeigl / packet-vmhost-EU-cc.yml
Last active May 18, 2017 11:57
post-fix-cludge things for packet.net
#cloud-config
# I'm very unhappy to end up with this scriptlike solution but there was some bugs (i.e. things not being run)
# that seem to be in their cloud-config version
runcmd:
- apt-get -y install wget --force-yes
- wget --quiet -O- "https://www.rudder-project.org/apt-repos/rudder_apt_key.pub" | apt-key add -
- echo "deb http://www.rudder-project.org/apt-4.1/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/rudder.list
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get -y install rudder-agent --force-yes
@FlorianHeigl
FlorianHeigl / yum.md
Last active May 21, 2017 23:35
yum patch management

Yum basic tunables

yum.conf

tune the metadata expiry or rather turn it off and use cron to keep it updated out of band

yum makecache / cron

yum makecache fast
@FlorianHeigl
FlorianHeigl / testing layers
Last active June 29, 2017 21:14
Testing reqs in Ops envs on top of "normal" tests
--------------------------------------
||| Test return to stable state
--------------------------------------
||| External Fault injection tests
--------------------------------------
||| System health
--------------------------------------
\========/
Below: \ /
"insufficient tests for OS code
@FlorianHeigl
FlorianHeigl / zypper_bench.md
Last active July 9, 2017 20:18
Performance of zypper tested (deltaRPM, prefetching)

The test

Install a mixed update for Leap42.1 consisted of 106 packages including kernel update and a very slow samba update script
Try prefetching the updates (i.e. an hour before the downtime)
Try disabling deltaRPM

Caches NOT dropped, all packages likely to stay in cache on today's servers.

VM size:

@FlorianHeigl
FlorianHeigl / gitlab-ops.md
Last active July 15, 2017 13:54
trying some advice for gitlab

my take on the gitlab issue

It happens I had read the database troubleshooting part of Gitlab's Ops manual (https://gitlab.com/gitlab-com/runbooks/blob/master/troubleshooting/postgresql_replication.md) just a month ago, looking for monitoring info. I found many sound instructions on how to deal with database replication issues. I was very happy when I read they're also using Check_MK, but ...

It also made me decide pg_basebackup is too dangerous w/o dedicated DBA staff for two reasons:

  • reason 1: lack of stability / fault tolerance
  • reason 2: destructive resume on issue