Skip to content

Instantly share code, notes, and snippets.

View StephenKing's full-sized avatar

Steffen Gebert StephenKing

View GitHub Profile
@StephenKing
StephenKing / asciidoc.yml
Created May 27, 2020 23:18
GitHub Action to render and upload Asciidoc
View asciidoc.yml
name: build asciidoc
on:
push:
branches:
- master
jobs:
asciidoc_build:
runs-on: ubuntu-18.04
name: Build Asciidoc
@StephenKing
StephenKing / tf012.sh
Created May 8, 2020 08:30
Terraform 0.12 syntax migration
View tf012.sh
#!/bin/bash
#
# Replaces certain (simpler) occurences of Interpolation-only expressions,
# which are deprecated in Terraform 0.12
#
# works on MacOS sed, no clue if I have GNU sed or BSD sed.. it doesn't want to tell me...
SED_CMD="sed -i.bak -E "
@StephenKing
StephenKing / talks.md
Last active April 3, 2019 15:27
DevOps Meetup XXL 2019
View talks.md

Talks

Entwickelst du noch oder lieferst du schon? (Sebastian Schmid, DATEV)

DevOps ist in aller Munde und wer sich damit auseinandersetzt, ist schnell begeistert. Die Betrachtung der gesamten Wertschöpfungskette ist dabei das Wichtigste und gleichzeitig die größte Herausforderung, wenn man sich in einem Unternehmen mit kleinteiligen Prozessen und mehr oder weniger abgegrenzten Abteilungen und Bereichen befindet. Wir haben die Herausforderung angenommen und befinden uns im Wandel hin zu einer DevOps Kultur. Bei DATEV haben wir in den letzten Jahren viele Erfahrungen sammeln können, angefangen beim Kulturwandel bis hin zu den Tools.

Lessons Learned:

  • Kultur & Mindset - Culture eats Strategy for Breakfast
  • Product Teams
@StephenKing
StephenKing / create-partition.sh
Created February 7, 2019 20:07
CloudTrail Athena: Create Partitions
View create-partition.sh
#!/bin/bash
# creates Athena partitions for cloudtrail logs (per account, region, year, month)
# usage:
# ./create-partition.sh my-cloudtrail-bucket 1234566 | pbcopy
BUCKET=$1
ACCOUNT=$2
YEAR=$(date +'%Y')
@StephenKing
StephenKing / README.md
Last active January 18, 2018 08:30
Grafana Dashboard for kamon-akka 1.0
View README.md
  • make sure that the prometheus job is called kamon
  • correct the data source
  • update many diagrams and change/remove the akka_role="$role" label. We have this available through relabeling of AWS EC2 tags.
@StephenKing
StephenKing / upload-changes.sh
Created February 4, 2017 19:54
Parses git diff to upload changes of main chef-repo (data bags, environments, roles)
View upload-changes.sh
#!/usr/bin/env bash
# This file should be called with one argument, which is a list of commits
# from the previous one (the one which should be seen as "processed) until
# to the latest one, which should be included.
#
# Repo as at commit a123. Now new commits b234 and c345 pushed.
# Expected command:
# upload-changes.sh a123..c345
#
@StephenKing
StephenKing / reset.sh
Last active November 23, 2016 07:52
Network config reset
View reset.sh
#!/bin/sh
##########################################
# Make sure that $FILE.$BACKUP_EXT exists!
# i.e. /etc/network/interfaces.bak
##########################################
FILE=/etc/network/interfaces
BACKUP_EXT=bak
@StephenKing
StephenKing / chef-client.log
Created October 23, 2016 15:11
Installation of dependent plugins
View chef-client.log
[2016-10-23T16:35:49+02:00] DEBUG: Plugin workflow-support does not seem to be installed
[2016-10-23T16:35:49+02:00] INFO: Installing workflow-support:2.9
[2016-10-23T16:35:49+02:00] DEBUG: Installing plugin dependencies for workflow-support
[2016-10-23T16:35:49+02:00] DEBUG: Reading workflow-api's information from /var/lib/jenkins/plugins/workflow-api.jpi
[2016-10-23T16:35:49+02:00] DEBUG: Content of /var/lib/jenkins/plugins/workflow-api.jpi manifest: Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: svanoort
Build-Jdk: 1.8.0_102
Extension-Name: workflow-api
@StephenKing
StephenKing / asg_of_server_with_floating.yaml
Last active October 20, 2021 14:15
Assigning a Floating IP Address to Each Instance of an Autoscaling Group in OpenStack Heat
View asg_of_server_with_floating.yaml
heat_template_version: 2013-05-23
description: >
This template creates an AutoScalingGroup based on the stack
defined in the file `server_with_floating.yaml`.
parameters:
key_name:
type: string
description: Name of an existing key pair to use for the instances
@StephenKing
StephenKing / Dockerfile
Last active April 14, 2016 15:55
SSL issues in Docker Debian 8
View Dockerfile
# fails with SSL error
FROM debian:8
# returns HTML content (SSL successful)
# FROM debian:7
# FROM ubuntu:latest
RUN apt-get update
RUN apt-get -y install curl ca-certificates
RUN curl https://akamai.bintray.com