Skip to content

Instantly share code, notes, and snippets.

@aspyker
aspyker / SoftLayerUserDataBash
Created February 3, 2014 20:07
Parse for values in SoftLayer User Metadata js file.
#!/bin/bash
metajsval='UNKNOWN'
getmetajsval() {
metajs=`cat /var/spool/softlayer/meta.js`
metajs=${metajs#\[\"}
metajs=${metajs%\"\]}
IFS='&' read -a sl_meta_data <<< "${metajs}"
@aspyker
aspyker / gist:9420277
Created March 7, 2014 21:15
Turbine log when instances stop getting reported
2014-03-07 15:14:55 DEBUG com.netflix.turbine.monitor.instance.InstanceMonitor:417 [InstanceMonitor] [getNextStatsData]: ----> Pushed to cluster. Latency of event: 6066 + timeOfEvent: 1394226889467 [CreateTokenCommand]
2014-03-07 15:14:55 INFO com.netflix.turbine.monitor.instance.InstanceMonitor:425 [InstanceMonitor] [getNextStatsData]: Telling stream reader to wait for 1 second before processing anymore so it can catch up.6066
2014-03-07 15:14:55 DEBUG com.netflix.turbine.monitor.instance.InstanceMonitor:368 [InstanceMonitor] [getNextStatsData]: Skipping event to catch up to end of feed and reduce latency
2014-03-07 15:14:55 DEBUG com.netflix.turbine.monitor.instance.InstanceMonitor:368 [InstanceMonitor] [getNextStatsData]: Skipping event to catch up to end of feed and reduce latency
2014-03-07 15:14:55 DEBUG com.netflix.turbine.monitor.instance.InstanceMonitor:368 [InstanceMonitor] [getNextStatsData]: Skipping event to catch up to end of feed and reduce latency
2014-03-07 15:14:55 DEBUG com.netflix.tu
@aspyker
aspyker / gist:ccc8dbeba9afa61f8c3b
Created June 20, 2014 14:45
acme air base history
IMAGE CREATED CREATED BY SIZE
82c797ac76d0 11 hours ago /bin/sh -c #(nop) CMD [/usr/bin/supervisord - 0 B
c9f207f7c94b 11 hours ago /bin/sh -c #(nop) EXPOSE map[22/tcp:{}] 0 B
edeaed254949 11 hours ago /bin/sh -c apt-get update && DEBIAN_FRONTEND= 303.4 MB
daffc1a72a76 11 hours ago /bin/sh -c echo oracle-java7-installer shared 410 B
0ed4dbcfa0d5 11 hours ago /bin/sh -c apt-key adv --keyserver hkp://keys 25.02 kB
5cd83ff941df 11 hours ago /bin/sh -c echo "deb-src http://ppa.launchpad 2.029 kB
f5d53492c784 11 hours ago /bin/sh -c echo "deb http://ppa.launchpad.net 1.96 kB
3d1ac9dd5ad5 11 hours ago /bin/sh -c sed -i 's/session \+required \+pam 2.139 kB
d2d8cd14a70a 11 hours ago /bin/sh -c cat /root/.ssh/id_rsa.pub >> /root 393 B
@aspyker
aspyker / gist:bdb8c81ea3cb155a0fa3
Last active August 29, 2015 14:03
First try at Rx+Ribbon2.0
actually look at https://gist.github.com/aspyker/517d4ceaccdeaa6087de
@aspyker
aspyker / gist:517d4ceaccdeaa6087de
Created July 15, 2014 01:04
Try #2 on RxJava + Ribbon 2.0 in Acme Air
package com.acmeair.tests.ribbon;
import java.nio.charset.Charset;
import java.util.Map;
import rx.Observable;
import rx.functions.Func1;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.UnpooledByteBufAllocator;
@aspyker
aspyker / gist:fe51963b2174da88fa94
Last active August 29, 2015 14:04
IPC20 work on Acme Air / NetflixOSS 2012-07-15
Reviewers?
Allen Wang, Thomasz Bak - Ribbon
Nitesh Kant - Eureka, Karyon
Ben Christensen - RxJava
Acme Air NetflixOSS IPC20 Experimental Branch:
https://github.com/aspyker/acmeair-netflix/tree/ipc20
Approach to "porting"
- I know that Acme Air Web App isn't really ready for RX, but I could get it done in waves
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
eb68f5edd484 awscassaa/auth-service:latest /usr/bin/supervisord 24 minutes ago Up 24 minutes 22/tcp, 80/tcp, 8009/tcp authsuro
653dffc9eae2 awscassaa/suro:latest /usr/bin/supervisord About an hour ago Up About an hour 22/tcp, 7101/tcp jolly_newton
2945003618d0 wurstmeister/kafka:0.8.1 /bin/sh -c start-kaf About an hour ago Up About an hour 0.0.0.0:9092->9092/tcp stupefied_carson
ef192338b74d jplock/zookeeper:latest /opt/zookeeper-3.4.5 About an hour ago Up About an hour 2888/tcp, 3888/tcp, 0.0.0.0:49181->2181/tcp stupefied_carson/zk,zookeeper
c388951394c7 acmeair/cassandra:latest /usr/bin/supervisord 21 hou
@aspyker
aspyker / gist:7691d1b66710152575e2
Last active August 29, 2015 14:06
problems with debs and fpm gradle plugin
I used the fpm and gradle plugin to generate both deb files. In one case,
the ROOT.xml is there after install. In the other case not. The only difference
I see is the ordering of the files in the package. I'm not sure if I can control
order in fpm to see if that is the issue. I also can't see an obvious reason why
one would choose one order and the other a different order given the same build
process is used.
Failing server:
root@i-df1d:/var/lib/dpkg/info# dpkg -L acmeair-webapp
root@1dd458f7c8ee:/# exitroot@ubuntu:~# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
netflixoss/java 7 ce2a9415419d 14 hours ago 507.2 MB
netflixoss/java latest 1350ee0eb34d 14 hours ago 507.2 MB
node 0.10.32 780cac993ca9 2 weeks ago 732.6 MB
ubuntu 14.04 5506de2b643b 2 weeks ago 199.3 MB
ubuntu latest 5506de2b643b 2 weeks ago 199.3 MB
ubuntu trusty eca7633ed783 3 weeks ago 192.7 MB
root@ubuntu:~# docker history ce2a9415419df7c0a778125687c9d252764d30567627c1f9b856d16c53843111
IMAGE CREATED CREATED BY SIZE
@aspyker
aspyker / gist:a940c9ec0948cbf20a20
Created December 16, 2014 00:26
Kafka Snappy Javacore Threaddumps
"kafka-request-handler-7" daemon prio=10 tid=0x00007faeaa591000 nid=0x32a0 runnable [0x00007fad90356000]
java.lang.Thread.State: RUNNABLE
at org.xerial.snappy.SnappyOutputStream.<init>(SnappyOutputStream.java:78)
at org.xerial.snappy.SnappyOutputStream.<init>(SnappyOutputStream.java:66)
at kafka.message.CompressionFactory$.apply(CompressionFactory.scala:33)
at kafka.message.ByteBufferMessageSet$.kafka$message$ByteBufferMessageSet$$create(ByteBufferMessageSet.scala:41)
at kafka.message.ByteBufferMessageSet.<init>(ByteBufferMessageSet.scala:106)
at kafka.message.ByteBufferMessageSet.assignOffsets(ByteBufferMessageSet.scala:219)
at kafka.log.Log.liftedTree1$1(Log.scala:252)
at kafka.log.Log.append(Log.scala:251)