Skip to content

Instantly share code, notes, and snippets.

Avatar

Hippie Hacker hh

View GitHub Profile
View audit-chart.sh
#!/bin/bash
set -x
set -e
MASTER_NODE=$(gcloud compute instances list | grep master | awk '{print $1}')
if echo $1 | grep / ; then
REPO=$(echo $1 | awk -F/ '{print $1}')
KAPP=$(echo $1 | awk -F/ '{print $2}')
fi
kubectl create ns $KAPP
helm install $REPO/$KAPP \
@hh
hh / kapps-charts.org
Last active May 2, 2018
Simple Charts that use the Kubernetes API
View kapps-charts.org

Need to run charts that use service accounts

#+NAME 162 stable 41 incubator 206 total charts

  ls stable | wc -l
  ls incubator | wc -l
echo ===
  ls stable incubator | wc -l
@hh
hh / audit-webhook.org
Last active Apr 19, 2018
kubeadm audit-webhook research
View audit-webhook.org

audit-webhook needs

–audit-webhook-config-file

Most similar to AuditPolicyConfiguration / –audit-policy-file

It can’t really have a default value, because you need to specify a webhook url.

–audit-webhook-initial-backoff

@hh
hh / build-kube-e2e.sh
Last active Apr 12, 2018 — forked from ethernetdan/build-kube-e2e.sh
Build Docker image of Kubernetes E2E tests
View build-kube-e2e.sh
#!/bin/bash -x
set -euo pipefail
echo "Building conformance image..."
echo
APT_PACKAGES="rsync"
# build docker image of repository
docker build -t "${IMAGE_NAME}:${IMAGE_TAG}" - <<EOF
FROM golang:1.8
View pinning_docker.mkd

Pinning version of docker

The new docker-ce repos don't have the old versions. However the old docker-engine repos still contain versions back to 1.5.0

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D
cat > /etc/apt/sources.list.d/docker.list <<EOF
deb [arch=amd64] https://apt.dockerproject.org/repo debian-jessie main 
EOF
@hh
hh / spacemacs.el
Created May 29, 2017
hhspacemacs.el
View spacemacs.el
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
View packer-vsphere-ovf-options.mkd

We modiified bento to support vsphere : https://github.com/ii/bento/tree/vsphere

You need to set some variables to export to vsphere:

#Path is to a local build from source of commit 37fe7647279ed79ec86020b7852e08f04b079dcc
export PATH=/tmp/chrisgo/src/github.com/mitchellh/packer/bin/packer:$PATH
export VI_USERNAME=DOMAIN\\XXXXX.cmcclimans
export VI_PASSWORD=XXXXXX
export VI_HOST=vsphere.MY.com
View docker machine for rancher.mkd
$ MACHINE_DRIVER=openstack docker-machine create rancher
Running pre-create checks...
Creating machine...
(rancher) Creating machine...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...

Detecting the provisioner...
@hh
hh / creds
Last active Dec 3, 2015
creds and winrm and rdp using fingerprints from ec2 via chef-provisoning-aws
View creds
$ cat ./bin/creds
#!/usr/bin/env bash
#JSON=$(knife node show $* -a chef_provisioning.reference -Fjson)
#eval $(echo $JSON | jq -r '.[]["chef_provisioning.reference"]' |grep -Ev '{|}' |sed 's/\s*"\([^"]*\)": /\1=/')
# sets winrm_ssl_thumbprintprint and others at that level
# use this later
export NODE_NAME="$*"
INSTANCE_ID=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=$NODE_NAME" | jq .Reservations[0].Instances[0].InstanceId | sed -e 's/\"//g')
@hh
hh / _1.mkd
Last active Nov 18, 2015
Trying to get connman to talk to ofono to talk to my Sierra Wireless card => Verizon```;
View _1.mkd