summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rwxr-xr-xgo/t/docker/docker_deploy.sh2
-rw-r--r--retiolum/hosts/paste (renamed from retiolum/hosts/note)2
-rw-r--r--retiolum/scripts/adv_graphgen/USAGE.md27
-rwxr-xr-xretiolum/scripts/adv_graphgen/all_the_graphs.sh4
-rwxr-xr-xretiolum/scripts/adv_graphgen/anonytize.sh1
-rwxr-xr-xretiolum/scripts/adv_graphgen/sanitize.sh1
-rwxr-xr-xretiolum/scripts/adv_graphgen/tinc_stats/Availability.py2
-rwxr-xr-x[-rw-r--r--]retiolum/scripts/adv_graphgen/tinc_stats/Graph.py48
-rw-r--r--retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py24
-rwxr-xr-xretiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py59
-rwxr-xr-x[-rw-r--r--]retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py2
-rw-r--r--retiolum/scripts/adv_graphgen/tinc_stats/__init__.py1
-rw-r--r--ship/lib/network8
-rw-r--r--sites/buildbot.krebsco.de/INSTALLATION.md17
-rw-r--r--sites/buildbot.krebsco.de/README.md29
-rw-r--r--sites/gold.krebsco.de/README.md18
-rw-r--r--sites/gold.krebsco.de/etc/nginx/sites-available/gold.krebsco.de12
-rw-r--r--sites/graph.krebsco.de/README.md98
-rw-r--r--sites/graph.krebsco.de/etc/nginx/sites-available/graph.conf11
-rw-r--r--sites/graph.krebsco.de/etc/nginx/sites-available/graph.krebsco.de.conf10
-rw-r--r--sites/paste.retiolum/README.md31
m---------sites/paste.retiolum/bump0
-rw-r--r--sites/paste.retiolum/etc/nginx/sites-available/paste.conf14
-rw-r--r--sites/paste.retiolum/etc/supervisor.d/bump.supervisor.conf5
-rw-r--r--sites/tahoe.retiolum/README.md16
-rw-r--r--sites/tahoe.retiolum/conf/tahoe.cfg4
-rw-r--r--sites/tinc.krebsco.de/README.md11
-rw-r--r--sites/tinc.krebsco.de/etc/nginx/sites-available/tinc.krebsco.de.conf10
-rwxr-xr-xutil/bin/pigbin2
30 files changed, 352 insertions, 120 deletions
diff --git a/.gitmodules b/.gitmodules
index 3b316b96..b59b012a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -31,3 +31,6 @@
[submodule "web"]
path = web
url = https://github.com/krebscode/krebscode.github.com
+[submodule "sites/paste.retiolum/bump"]
+ path = sites/paste.retiolum/bump
+ url = git@github.com:makefu/bump.git
diff --git a/go/t/docker/docker_deploy.sh b/go/t/docker/docker_deploy.sh
index 1b4a433c..3e64426d 100755
--- a/go/t/docker/docker_deploy.sh
+++ b/go/t/docker/docker_deploy.sh
@@ -7,7 +7,7 @@ docker_id=$(docker run -p $rnd_port:80 -d -v /krebs/go/t/docker/../../../:/kreb
echo $docker_id on $rnd_port
trap "docker stop $docker_id;docker rm $docker_id" INT TERM EXIT QUIT
i=0
-max_wait=30
+max_wait=60
echo "waiting for install (takes about 3 minutes)"
sleep 240
while ! curl -s localhost:$rnd_port >/dev/null ;do
diff --git a/retiolum/hosts/note b/retiolum/hosts/paste
index b1c08801..99ee7d15 100644
--- a/retiolum/hosts/note
+++ b/retiolum/hosts/paste
@@ -1,5 +1,3 @@
-Address = 192.40.56.122
-#Address = pigstarter.de
Subnet = 10.243.0.153
Subnet = 42:9143:b4c0:f981:6030:7aa2:8bc5:4110/128
-----BEGIN RSA PUBLIC KEY-----
diff --git a/retiolum/scripts/adv_graphgen/USAGE.md b/retiolum/scripts/adv_graphgen/USAGE.md
new file mode 100644
index 00000000..9fa541ed
--- /dev/null
+++ b/retiolum/scripts/adv_graphgen/USAGE.md
@@ -0,0 +1,27 @@
+# Example usage
+make sure you have the correct permissions!
+
+# High Level
+
+ # creates all graphs with predefined paths (see source code of this script)
+ ./all_the_graphs.sh
+
+ # create anonymized graphs to /tmp
+ ./anonytize.sh /tmp
+
+ # create full detail graphs to /var/www/graph.retiolum
+ ./sanitize.sh /var/ww/graph.retiolum
+
+ # return currently availabe supernodes
+ tinc_stats/Supernodes.py
+
+# Low Level
+
+ # returns the current tinc graph as json
+ tinc_stats/Log2JSON.py
+
+ # adds GEOIP information to the json file
+ tinc_stats/Log2JSON.py | tinc_stats/Geo.py
+
+ # creates a grapviz file from current graph, pipes into a timpfile
+ tinc_stats/Log2JSON.py | tinc_stats/Graph.py complete > /tmp/out.graphviz
diff --git a/retiolum/scripts/adv_graphgen/all_the_graphs.sh b/retiolum/scripts/adv_graphgen/all_the_graphs.sh
index 381c7aeb..9f3bf82b 100755
--- a/retiolum/scripts/adv_graphgen/all_the_graphs.sh
+++ b/retiolum/scripts/adv_graphgen/all_the_graphs.sh
@@ -4,17 +4,13 @@
echo "`date` begin all graphs" >> /tmp/build_graph
cd $(dirname $(readlink -f $0))
PATH=$PATH:../../../util/bin/
- export LOG_FILE=/var/log/tinc-retiolum.log
- export TINC_LEGACY=true
EXTERNAL_FOLDER=/var/www/euer.krebsco.de/graphs/retiolum
INTERNAL_FOLDER=/var/www/euer/graphs/retiolum
begin=`timer`
- export GRAPHITE_HOST="no-omo"
export GEOCTIYDB="$PWD/GeoLiteCity.dat"
(python tinc_stats/Log2JSON.py | python tinc_stats/Geo.py > $INTERNAL_FOLDER/marker.json)&
(./anonytize.sh $EXTERNAL_FOLDER && echo "`date` anonytize done" >> /tmp/build_graph)&
(./sanitize.sh $INTERNAL_FOLDER && echo "`date` sanitize done" >> /tmp/build_graph)&
# wait
- graphitec "retiolum.graph.buildtime" "$(timer $begin)" >> /tmp/build_graph
echo "`date` end all graphs" >> /tmp/build_graph
)&
diff --git a/retiolum/scripts/adv_graphgen/anonytize.sh b/retiolum/scripts/adv_graphgen/anonytize.sh
index 4c16daf9..04a68869 100755
--- a/retiolum/scripts/adv_graphgen/anonytize.sh
+++ b/retiolum/scripts/adv_graphgen/anonytize.sh
@@ -5,7 +5,6 @@ GRAPH_SETTER1=dot
GRAPH_SETTER2=circo
GRAPH_SETTER3='neato -Goverlap=prism '
GRAPH_SETTER4=sfdp
-LOG_FILE=${LOG_FILE:-/var/log/syslog}
TYPE=svg
TYPE2=png
OPENER=/bin/true
diff --git a/retiolum/scripts/adv_graphgen/sanitize.sh b/retiolum/scripts/adv_graphgen/sanitize.sh
index 8da6ec70..f7d0e7e7 100755
--- a/retiolum/scripts/adv_graphgen/sanitize.sh
+++ b/retiolum/scripts/adv_graphgen/sanitize.sh
@@ -5,7 +5,6 @@ GRAPH_SETTER1=dot
GRAPH_SETTER2=circo
GRAPH_SETTER3='neato -Goverlap=prism '
GRAPH_SETTER4=sfdp
-LOG_FILE=${LOG_FILE:-/var/log/syslog}
TYPE=svg
TYPE2=png
OPENER=/bin/true
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Availability.py b/retiolum/scripts/adv_graphgen/tinc_stats/Availability.py
index a1ef13f1..66defa44 100755
--- a/retiolum/scripts/adv_graphgen/tinc_stats/Availability.py
+++ b/retiolum/scripts/adv_graphgen/tinc_stats/Availability.py
@@ -20,7 +20,7 @@ def generate_stats():
for line in f:
jlines.append(json.loads(line))
f.close()
- except Exception,e:
+ except Exception as e:
pass
all_nodes = {}
for k in get_all_nodes():
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py
index 18c3d545..9d80e62d 100644..100755
--- a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py
+++ b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py
@@ -1,6 +1,5 @@
#!/usr/bin/python
from BackwardsReader import BackwardsReader
-from Graphite import GraphiteSender
import sys,json,os
from Supernodes import check_all_the_super
from Availability import get_node_availability
@@ -11,9 +10,9 @@ DUMP_FILE = "/krebs/db/availability"
def resolve_myself(nodes):
#resolve MYSELF to the real ip
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
if v["external-ip"] == "MYSELF":
- for nodek,node in nodes.iteritems():
+ for nodek,node in nodes.items():
for to in node['to']:
if to['name'] == k:
v["external-ip"] = to["addr"]
@@ -45,16 +44,16 @@ def generate_availability_stats(nodes):
jlines.append(jline)
lines_to_use -=1
- except Exception,e: sys.stderr.write(str(e))
+ except Exception as e: sys.stderr.write(str(e))
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
v['availability'] = get_node_availability(k,jlines)
sys.stderr.write( "%s -> %f\n" %(k ,v['availability']))
def generate_stats(nodes):
""" Generates some statistics of the network and nodes
"""
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
conns = v.get('to',[])
for c in conns: #sanitize weights
if float(c['weight']) > 9000: c['weight'] = str(9001)
@@ -73,12 +72,12 @@ def get_node_avg_weight(conns):
def delete_unused_nodes(nodes):
""" Deletes all the nodes which are currently not connected to the network"""
new_nodes = {}
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
if v['external-ip'] == "(null)":
continue
if v.get('to',[]):
new_nodes[k] = v
- for k,v in new_nodes.iteritems():
+ for k,v in new_nodes.items():
if not [ i for i in v['to'] if i['name'] in new_nodes]:
del(k)
return new_nodes
@@ -87,7 +86,7 @@ def merge_edges(nodes):
""" merge back and forth edges into one
DESTRUCTS the current structure by deleting "connections" in the nodes
"""
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
for con in v.get('to',[]):
for i,secon in enumerate(nodes.get(con['name'],{}).get('to',[])):
if k == secon['name']:
@@ -97,7 +96,7 @@ def merge_edges(nodes):
def print_head():
print ('digraph retiolum {')
- print (' graph [center packMode="clust"]')
+ print (' graph [center=true packMode="clust"]')
print (' node[shape=box,style=filled,fillcolor=grey]')
print (' overlap=false')
@@ -112,8 +111,7 @@ def print_stat_node(nodes):
msg = '%s.num_nodes %d %d\r\n' %(g_path,num_nodes,begin)
s.send(msg)
except Exception as e: pass
- #except: pass
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
num_conns+= len(v['to'])
node_text = " stats_node [label=\"Statistics\\l"
node_text += "Build Date : %s\\l" % strftime("%Y-%m-%d %H:%M:%S",localtime())
@@ -133,7 +131,7 @@ def print_node(k,v):
node = " "+k+"[label=\""
node += k+"\\l"
node += "availability: %f\\l" % v['availability']
- if v.has_key('num_conns'):
+ if 'num_conns' in v:
node += "Num Connects:"+str(v['num_conns'])+"\\l"
node += "external:"+v['external-ip']+":"+v['external-port']+"\\l"
for addr in v.get('internal-ip',['dunno lol']):
@@ -145,7 +143,7 @@ def print_node(k,v):
elif k in supernodes:
node += ",fillcolor=steelblue1"
node += "]"
- print node
+ print(node)
def print_anonymous_node(k,v):
""" writes a single node and its edges
@@ -154,7 +152,7 @@ def print_anonymous_node(k,v):
"""
node = " "+k #+"[label=\""
- print node
+ print(node)
def print_edge(k,v):
for con in v.get('to',[]):
@@ -170,14 +168,14 @@ def print_edge(k,v):
if con.get('bidirectional',False):
edge += ",dir=both"
edge += "]"
- print edge
+ print(edge)
def anonymize_nodes(nodes):
#anonymizes all nodes
i = "0"
newnodes = {}
- for k,v in nodes.iteritems():
- for nodek,node in nodes.iteritems():
+ for k,v in nodes.items():
+ for nodek,node in nodes.items():
for to in node['to']:
if to['name'] == k:
to['name'] = i
@@ -187,11 +185,6 @@ def anonymize_nodes(nodes):
if __name__ == "__main__":
supernodes= []
- try:
- gr = GraphiteSender(os.environ.get("GRAPHITE_HOST","localhost"))
- begin = time()
- except Exception as e:
- sys.stderr.write( "Cannot connect to graphite: " + str(e))
if len(sys.argv) != 2 or sys.argv[1] not in ["anonymous","complete"]:
print("usage: %s (anonymous|complete)")
sys.exit(1)
@@ -206,7 +199,7 @@ if __name__ == "__main__":
if sys.argv[1] == "anonymous":
nodes = anonymize_nodes(nodes)
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
print_anonymous_node(k,v)
print_edge(k,v)
@@ -214,18 +207,15 @@ if __name__ == "__main__":
for supernode,addr in check_all_the_super():
supernodes.append(supernode)
generate_availability_stats(nodes)
- for k,v in nodes.iteritems():
+ for k,v in nodes.items():
print_node(k,v)
print_edge(k,v)
try:
dump_graph(nodes)
- except Exception,e:
+ except Exception as e:
sys.stderr.write("Cannot dump graph: %s" % str(e))
else:
pass
print_stat_node(nodes)
print ('}')
- try:
- gr.send("graph.anon_build_time",(time()-begin)*1000)
- except Exception as e: pass
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py
deleted file mode 100644
index 5002d8e5..00000000
--- a/retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/python
-
-import socket
-from time import time
-
-class GraphiteSender:
- def __init__(self,host,port=2003,prefix="retiolum"):
- self.host = host
- self.port = port
- self.prefix = prefix
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.sock.connect((host,port))
-
- def send(name,data):
- # construct a message for graphite, honor the configured prefix
- self.sock.send("%s.%s %d %d\r\n"%(self.prefix,name,data,time()))
-
- def send_raw(path,data):
- #ignore the configured prefix, just it to the path given
- self.sock.send("%s %d %d\r\n"%(path,data,time()))
-
-if __name__ == "__main__":
- import sys
- GraphiteSender(sys.argv[1]).send_raw(sys.argv[2],sys.argv[3])
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py b/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py
index 644cbc63..a81e2bef 100755
--- a/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py
+++ b/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py
@@ -41,11 +41,6 @@ def debug(func):
return with_debug
-def get_tinc_log_file():
- # TODO parse logfile from somewhere
- return os.environ.get("LOG_FILE","/var/log/everything.log")
-
-
def parse_tinc_stats():
import subprocess
from time import sleep
@@ -57,12 +52,6 @@ def parse_tinc_stats():
elif which("tincctl"):
return parse_new_input("tincctl")
#old tinc
- elif which("tincd"):
- # TODO refactor me
- subprocess.call(["pkill","-SIGUSR2", "tincd"])
- sleep(1)
- return parse_input(get_tinc_block(get_tinc_log_file()))
- #no tinc
else:
raise Exception("no tinc executable found!")
@@ -95,13 +84,16 @@ def get_tinc_block(log_file):
def parse_new_input(tinc_bin):
nodes = {}
- pnodes = subprocess.Popen([tinc_bin,"-n",TINC_NETWORK,"dump","reachable","nodes"], stdout=subprocess.PIPE).communicate()[0]
+ pnodes = subprocess.Popen(
+ [tinc_bin,"-n",TINC_NETWORK,"dump","reachable","nodes"],
+ stdout=subprocess.PIPE).communicate()[0].decode()
#pnodes = subprocess.check_output(["tincctl","-n",TINC_NETWORK,"dump","reachable","nodes"])
for line in pnodes.split('\n'):
if not line: continue
l = line.split()
nodes[l[0]]= { 'external-ip': l[2], 'external-port' : l[4] }
- psubnets = subprocess.check_output([tinc_bin,"-n",TINC_NETWORK,"dump","subnets"])
+ psubnets = subprocess.check_output(
+ [tinc_bin,"-n",TINC_NETWORK,"dump","subnets"]).decode()
for line in psubnets.split('\n'):
if not line: continue
l = line.split()
@@ -111,12 +103,13 @@ def parse_new_input(tinc_bin):
nodes[l[2]]['internal-ip'].append(l[0].split('#')[0])
except KeyError:
pass # node does not exist (presumably)
- pedges = subprocess.check_output([tinc_bin,"-n",TINC_NETWORK,"dump","edges"])
+ pedges = subprocess.check_output(
+ [tinc_bin,"-n",TINC_NETWORK,"dump","edges"]).decode()
for line in pedges.split('\n'):
if not line: continue
l = line.split()
try:
- if not nodes[l[0]].has_key('to') :
+ if not 'to' in nodes[l[0]] :
nodes[l[0]]['to'] = []
nodes[l[0]]['to'].append(
{'name':l[2],'addr':l[4],'port':l[6],'weight' : l[10] })
@@ -124,43 +117,9 @@ def parse_new_input(tinc_bin):
pass #node does not exist
return nodes
-#@debug
-def parse_input(log_data):
- nodes={}
- for line in log_data:
- if BEGIN_NODES in line :
- nodes={}
- for line in log_data:
- if END_NODES in line :
- break
- l = line.replace('\n','').split() #TODO unhack me
- nodes[l[0]]= { 'external-ip': l[2], 'external-port' : l[4] }
- if BEGIN_SUBNET in line :
- for line in log_data:
- if END_SUBNET in line :
- break
- l = line.replace('\n','').split()
- if not nodes[l[2]].get('internal-ip',False):
- nodes[l[2]]['internal-ip'] = []
- nodes[l[2]]['internal-ip'].append(l[0].split('#')[0])
- if BEGIN_EDGES in line :
- edges = {}
- for line in log_data:
- if END_EDGES in line :
- break
- l = line.replace('\n','').split()
- if not nodes[l[0]].has_key('to') :
- nodes[l[0]]['to'] = []
- nodes[l[0]]['to'].append(
- {'name':l[2],'addr':l[4],'port':l[6],'weight' : l[10] })
- return nodes
-
-
if __name__ == '__main__':
- # TODO refactor me
from sys import argv
if len(argv) > 1:
usage()
else:
- print json.dumps(parse_tinc_stats())
-
+ print (json.dumps(parse_tinc_stats()))
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py b/retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py
index ae0fae8f..7bb79708 100644..100755
--- a/retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py
+++ b/retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py
@@ -56,4 +56,4 @@ if __name__ == "__main__":
usage
"""
for host,addrs in check_all_the_super():
- print host,addrs
+ print(host,addrs)
diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py b/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py
index d4a686bf..62f541d1 100644
--- a/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py
+++ b/retiolum/scripts/adv_graphgen/tinc_stats/__init__.py
@@ -4,4 +4,3 @@ import Log2JSON
import Supernodes
import Geo
import Graph
-import Graphite
diff --git a/ship/lib/network b/ship/lib/network
index 68e29301..974fb282 100644
--- a/ship/lib/network
+++ b/ship/lib/network
@@ -7,10 +7,10 @@ which_get_loader(){
warn "Please install curl or wget"
return 1
else
- echo "wget -O-"
+ echo "wget -q -O-"
fi
else
- echo "curl -s"
+ echo "curl -L -s"
fi
return 0
}
@@ -24,13 +24,13 @@ which_head_loader(){
echo "wget -O- --spider -S -q"
fi
else
- echo "curl -I -s"
+ echo "curl -L -I -s"
fi
return 0
}
http_get(){
- eval "$(which_get_loader)" "${1?please provide url}" 2>&1
+ eval "$(which_get_loader)" "${1?please provide url}"
}
http_head(){
eval "$(which_head_loader)" "${1?please provide url}" 2>&1
diff --git a/sites/buildbot.krebsco.de/INSTALLATION.md b/sites/buildbot.krebsco.de/INSTALLATION.md
new file mode 100644
index 00000000..b31a3989
--- /dev/null
+++ b/sites/buildbot.krebsco.de/INSTALLATION.md
@@ -0,0 +1,17 @@
+#?/bin/sh
+# something like this
+
+useradd ci
+punani install python-virtualenv
+su ci
+virtualenv buildbot
+echo ". $HOME/buildbot/bin/activate" >~/.bashrc
+pip install buildbot-slave buildbot
+buildbot create-master master
+# tahoe cp krebs:master.conf master/master.conf
+buildbot reconf master
+# or reconfigure as many slaves as you wish
+buildslave create-slave slave localhost "ubuntu1204-local-slave" <PWD>
+buildbot start master
+buildslave start slave
+# now make sure that docker is up and working
diff --git a/sites/buildbot.krebsco.de/README.md b/sites/buildbot.krebsco.de/README.md
new file mode 100644
index 00000000..187c54f8
--- /dev/null
+++ b/sites/buildbot.krebsco.de/README.md
@@ -0,0 +1,29 @@
+# buildbot.krebsco.de
+The buildbot is configured to run all of the fancy test cases in painload (and
+possibly more project).
+
+# Testing the Painload
+Subprojects may contain folders called t/ which may contain executables which
+will be called by running `make test` in the respective folder.
+A sample `make test` may look like `//krebs/ship/Makefile`.
+The buildbot master may include these paths into the test chain.
+
+# Master & Slave
+Buildbot contains of a master with all the configuration magic and n slaves
+which will be building. Both the master and the slave are started at system
+startup as the user ci (see INSTALLATION.md).
+The configuration file is currently stored at tahoe:
+
+ krebs:ci/buildbot/master/master.cfg
+ # and
+ krebs:ci/buildbot/slave/buildbot.tac
+
+# Docker
+For more flexibility in testing the painload contains test which are using
+docker virtual environments. These have the advantage of providing a new
+environment at every run.
+
+Docker access must be made available to the CI user.
+
+For a Sample Docker Test, see /krebs/ship/t/docker/docker_remote_punani.sh
+
diff --git a/sites/gold.krebsco.de/README.md b/sites/gold.krebsco.de/README.md
new file mode 100644
index 00000000..6839631a
--- /dev/null
+++ b/sites/gold.krebsco.de/README.md
@@ -0,0 +1,18 @@
+# gold
+gold.krebsco.de is a simple file share which provides plugins for
+firefox/chromium to rewrite referers.
+
+# Installation:
+copy the nginx config at etc/nginx/sites-available, edit before use
+
+# Plugins
+All krebsgold plugins are stored in /krebs/gold/affiliate/
+For installation follow the instruction at /krebs/gold/affiliate/README.md
+
+## Chromium
+uses userscripts, a modified version of the fsf amazon userscript
+
+## Affiliatefox
+Affiliatefox is a dodgy plugin by some weird german dudes at
+http://www.the-angelz.net . it may be removed in the future as the chromium
+userscript also works for firefox+greasemonkey
diff --git a/sites/gold.krebsco.de/etc/nginx/sites-available/gold.krebsco.de b/sites/gold.krebsco.de/etc/nginx/sites-available/gold.krebsco.de
new file mode 100644
index 00000000..1c565bbd
--- /dev/null
+++ b/sites/gold.krebsco.de/etc/nginx/sites-available/gold.krebsco.de
@@ -0,0 +1,12 @@
+server {
+ listen <external-ip>:80;
+ server_name gold.krebsco.de;
+ access_log /var/log/nginx/log/gold.krebsco.log main;
+ default_type text/plain;
+ autoindex on;
+ location / {
+ # path to //gold/affiliate/ ,may be a symlink or something
+ root /var/www/gold.krebsco.de;
+ }
+}
+
diff --git a/sites/graph.krebsco.de/README.md b/sites/graph.krebsco.de/README.md
new file mode 100644
index 00000000..2cc43197
--- /dev/null
+++ b/sites/graph.krebsco.de/README.md
@@ -0,0 +1,98 @@
+# Retiolum graphs
+Tinc provides detailed informations about hosts in the mesh network. We are
+using this information to build graphs.
+
+## Requirements
+
+- tinc-pre (tinc and tincd binaries)
+- python2 or python3
+- all the python dependencies in /krebs/retiolum/scripts/adv_graphgen/DEPS
+ via `pip install -r DEPS`
+
+
+## Types of Graphs
+Currently two types of graphs are generated:
+
+ 1. Anonymous Graphs
+ - only fancy lines between dots
+ - this should be made available to the world via graph.krebsco.de
+ 2. Detailed Graphs
+ - with all the stuff we know
+ - contain name, ip address, uptime, different coloring for supernodes and
+ hosts which die when supernodes die.
+ - these graphs should only be availabe by hosts in the retiolum darknet
+ - currently these are published by pigststarter/ but the hostname graph/
+ shall be used for this in the future
+
+In addition a Graph DB will be created which contains all the cool infos from
+the detailed graph plus the geolocation.
+This database is used by map.html which positions all the hosts on a world map.
+
+The graph generation host should be a super node with tinc-pre as tinc seems to
+be blocking when building graphs with `GraphDumpFile`.
+
+# Code
+Source Code is in /krebs/retiolum/scripts/adv_graphgen/
+
+## all_the_graphs.sh
+This script is used for booting all the graph generation magic.
+This scripy may be run as a cronjob every 5 to 10 minutes by a user which has
+the right to use the tincctl and can write to the WWW directory.
+
+ 0/5 * * * * /krebs/retiolum/scripts/adv_graphgen/all_the_graphs.sh
+
+The script also writes geo_coordinates for the nodes with the help of
+tinc_stats/Geo.py.
+it contains most of the hardcoded paths which may be changed (like
+INTERNAL_FOLDER and EXTERNAL_FOLDER, see anonytize&sanitize) as well as a path
+to the geolitecity ip database
+
+## tinc_stats/Log2JSON.py
+
+This script creates a giant json file from the current tinc informations and
+writes it to stdout. It only contains the information retrieved by the tinc
+daemon.
+
+## tinc_stats/Graph.py
+
+This script takes the json file created by Log2JSON as input. It can be either
+run as `$0 complete` to create a detailed graph or `$0 anonymous` to create
+minimal graphs.
+
+When run as anonymous no additional information will be added to the graph.
+When run in complete mode, the script will determine the availability (see
+tinc_stats/Availability) which nodes are supernodes (tinc_stats/Supernodes).
+
+it writes a graphviz graph to stdout. This can be used to create graphs with
+dot by graphviz.
+
+## tinc_stats/Geo.py
+
+Geo.py takes the json file generated by Log2JSON as input and populates this
+graph with geo-coordinates with the help of GeoIP. This database can be used by
+map.html if put in the same directory.
+
+## tinc_stats/Supernodes
+
+This script provides functionality find out if a node is a supernode or not.
+This will be done by checking if the tinc port of the host in the json file is reachable or not. if called directly it will return the name of the host, a space, and an array of tuples of ip-addresses which were reachable in the run.
+This script is used by Graph.py via import.
+
+## tinc_stats/Availability
+
+This modules provides functionality to generate availability information for
+each node configured in /etc/tinc/retiolum/hosts. This is done by tracking each
+request in a file called /krebs/db/availability (currently hardcoded in
+Graph.py). The Script will not append a new line of hosts by itself, Graph.py
+does this.
+
+## anonytize & sanitize
+These two scripts handle the building of the graphs as well as the conversion
+from graphviz to svg and png. They work pretty much the same in principle, one
+is calling Graph.py complete and the other anonymous.
+
+Both scripts are called with $1 being the path where to write the graphs into.
+e.g.:
+./anonytize.sh /var/www/graph.krebsco.de
+./sanitze.sh /var/www/graph.retiolum
+
diff --git a/sites/graph.krebsco.de/etc/nginx/sites-available/graph.conf b/sites/graph.krebsco.de/etc/nginx/sites-available/graph.conf
new file mode 100644
index 00000000..1b74f53a
--- /dev/null
+++ b/sites/graph.krebsco.de/etc/nginx/sites-available/graph.conf
@@ -0,0 +1,11 @@
+server {
+ # graph hosting internal
+ listen <internal-ip>:80;
+ server_name graph graph.retiolum; # or your hostname
+ access_log /var/log/nginx/log/graph.log main;
+ default_type text/plain;
+ location / {
+ root /var/www/graph.retiolum;
+ }
+}
+
diff --git a/sites/graph.krebsco.de/etc/nginx/sites-available/graph.krebsco.de.conf b/sites/graph.krebsco.de/etc/nginx/sites-available/graph.krebsco.de.conf
new file mode 100644
index 00000000..0619908e
--- /dev/null
+++ b/sites/graph.krebsco.de/etc/nginx/sites-available/graph.krebsco.de.conf
@@ -0,0 +1,10 @@
+server {
+ listen <external-addr>:80;
+ server_name graph.krebsco.de;
+ access_log /var/log/nginx/log/graph.krebsco.de.access.log main;
+ default_type text/plain;
+ location / {
+ root /var/www/graph.krebsco.de;
+ }
+}
+
diff --git a/sites/paste.retiolum/README.md b/sites/paste.retiolum/README.md
new file mode 100644
index 00000000..3c634f95
--- /dev/null
+++ b/sites/paste.retiolum/README.md
@@ -0,0 +1,31 @@
+# paste.retiolum
+
+paste is a minimalistic pastebin with sprunge.us in mind.
+This paste may be a supplement to all the 'open' pastebins as the punching
+lemma applies to this installation.
+The installation always runs on a higher port (4000), to get a really short
+hostname, the host which provides this service should have a short name as wel