/etc/systemd/system/kube-apiserver.service
[Unit]
Pending real documentation.... We do have a development container which includes the same toolchain version that was used to build CoreOS but it works under systemd-nspawn, not docker, and isn't documented. But here is a quick guide that may be a useful starting place.
# on coreos
wget http://alpha.release.core-os.net/amd64-usr/current/coreos_developer_container.bin.bz2
bunzip2 coreos_developer_container.bin.bz2
sudo systemd-nspawn -i coreos_developer_container.bin --share-system
#!/bin/bash | |
# !!! This script assumes that the device needing to be formatted and encrypted is /dev/sdb | |
# !!! Also... be sure to copy and store the generated encryption key file from /root | |
# Note that the secondary drive will be mounted at /var/lib/mongodb, | |
# ... which is the default location for MongoDB data files on Ubuntu and Mongo at least v2.6 | |
# add PPA for mongodb |
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5
#!/bin/bash | |
# apt-get install jq | |
#set -eu | |
shopt -s nullglob | |
readonly base_dir=$1 | |
if [ -z "$base_dir" ] ; then | |
echo 'please location docker registry store location!'; | |
exit; | |
fi |
This is an example of using Linux Kernel's
Transparent Proxy
to route all TCP traffic to docker containers without having to resort to
PROXY protocol
which is not supported by some applications
(e.g. sshd
). To get the demo to work you only need vagrant installed:
git clone [this-gist] tproxy-demo
cd tproxy-demo
vagrant up
The prep-script.sh
will setup the latest Node and install the latest perf version on your Linux box.
When you want to generate the flame graph, run the following (folder locations taken from install script):
sudo sysctl kernel/kptr_restrict=0
perf record -i -g -e cycles:u -- ~/sources/node/node --perf-basic-prof script.js
perf script | egrep -v "( __libc_start| LazyCompile | v8::internal::| Builtin:| Stub:| LoadIC:|\[unknown\]| LoadPolymorphicIC:)" | sed 's/ LazyCompile:[*~]\?/ /' | ~/sources/FlameGraph/stackcollapse-perf.pl > out.perf-folded
{ | |
"percent" : 6.297823041677475, | |
"bytesDone" : NumberLong("22117130240"), | |
"files" : { | |
"done" : 8, | |
"total" : 166 | |
}, | |
"current" : { | |
"source" : "/var/lib/mongodb_historical11/local_oplog_rs_p15_id__ddfdbfc0_1_19.tokumx", | |
"dest" : "/backup11/local_oplog_rs_p15_id__ddfdbfc0_1_19.tokumx", |
docker: | |
registry: myregistry.com | |
servers: | |
- http://mynode01.com:4243 | |
- http://mynode02.com:4243 | |
collection: docker | |
repository-namespace: tsuru | |
router: hipache | |
deploy-cmd: /var/lib/tsuru/deploy | |
run-cmd: |
#!/usr/bin/python | |
import json | |
import os | |
import shutil | |
import subprocess | |
import re | |
dockerdir = '/var/lib/docker' | |
volumesdir = os.path.join(dockerdir, 'volumes') |