Created
June 15, 2016 15:39
-
-
Save aclements/0dd11e9998f01bda0ad38e432e66af09 to your computer and use it in GitHub Desktop.
Diff to https://github.com/raintank/raintank-docker to get it working for me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/benchmark/Dockerfile b/benchmark/Dockerfile | |
index f1c7bc4..d05de8d 100644 | |
--- a/benchmark/Dockerfile | |
+++ b/benchmark/Dockerfile | |
@@ -8,9 +8,13 @@ RUN mkdir -p /go/src/github.com/grafana | |
RUN cd /go/src/github.com/grafana && \ | |
git clone https://github.com/raintank/grafana-api-golang-client.git && \ | |
cd grafana-api-golang-client && \ | |
- git checkout raintank #&& \ | |
+ git checkout raintank #&& | |
#go get github.com/raintank/env-load | |
+# grafana log API changed. Check out a commit where it works. | |
+RUN go get github.com/grafana/grafana/pkg/log | |
+RUN cd /go/src/github.com/grafana/grafana/pkg/log && git checkout 22cda19 | |
+ | |
RUN go get github.com/tsenart/vegeta | |
RUN go get github.com/raintank/raintank-metric/inspect-es | |
RUN go get github.com/raintank/raintank-metric/fake_metrics | |
diff --git a/collector/Dockerfile b/collector/Dockerfile | |
index 8910354..2fb9e8a 100644 | |
--- a/collector/Dockerfile | |
+++ b/collector/Dockerfile | |
@@ -1,7 +1,7 @@ | |
FROM raintank/nodejsgo | |
-RUN apt-get update && apt-get -y install supervisor | |
+RUN apt-get update && apt-get -y install supervisor netcat | |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
RUN mkdir -p /opt/raintank | |
diff --git a/grafana/Dockerfile b/grafana/Dockerfile | |
index 3f40520..7a3751b 100644 | |
--- a/grafana/Dockerfile | |
+++ b/grafana/Dockerfile | |
@@ -1,9 +1,10 @@ | |
FROM ubuntu | |
+RUN apt-get update | |
RUN apt-get -y install curl apt-transport-https | |
RUN echo "deb https://packagecloud.io/grafana/testing/debian/ jessie main" > /etc/apt/sources.list.d/grafana.list | |
RUN curl https://packagecloud.io/gpg.key | apt-key add - | |
RUN apt-get update | |
-RUN apt-get -y install libfontconfig1 libfreetype6 wget grafana | |
+RUN apt-get -y install libfontconfig1 libfreetype6 wget grafana net-tools | |
COPY grafana.ini /etc/grafana/grafana.ini | |
diff --git a/graphite-api/Dockerfile b/graphite-api/Dockerfile | |
index fe5acd7..79bfb2f 100644 | |
--- a/graphite-api/Dockerfile | |
+++ b/graphite-api/Dockerfile | |
@@ -2,6 +2,9 @@ FROM library/ubuntu | |
RUN apt-get update && apt-get upgrade -y && apt-get install -y supervisor build-essential python-dev libffi-dev libcairo2-dev python-pip git | |
+# pip 8.1.1 is broken. Upgrade to 8.1.2. | |
+RUN pip install --upgrade pip | |
+ | |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
RUN pip install gunicorn Flask-Cache elasticsearch statsd | |
diff --git a/graphite-watcher/Dockerfile b/graphite-watcher/Dockerfile | |
index 9c18479..26d7eb1 100644 | |
--- a/graphite-watcher/Dockerfile | |
+++ b/graphite-watcher/Dockerfile | |
@@ -1,6 +1,6 @@ | |
FROM raintank/nodejsgo | |
-RUN apt-get update && apt-get -y install supervisor | |
+RUN apt-get update && apt-get -y install supervisor netcat | |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ENV GOPATH /go | |
diff --git a/measure.sh b/measure.sh | |
index 341115e..87a7549 100755 | |
--- a/measure.sh | |
+++ b/measure.sh | |
@@ -37,4 +37,5 @@ COLUMNS=512 top -b -c | grep -v sed | sed -u -n \ | |
echo "measure.${process}.cpu $cpu $ts" | |
echo "measure.${process}.rss $mem $ts" | |
fi | |
-done | nc -c localhost 2003 | |
+done | openssl s_client -connect localhost:2003 #nc -c localhost 2003 | |
+# There are many netcats in Ubuntu. None of them know -c. | |
diff --git a/metric_tank/Dockerfile b/metric_tank/Dockerfile | |
index 82b6c78..896ce6d 100644 | |
--- a/metric_tank/Dockerfile | |
+++ b/metric_tank/Dockerfile | |
@@ -1,10 +1,16 @@ | |
FROM raintank/nodejsgo | |
-RUN apt-get update && apt-get -y install supervisor | |
+RUN apt-get update && apt-get -y install supervisor netcat | |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ENV GOPATH /go | |
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | |
+ | |
+# grafana log API changed. Check out a branch where it works (needs to | |
+# be a branch with an upstream because of the go get -u) | |
+RUN go get github.com/grafana/grafana/pkg/log | |
+RUN cd /go/src/github.com/grafana/grafana/pkg/log && git checkout metrics_reporting | |
+ | |
RUN mkdir /etc/raintank | |
COPY config.ini /etc/raintank/ | |
RUN go get -u github.com/raintank/raintank-metric/metric_tank | |
diff --git a/nsq_metrics_to_stdout/Dockerfile b/nsq_metrics_to_stdout/Dockerfile | |
index 47d0b26..56b2c87 100644 | |
--- a/nsq_metrics_to_stdout/Dockerfile | |
+++ b/nsq_metrics_to_stdout/Dockerfile | |
@@ -5,6 +5,12 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ENV GOPATH /go | |
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | |
+ | |
+# grafana log API changed. Check out a branch where it works (needs to | |
+# be a branch with an upstream because of the go get -u) | |
+RUN go get github.com/grafana/grafana/pkg/log | |
+RUN cd /go/src/github.com/grafana/grafana/pkg/log && git checkout metrics_reporting | |
+ | |
RUN go get -u github.com/Dieterbe/linecounter | |
RUN go get -u github.com/raintank/raintank-metric/nsq_metrics_to_stdout | |
diff --git a/nsq_probe_events_to_elasticsearch/Dockerfile b/nsq_probe_events_to_elasticsearch/Dockerfile | |
index b564df1..9f7e475 100644 | |
--- a/nsq_probe_events_to_elasticsearch/Dockerfile | |
+++ b/nsq_probe_events_to_elasticsearch/Dockerfile | |
@@ -1,10 +1,16 @@ | |
FROM raintank/nodejsgo | |
-RUN apt-get update && apt-get -y install supervisor | |
+RUN apt-get update && apt-get -y install supervisor netcat | |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ENV GOPATH /go | |
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | |
+ | |
+# grafana log API changed. Check out a branch where it works (needs to | |
+# be a branch with an upstream because of the go get -u) | |
+RUN go get github.com/grafana/grafana/pkg/log | |
+RUN cd /go/src/github.com/grafana/grafana/pkg/log && git checkout metrics_reporting | |
+ | |
RUN go get -u github.com/raintank/raintank-metric/nsq_probe_events_to_elasticsearch | |
CMD ["/usr/bin/supervisord"] | |
diff --git a/screens/benchmark b/screens/benchmark | |
index e69de29..a572155 100644 | |
--- a/screens/benchmark | |
+++ b/screens/benchmark | |
@@ -0,0 +1,6 @@ | |
+#backfill an hour at 100k, wait for it, and then do realtime at 10k in background, and start http load. | |
+fake_metrics -nsqd-tcp-address nsqd:4150 -statsd-addr statsdaemon:8125 -orgs 100 -keys-per-org 100 -offset 1h -speedup 10 -stop-at-now | |
+fake_metrics -nsqd-tcp-address nsqd:4150 -statsd-addr statsdaemon:8125 -orgs 100 -keys-per-org 100 & | |
+go get github.com/raintank/raintank-metric/inspect-es | |
+go get github.com/tsenart/vegeta | |
+inspect-es --es-addr elasticsearch:9200 -format vegeta-mt | sed 's#localhost:6063#metricTank:6063#' | vegeta attack -rate 500 -duration=120m > attack.out | |
diff --git a/screens/metricTank b/screens/metricTank | |
index fc296a7..c3b91d3 100644 | |
--- a/screens/metricTank | |
+++ b/screens/metricTank | |
@@ -12,7 +12,7 @@ | |
cd /go/src/github.com/raintank/raintank-metric/metric_tank | |
go build | |
wait.sh cassandra:9042 elasticsearch:9200 | |
-./metric_tank \ | |
+GODEBUG=gctrace=1,gcpacertrace=1 ./metric_tank \ | |
--chunkspan 10m \ | |
--numchunks 3 \ | |
--agg-settings 10m:6h:2:9d,2h:6h:2:74d,6h:6h:2:4y \ | |
@@ -25,4 +25,5 @@ wait.sh cassandra:9042 elasticsearch:9200 | |
--accounting-period 1min \ | |
--proftrigger-freq 1s \ | |
&>> /var/log/raintank/nsq_metrics_tank.log & | |
+sleep 1 # Wait for log to be created. | |
tail -f /var/log/raintank/nsq_metrics_tank.log | |
diff --git a/screens/worldpingApi b/screens/worldpingApi | |
index 9ef6858..6216edc 100644 | |
--- a/screens/worldpingApi | |
+++ b/screens/worldpingApi | |
@@ -1,5 +1,7 @@ | |
cd /go/src/github.com/raintank/worldping-api | |
-godep go build | |
+# Doesn't use godep any more. | |
+#godep go build | |
+go build | |
wait.sh nsqd:4150 | |
/tmp/prepare-nsqd.sh 2>&1 | tee -a /var/log/raintank/prepare-nsqd.log | |
wait.sh mysql:3306 nsqd:4150 | |
diff --git a/worldping_api/Dockerfile b/worldping_api/Dockerfile | |
index f424316..7b1cb62 100644 | |
--- a/worldping_api/Dockerfile | |
+++ b/worldping_api/Dockerfile | |
@@ -1,16 +1,18 @@ | |
FROM raintank/nodejsgo | |
-RUN apt-get update && apt-get -y install supervisor libfontconfig1 libfreetype6 libjpeg8 libstdc++6 | |
+RUN apt-get update && apt-get -y install supervisor libfontconfig1 libfreetype6 libjpeg8 libstdc++6 netcat | |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
ENV GOPATH /go | |
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | |
+# Doesn't use godep any more | |
# insecure due to bosun.org issue with cloudflare | |
-RUN go get github.com/tools/godep | |
-RUN mkdir -p /go/src/github.com/raintank/ | |
-RUN cd /go/src/github.com/raintank/ && git clone https://github.com/raintank/worldping-api.git | |
-RUN cd /go/src/github.com/raintank/worldping-api && godep go build -o /go/bin/worldping-api | |
+#RUN go get github.com/tools/godep | |
+#RUN mkdir -p /go/src/github.com/raintank/ | |
+#RUN cd /go/src/github.com/raintank/ && git clone https://github.com/raintank/worldping-api.git | |
+#RUN cd /go/src/github.com/raintank/worldping-api && go build -o /go/bin/worldping-api | |
+RUN go get github.com/raintank/worldping-api | |
EXPOSE 80 | |
EXPOSE 443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment