Skip to content

Instantly share code, notes, and snippets.

View SEJeff's full-sized avatar

Jeff Schroeder SEJeff

View GitHub Profile
@SEJeff
SEJeff / gist:5797270
Created June 17, 2013 14:24
Forcing splinter to download a file
cls.browser_prefs = {
# Silence the "Unresponsive script" dialogs
"dom.max_chrome_script_run_time": 600,
"dom.max_script_run_time": 600,
"browser.download.folderList": 2,
# We actually download CSV files from search results
# to verify the search functionality works as expected
"browser.download.dir": tempfile.mkdtemp(),
"browser.download.manager.showWhenStarting": False,
"browser.helperApps.neverAsk.saveToDisk": "text/csv,application/csv,text/plain",
@SEJeff
SEJeff / kubectl_cheatsheet.md
Created February 13, 2018 18:09
My personal list of kubectl tips and tricks

Viewing All Node Labels

Shows you a list of nodes and their associated labels + values in the cluster.

kubectl get nodes -o go-template='{{range .items }}{{.metadata.name}}{{"\n-----------\n"}}{{range $key, $value := .metadata.labels }}{{$key}}: {{$value}}{{"\n"}}{{end}}{{"\n"}}{{end}}'

Viewing All Node Annotations

Shows you a list of nodes and their associated annotations + values in the cluster.

@SEJeff
SEJeff / KUBECON.md
Last active December 10, 2017 03:57
List of things to checkout post-kubecon 2017
  • Bloomberg's powerfulseal is a really nice interactive or automated k8s chaos monkey, which lets you do sensible wargaming
  • Bitnami released the new kube sandbox which spins up a single node "production"-like cluster vs minikube
  • Buoyant released Conduit a more "kube-native" and simpler service mesh than istio. Worth investigating!
  • Linuxkit has kubernetes os images. Here is an indepth article about it.
  • Fluentbit is a much lighter weight version of fluend written in C originally for resource constrained systems.
  • kata containers are VMs with the speed of Containers
  • Having a subscription to Grafana Labs entitles us to Grafana Cloud Enterprise, their onprem
@SEJeff
SEJeff / 10-kubeadm.conf
Created April 3, 2017 19:00
Making kubeadm 1.6.0 work on RHEL7 or any EL7 derivative (CentOS, Scientific Linux, etc) put file in (/etc/systemd/system/kubelet.service.d/10-kubeadm.conf)
# Work around these bugs:
# https://github.com/kubernetes/kubeadm/issues/212
# https://github.com/kubernetes/kubernetes/issues/43805
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf --require-kubeconfig=true --pod-manifest-path=/etc/kubernetes/manifests --cgroup-driver=systemd"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
#Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
ExecStart=
@SEJeff
SEJeff / aurora-scheduler.service
Last active November 7, 2016 01:35
aurora systemd config
# /etc/systemd/system/aurora-scheduler.service
[Unit]
Description=The Aurora mesos job scheduler
After=default.target
ConditionPathExists=/etc/sysconfig/aurora-scheduler
[Service]
EnvironmentFile=/etc/sysconfig/aurora-scheduler
ExecStart=/usr/bin/aurora-scheduler \
@SEJeff
SEJeff / hello_world.aurora
Created May 8, 2015 17:28
Test aurora job
version = 1
# copy hello_world.py into the local sandbox
install = Process(
name = 'fetch_package',
cmdline = 'curl http://chit-jsl1/static/hello_world.py > hello_world.py && echo {version} && chmod +x hello_world.py'.format(version=version),
)
# run the script
hello_world = Process(
@SEJeff
SEJeff / aurora.spec
Created August 6, 2015 19:16
File for building Aurora on EL7 based distributions
%define install_directory %{_datadir}/aurora
Name: aurora
Version: 0.9.0
Release: 1%{?dist}.rc0
Summary: A framework for scheduling long-running services against Apache Mesos
License: ASL 2.0
URL: http://%{name}.apache.org/
Source0: apache-%{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
@SEJeff
SEJeff / BROKEN.png
Last active December 27, 2015 11:49
Phabricator broke my meme!
BROKEN.png