Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
LP-XLANGE-OSX:kubernetes xlange$ ./hack/godep-save.sh
+ set -o errexit
+ set -o nounset
+ set -o pipefail
++ dirname ./hack/godep-save.sh
+ KUBE_ROOT=./hack/..
+ source ./hack/../hack/lib/init.sh
++ set -o errexit
++ set -o nounset
++ set -o pipefail
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/bootstrap-os/tasks/bootstrap-ubuntu.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/bootstrap-os/tasks/bootstrap-coreos.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/bootstrap-os/tasks/bootstrap-centos.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/bootstrap-os/tasks/setup-pipelining.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/kubernetes/preinstall/tasks/pre-upgrade.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/kubernetes/preinstall/tasks/gitinfos.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/kubernetes/preinstall/tasks/set_facts.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/kubernetes/preinstall/tasks/set_resolv_facts.yml
statically included: /Users/xlange/code/viasat/itsec-kube/kargo-deuce/roles/kube
@xrl
xrl / deploying_on_ovh.md
Created December 12, 2016 08:25
Deploying DCOS on OVH

OVH is a decent host -- cheap, large-scale hardware. Around 1/5 the cost of the big guys, without the polished API or slick experience (and none of the live migration of bad instances).

Let's run DCOS on OVH!

You'll need 3 instances:

  1. The 'agent' or heavy lifting host
  2. The 'master' or coordinating host
  3. The 'bootstrapping' or dumb-file-serving host
[LogstreamerInput]
log_directory = "/mnt/syslog-archive/all"
file_match = 'cisco-(?P<Year>\d+).(?P<Month>\d+).(?P<Day>\d+).log' # works
#file_match = 'cisco-2015.09.(?P<Day>\d+).log' # doesn't work
priority = ["Year", "Month", "Day"]
decoder = "MyCiscoDecoder"
local cjson = require('cjson')
local fields = {
Type = "cisco",
Timestamp = nil,
Payload = "to be filled in...",
Logger = "logstreamer"
}
function process_message()
@xrl
xrl / diff.rb
Created October 27, 2015 21:55
Poor man's diff utility
require 'pp'
here = Dir.glob("logstash/conf.d/*")
there = Dir.glob("../cookbooks/cookbooks/forwarder/templates/default/elasticsearch/*.erb")
pp here.collect{|h| h = h.split("/").last; match = there.select{|t| t.include?(h); }; [h,match] }.collect{|h,t| "diff logstash/conf.d/#{h} #{t.first}"}.each{|x| puts x; system(x)}; nil
[ScampInput]
Name = "logging"
Listen = "0.0.0.0:30100"
[ScampInput.handler.0]
Action = "Logger.info"
Type = "Logger"
Decoder = "ACoolPayloadDecoder"
Severity = 1
[ScampInput.handler.1]
Action = "Logger.log"
#cloud-config
users:
- name: "core"
groups:
- "sudo"
- "docker"
- "wheel"
- "systemd-journal"
- "portage"
for _,maddr := range maddrs {
scamp.Trace.Printf("maddr: `%s`", maddr)
}
udpAddr, err := net.ResolveUDPAddr("udp", multicastSpec)
if err != nil {
scamp.Trace.Printf("error resolving UDP address: `%s`", udpAddr)
}
multicastConn, err := net.DialUDP("udp", nil, udpAddr)
@xrl
xrl / duo_auth_minimal_python.py
Created September 22, 2015 21:29
The duo API documentation gives a snippet for generating headers but does not give a full example, here's one that works (and hopefully gets indexed by google)
import base64, email, hmac, hashlib, urllib
import httplib, logging
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True