Skip to content

Instantly share code, notes, and snippets.

View ezeev's full-sized avatar

Evan C Pease ezeev

View GitHub Profile
package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"log"
@ezeev
ezeev / install-k8s-aws
Last active September 21, 2016 21:40
install k8s on aws
export AWS_DEFAULT_PROFILE=default
export KUBE_AWS_ZONE=us-west-2a
export NUM_NODES=2
export MASTER_SIZE=m3.medium
export NODE_SIZE=m3.medium
export KUBE_AWS_INSTANCE_PREFIX=k8s
export KUBERNETES_PROVIDER=aws; wget -q -O - https://get.k8s.io | bash
@ezeev
ezeev / install.sh
Last active September 19, 2016 20:33
install.sh
#!/bin/bash
# Install Wavefront Proxy and configures standard telegraf plugin
# ####
function logo() {
cat << "EOT"
__ __ _____ __
/ \ / \_____ ___ __ _____/ ____\______ ____ _____/ |_
\ \/\/ /\__ \\ \/ // __ \ __\\_ __ \/ _ \ / \ __\
\ / / __ \\ /\ ___/| | | | \( <_> ) | \ |
{
"family": "cadvisor",
"containerDefinitions": [
{
"name": "cadvisor",
"image": "wavefronthq/cadvisor:latest",
"cpu": 10,
"memory": 300,
"portMappings": [
{
@ezeev
ezeev / ECS-Launch-cAdvisor-Wavefront.sh
Last active August 25, 2016 17:37
Example ECS Task Definition for Wavefront cAdvisor
#!/bin/bash
task_def="cadvisor"
start ecs
yum install -y aws-cli jq
instance_arn=$(curl -s http://localhost:51678/v1/metadata \
| jq -r '. | .ContainerInstanceArn' | awk -F/ '{print $NF}' )
cluster=$(curl -s http://localhost:51678/v1/metadata | jq -r '. | .Cluster' )
az=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)
region=${az:0:${#az} - 1}
@ezeev
ezeev / telegraf.conf
Last active November 3, 2016 00:08
Base Telegraf Config
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
#
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
apiVersion: v1
kind: ReplicationController
metadata:
labels:
k8s-app: heapster
name: heapster
version: v6
name: heapster
namespace: default

Example build.sbt

libraryDependencies ++= Seq(
  jdbc,
  cache,
  ws,
  specs2 % Test
)
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
curl -i '[API_HOST]/api/dashboard' -X POST -H "Content-Type:application/json" -H 'X-AUTH-TOKEN: [API_TOKEN]' -d '
{
"customer": "collector",
"url": "collectd_test2",
"name": "Collectd Template",
"eventFilterType": "BYCHART",
"sections": [
{
"name": "CPU",
"rows": [
@ezeev
ezeev / collectd.conf.append
Last active November 10, 2015 05:20
collectd config template
#defaul wavefront config
LoadPlugin swap
LoadPlugin df
LoadPlugin processes
LoadPlugin uptime
LoadPlugin users
<LoadPlugin python>
Globals true
</LoadPlugin>
<Plugin python>