Skip to content

Instantly share code, notes, and snippets.

View gabrtv's full-sized avatar

Gabe Monroy gabrtv

View GitHub Profile
$ kubectl help
kubectl controls the Kubernetes cluster manager.
Find more information at https://github.com/kubernetes/kubernetes.
Basic Commands (Beginner):
create Create a resource by filename or stdin
expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
run Run a particular image on the cluster
set Set specific features on objects
@gabrtv
gabrtv / gist:cbe16bb9afded9f70129
Last active August 29, 2015 14:27
Ceph on Kubernetes
$ ceph -s
cluster d0b1c3ae-6e81-4501-b8f5-0c2c5eb020bf
health HEALTH_OK
monmap e3: 3 mons at {ceph-mon-4nee1=10.244.93.2:6789/0,ceph-mon-e819q=10.244.95.2:6789/0,ceph-mon-y7av3=10.244.97.2:6789/0}
election epoch 6, quorum 0,1,2 ceph-mon-4nee1,ceph-mon-e819q,ceph-mon-y7av3
mdsmap e6: 1/1/1 up {0=ceph-mds-6aw2n=up:active}, 2 up:standby
osdmap e13: 3 osds: 3 up, 3 in
pgmap v72: 192 pgs, 3 pools, 1962 bytes data, 20 objects
17330 MB used, 27974 MB / 47831 MB avail
192 active+clean
@gabrtv
gabrtv / gist:26832b547819f917b118
Created January 16, 2015 19:25
Enable 512MB swap on CoreOS
fallocate -l 512m /512MiB.swap
chmod 600 /512MiB.swap
mkswap /512MiB.swap
losetup -f /512MiB.swap
/sbin/swapon /dev/loop0

Keybase proof

I hereby claim:

  • I am gabrtv on github.
  • I am gabrtv (https://keybase.io/gabrtv) on keybase.
  • I have a public key whose fingerprint is 11A8 FA16 E5F0 51B4 FC0A 066A A921 0D38 8728 A5A4

To claim this, I am signing this object:

core@deis-1 ~ $ nse 3254
groups: cannot find name for group ID 11
root@b4ffc49bf4e0:/# tcpdump -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
20:03:54.109016 IP 10.1.42.1.33654 > 10.1.0.9.5000: Flags [S], seq 423731768, win 29200, options [mss 1460,sackOK,TS val 14774827 ecr 0,nop,wscale 7], length 0
20:03:55.118781 IP 10.1.42.1.33654 > 10.1.0.9.5000: Flags [S], seq 423731768, win 29200, options [mss 1460,sackOK,TS val 14775836 ecr 0,nop,wscale 7], length 0
20:03:57.122025 IP 10.1.42.1.33654 > 10.1.0.9.5000: Flags [S], seq 423731768, win 29200, options [mss 1460,sackOK,TS val 14777840 ecr 0,nop,wscale 7], length 0
20:03:59.122747 ARP, Request who-has 10.1.0.9 tell 10.1.42.1, length 28
20:04:00.124041 ARP, Request who-has 10.1.0.9 tell 10.1.42.1, length 28
ruby_block "stop-services-in-parallel" do
block do
threads = []
targets.each { |s, f|
threads << Thread.new { |t|
s.run_action(:stop)
f.run_action(:delete)
}
}
threads.each { |t| t.join }
gabriel@delta:~$ deis formations:create test
Creating formation... done, created test
See `deis help layers:create` to begin building your formation
gabriel@delta:~$ deis layers:create
Usage: deis layers:create <formation> <id> <flavor> [options]
gabriel@delta:~$ deis layers:create test runtime static
Creating runtime layer... done in 3s
gabriel@delta:~$ deis layers:info
Usage: deis layers:info <formation> <id>
@gabrtv
gabrtv / gist:6452526
Created September 5, 2013 16:24
Example: Finishing a feature with HubFlow
gabriel@delta:~/workspace/deis$ git hf feature finish
Fetching origin
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0)
Unpacking objects: 100% (1/1), done.
From github.com:opdemand/deis
b22cf85..242ac17 develop -> origin/develop
Switched to branch 'develop'
Your branch is behind 'origin/develop' by 2 commits, and can be fast-forwarded.
Updating b22cf85..242ac17
@gabrtv
gabrtv / gist:6451734
Created September 5, 2013 15:28
Example: Creating a new feature branch using HubFlow
gabriel@delta:~/workspace/deis$ git hf feature start chef-api-retries
Fetching origin
Switched to a new branch 'feature/chef-api-retries'
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:opdemand/deis.git
* [new branch] feature/chef-api-retries -> feature/chef-api-retries
Summary of actions:
- A new branch 'feature/chef-api-retries' was created, based on 'develop'
- The branch 'feature/chef-api-retries' has been pushed up to 'origin/feature/chef-api-retries'
@gabrtv
gabrtv / Failing (exec over SSH)
Created August 20, 2013 17:46
Docker run hangs over SSH
execve("/usr/bin/docker", ["docker", "run", "-v", "/opt/deis/runtime/slugs/docile-i"..., "deis/buildstep", "ls", "-la"], [/* 12 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x982330) = 0
sched_getaffinity(0, 128, {1, 0, 0, 0}) = 32
clock_gettime(CLOCK_REALTIME, {1377020251, 252416433}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd226e01000
mmap(NULL, 268480448, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd216df6000
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
munmap(0xc000000000, 65536) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd216dd6000
mmap(0xc200000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc200000000