Skip to content

Instantly share code, notes, and snippets.

View jeremypruitt's full-sized avatar
:octocat:
Day 470 @ Waabi.ai

Jeremy Pruitt jeremypruitt

:octocat:
Day 470 @ Waabi.ai
View GitHub Profile
@jeremypruitt
jeremypruitt / getting-started-with-kubernetes-operator-framework.md
Last active May 15, 2018 07:54
A working getting started guide for the kubernetes operator framework that incorporates some pending pull requests

GETTING STARTED GUIDE FOR THE KUBERNETES OPERATOR FRAMEWORK

The getting started guide for the kubernetes operator framework has a few issues that prevent a smooth intial experience with the SDK. This doc represents a successful effort to follow the getting started guide while incorporating fixes from pending pull requests.

!! GOPATH must be set

!! Please make sure you have a an account on Quay.io for the next step, 
   or substitute your preferred container registry. On the registry,
   create a new public image repository named “memcached-operator”.
@jeremypruitt
jeremypruitt / devops-engineer-interview-questions.md
Last active January 12, 2024 09:55
DevOps Engineer Interview Questions
@jeremypruitt
jeremypruitt / README.md
Last active August 8, 2017 23:08
Test Markdown Collapse

Shamir Secret Holder

A Shamir Secret holder is responsible for being available to unseal vault when starting it up.

Requirements

  • Vault Binary
  • GPG Key

Responsibilities

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20170806"
AAAAB3NzaC1yc2EAAAABJQAAAQEAqP/LmpNx7SNvvhVnDgjtJuP6GRYgpwE/xLgj
mh+nnsHAOY9WH9FeUuKkA7vZrpa+p420CFdOSaPUS3qZHD7lxqBmVy/T04gWSL92
k0dpvqM/M0zZ1IH1PcMPCN6+V/ruQnScSS0iV6CaRhaS+WPJLqtqiAPEAGmgVQxB
WHr/d5af+4TMpe47DA8sK+SiX4a312odcsSVUtKRsI6DJzgHnNMSG4xG3aewbBEe
dnJW6ddAxIvTh19kJU5H4aYLE0VA0mXq9To/FvL3I0i0XWEkLOELfQ/KuGXiKP3w
KAVpJejYY9HwSaIdV2cT7rsuED+0uKhUOu8XTFtoXlJrMsW0wQ==
---- END SSH2 PUBLIC KEY ----

Vault Admin

The Vault Admin is responsible for ensuring the vault service and its backend are available. They also manage the bringup process in the event of an outage, including coordination of the shamir secret holders during the process of unsealing the vault.

Requires:

  • Much more consideration for production :)
  • Vault binary

For PoC purposes, just use the in-memory vault dev mode:

@jeremypruitt
jeremypruitt / render-patch-playbook.go
Created November 11, 2015 09:57
Render Go template to create an Ansible playbook file
package main
import (
"os"
"text/template"
)
func check(e error) {
if e != nil { panic(e) }
}
var req = https.request(options, function(res) {
console.log("statusCode: ", res.statusCode);
//console.log("headers: ", res.headers);
var data = [], data_length = 0;
res.on('data', function(d) {
data.push(d);
data_length += d.length;
}).on('end', function() {
var buf = new Buffer(data_length);
@jeremypruitt
jeremypruitt / lambda-monkey
Created May 14, 2015 08:16
AWS Lambda function to identify ec2 instances without an owner tag
console.log('Loading function');
var AWS = require('aws-sdk');
AWS.config.region = 'us-east-1';
exports.handler = function(event, context) {
console.log("\n\nLoading handler\n\n");
var ec2 = new AWS.EC2();
var with_owner = {};
var without_owner = {};
@jeremypruitt
jeremypruitt / sns-publish
Last active August 19, 2022 18:09
AWS Lambda function to publish to SNS topic
console.log('Loading function');
var AWS = require('aws-sdk');
AWS.config.region = 'us-west-2';
exports.handler = function(event, context) {
console.log("\n\nLoading handler\n\n");
var sns = new AWS.SNS();
sns.publish({
@jeremypruitt
jeremypruitt / gist:ca62a5cdc95f579713b9
Last active April 26, 2018 13:05
Modified ansible windows remoting script
# Configure a Windows host for remote management with Ansible
# -----------------------------------------------------------
#
# This script checks the current WinRM/PSRemoting configuration and makes the
# necessary changes to allow Ansible to connect, authenticate and execute
# PowerShell commands.
#
# Set $VerbosePreference = "Continue" before running the script in order to
# see the output messages.
#