Skip to content

Instantly share code, notes, and snippets.

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 1
labels:
addonmanager.kubernetes.io/mode: EnsureExists
k8s-app: heapster
kubernetes.io/cluster-service: "true"
env
dpdk: dpdk-stable-17.02.1
ovs: 6b1d46253362c0bad844cedf93e22e7bf94d55dc/2.7.0?
kernel: 4.11.5-200.fc25.x86_64
1, download and install dpd
$ wget http://dpdk.org/browse/dpdk-stable/snapshot/dpdk-stable-17.02.1.zip
$ unzip dpdk-stable-17.02.1.zip
$ cd dpdk-stable-17.02.1
$ export DPDK_DIR=`pwd`
@feiskyer
feiskyer / demo.sh
Created June 7, 2017 03:34
Rook.io on kubernetes with frakti
# deploy kubernetes with frakti
$ curl -sSL https://github.com/kubernetes/frakti/raw/master/cluster/allinone.sh | bash
# change default memory to 256MB, add --memory=256 at the end
$ grep ExecStart /lib/systemd/system/frakti.service
ExecStart=/usr/bin/frakti --v=3 --log-dir=/var/log/frakti --logtostderr=false --cgroup-driver=cgroupfs --listen=/var/run/frakti.sock --streaming-server-addr=%H --hyper-endpoint=127.0.0.1:22318 --memory=256
$ systemctl daemon-reload
$ systemctl restart frakti
# create rook operator
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@feiskyer
feiskyer / calico.yaml
Last active March 16, 2017 09:19
Kubernetes calico network plugin
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: calico
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
@feiskyer
feiskyer / weave.yaml
Last active March 16, 2017 07:52
Kubernetes weave network plugin
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: weave-net
rules:
- apiGroups:
- ""
resources:
- pods
- namespaces
@feiskyer
feiskyer / flannel.yaml
Last active December 27, 2017 17:13
Kubernetes flannel network plugin
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: flannel
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
# curl --unix-socket /var/run/hyper.sock -X POST "http://localhost/execvm?pod=nginx-9296454126&command=\[\"/sbin/busybox\",\"ls\",\"/sbin\"\]"
busybox
depmod
iptables
iptables-restore
iptables-save
ipvsadm
modprobe
mount.nfs4
#!/bin/bash
export MUSL_VERSION=1.1.16
export SOCAT_VERSION=1.7.3.2
export NCURSES_VERSION=6.0
export READLINE_VERSION=7.0
export OPENSSL_VERSION=1.0.2k
function build_musl() {
cd /build
@feiskyer
feiskyer / pg-pong.py
Created January 4, 2017 13:54 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward