Skip to content

Instantly share code, notes, and snippets.

@simonswine
simonswine / .vimrc
Created December 1, 2015 12:37
Vim configuration
" Disable compatability
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Let Vundle manage Vundle
Plugin 'gmarik/vundle'
@simonswine
simonswine / hello-world-hpa.yaml
Created April 21, 2016 16:04
Hello world HPA for kubernetes
---
kind: Service
apiVersion: v1
metadata:
name: hello-world-hpa
labels:
app: hello-world
spec:
type: NodePort
ports:
@simonswine
simonswine / slingshot-flocker.md
Last active July 19, 2016 10:40
Slingshot provisions kubernetes & flocker

Instructions

Create a flocker enabled cluster

slingshot cluster create \
  -f - \
  -I jetstack/slingshot-ip-terraform-aws-coreos:0.1 \
  -C jetstack/slingshot-cp-ansible-k8s-coreos:flocker-0.1 \
 christian-flocker <<EOF
# Flocker go library examples
package main
import (
"encoding/json"
flockerApi "github.com/simonswine/flocker-go"
"log"
)
@simonswine
simonswine / copy-k8s-resources-across-namespaces.sh
Created August 2, 2016 13:40
Copying kubernetes resources accross namespaces
kubectl get rs,secrets -o json --namespace old | jq '.items[].metadata.namespace = "new"' | kubectl create-f -
@simonswine
simonswine / .vimrc
Created August 11, 2016 07:20
.vimrc 2016-08-10
" .vimrc
"
" Install vundle
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
"
" Launch vim and run
" :VundleInstall
" Disable compatability
set nocompatible
2016/08/16 08:29:54 [INFO] Terraform version: 0.7.0 e822a79165dbc06bbf8271ee349fe256867d53dc
2016/08/16 08:29:54 [DEBUG] Detected home directory from env var: /home/christian
2016/08/16 08:29:54 [DEBUG] Detected home directory from env var: /home/christian
2016/08/16 08:29:54 [DEBUG] Attempting to open CLI config file: /home/christian/.terraformrc
2016/08/16 08:29:54 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/08/16 08:29:54 [DEBUG] Detected home directory from env var: /home/christian
2016/08/16 08:29:55 [TRACE] Graph after step *terraform.ConfigTransformer:
google_container_cluster.default-infra - *terraform.GraphNodeConfigResource
var.default_zone - *terraform.GraphNodeConfigVariable
antigen use oh-my-zsh
antigen theme bira
antigen bundles <<EOBUNDLES
zsh-users/zsh-syntax-highlighting
git
tmux
EOBUNDLES

Keybase proof

I hereby claim:

  • I am simonswine on github.
  • I am simonswine (https://keybase.io/simonswine) on keybase.
  • I have a public key whose fingerprint is D29F 745D D48C A0E0 C33A 7B08 1FF2 C09C 6204 5ED2

To claim this, I am signing this object:

$ terraform apply
libvirt_cloudinit.master: Refreshing state... (ID: /var/lib/libvirt/images/k8s-master-clou...g;5969f69a-6d83-db3b-fc21-3194e29f6138)
libvirt_network.network: Refreshing state... (ID: f9d0bfad-c7ec-46c1-bc0e-0ed393322f7d)
libvirt_volume.centos-7: Refreshing state... (ID: /var/lib/libvirt/images/base-centos-7-1706.qcow2)
libvirt_volume.master: Refreshing state... (ID: /var/lib/libvirt/images/k8s-master-1.qcow2)
libvirt_domain.master: Refreshing state... (ID: 55cc32b2-2d7f-4656-a4ba-359d40df3a12)
libvirt_cloudinit.master: Destroying... (ID: /var/lib/libvirt/images/k8s-master-clou...g;5969f69a-6d83-db3b-fc21-3194e29f6138)
libvirt_cloudinit.master: Destruction complete
libvirt_cloudinit.master: Creating...
local_hostname: "" => "master-1"