From 83f27b39a2df428e5de137a02014858ae44b4f80 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 00:20:11 +0100 Subject: tinc_stats: remove legacy code from Log2JSON --- .../scripts/adv_graphgen/tinc_stats/Log2JSON.py | 42 +--------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py b/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py index 644cbc63..adc869fb 100755 --- a/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py +++ b/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py @@ -57,12 +57,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!") @@ -124,43 +118,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())) -- cgit v1.2.3 From 26308d9fd912648ae4cd08558e49c1ede9e80961 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 00:20:39 +0100 Subject: tinc_stats: remove Graphite code --- retiolum/scripts/adv_graphgen/tinc_stats/Graph.py | 9 -------- .../scripts/adv_graphgen/tinc_stats/Graphite.py | 24 ---------------------- .../scripts/adv_graphgen/tinc_stats/__init__.py | 1 - 3 files changed, 34 deletions(-) delete mode 100644 retiolum/scripts/adv_graphgen/tinc_stats/Graphite.py diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py index 18c3d545..e78b7795 100644 --- 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 @@ -187,11 +186,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) @@ -226,6 +220,3 @@ if __name__ == "__main__": 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/__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 -- cgit v1.2.3 From f0ae61034d5872abd128b5e67c03e523420d42e4 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 00:38:54 +0100 Subject: adv_graphgen: remove legacy variables --- retiolum/scripts/adv_graphgen/all_the_graphs.sh | 4 ---- retiolum/scripts/adv_graphgen/anonytize.sh | 1 - retiolum/scripts/adv_graphgen/sanitize.sh | 1 - 3 files changed, 6 deletions(-) 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 -- cgit v1.2.3 From 38ad7a96c55c15486ec87b51b91315021943f8c8 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 00:39:19 +0100 Subject: tinc_stats: make graph generation future compatible --- retiolum/scripts/adv_graphgen/tinc_stats/Availability.py | 2 +- retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/Supernodes.py b/retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py index ae0fae8f..7bb79708 100644 --- 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) -- cgit v1.2.3 From 751319210259526562bc024d72fb9969b3f61193 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 00:58:11 +0100 Subject: fix docker deploy timeout --- go/t/docker/docker_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3 From ebf0f1c48a4c771cb3caf4126064d89d14272c40 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:00:36 +0100 Subject: add first sites entry for painload --- sites/graph.krebsco.de/README.md | 98 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sites/graph.krebsco.de/README.md 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 + -- cgit v1.2.3 From 849fc0a0542ca985acd3edf1071ff49fe77492b6 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:05:59 +0100 Subject: tinc_stats: Log2JSON is now working under py3k and py2 --- retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py b/retiolum/scripts/adv_graphgen/tinc_stats/Log2JSON.py index adc869fb..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 @@ -89,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() @@ -105,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] }) -- cgit v1.2.3 From f975f5290e9738229cd0d08d56263fb666e800dc Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:11:00 +0100 Subject: adv_graphgen: add usage, this should clear some things up --- retiolum/scripts/adv_graphgen/USAGE.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 retiolum/scripts/adv_graphgen/USAGE.md diff --git a/retiolum/scripts/adv_graphgen/USAGE.md b/retiolum/scripts/adv_graphgen/USAGE.md new file mode 100644 index 00000000..2c2c3833 --- /dev/null +++ b/retiolum/scripts/adv_graphgen/USAGE.md @@ -0,0 +1,27 @@ +# Example usage + +# 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 > /tmp/out.graphviz + -- cgit v1.2.3 From 5359fc14a9d59c255c439f2f55c54f9edfd32880 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:18:53 +0100 Subject: tinc_stats: make Graph.py future compatible --- retiolum/scripts/adv_graphgen/tinc_stats/Graph.py | 35 +++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py index e78b7795..f44b7510 100644 --- a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py +++ b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py @@ -10,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"] @@ -44,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) @@ -72,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 @@ -86,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']: @@ -111,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()) @@ -144,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 @@ -153,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',[]): @@ -169,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 @@ -200,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) @@ -208,12 +207,12 @@ 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 -- cgit v1.2.3 From 18f9b8e6e49aead70e69435324f086f3d640575d Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:19:21 +0100 Subject: adv_graphgen: fix graphviz error with center --- retiolum/scripts/adv_graphgen/tinc_stats/Graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py index f44b7510..37122ee5 100644 --- a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py +++ b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py @@ -96,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') -- cgit v1.2.3 From 12ab89371d1c92bde280a117f0920a8fa0b21d1e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:22:15 +0100 Subject: tinc_stats: fix missing has_key --- retiolum/scripts/adv_graphgen/tinc_stats/Graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py index 37122ee5..9d80e62d 100644 --- a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py +++ b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py @@ -131,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']): -- cgit v1.2.3 From e8a3f79f7db5b8c224368e7b7ab81ae635bf591d Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:22:38 +0100 Subject: tinc_stats: make Supernodes executable --- retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py b/retiolum/scripts/adv_graphgen/tinc_stats/Supernodes.py old mode 100644 new mode 100755 -- cgit v1.2.3 From 7badd3c78790976a2f9784927f67e0809195ee71 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:25:14 +0100 Subject: adv_graphgen: update usage --- retiolum/scripts/adv_graphgen/USAGE.md | 6 +++--- retiolum/scripts/adv_graphgen/tinc_stats/Graph.py | 0 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 retiolum/scripts/adv_graphgen/tinc_stats/Graph.py diff --git a/retiolum/scripts/adv_graphgen/USAGE.md b/retiolum/scripts/adv_graphgen/USAGE.md index 2c2c3833..9fa541ed 100644 --- a/retiolum/scripts/adv_graphgen/USAGE.md +++ b/retiolum/scripts/adv_graphgen/USAGE.md @@ -1,5 +1,6 @@ # Example usage - +make sure you have the correct permissions! + # High Level # creates all graphs with predefined paths (see source code of this script) @@ -23,5 +24,4 @@ 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 > /tmp/out.graphviz - + tinc_stats/Log2JSON.py | tinc_stats/Graph.py complete > /tmp/out.graphviz diff --git a/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py b/retiolum/scripts/adv_graphgen/tinc_stats/Graph.py old mode 100644 new mode 100755 -- cgit v1.2.3 From d0bad095de81409b3b14cc2663d976d87d0d1d6d Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:37:50 +0100 Subject: buildbot.krebsco.de: initial commit --- sites/buildbot.krebsco.de/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sites/buildbot.krebsco.de/README.md 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 + -- cgit v1.2.3 From 3271b31b1db806ec8e802c4f9e368fab0e855722 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 01:50:20 +0100 Subject: ship: make internet function more resilient --- ship/lib/network | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- cgit v1.2.3 From c8d89f5cdd1aae2f5519bd49a9d77dbf280b57f3 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 02:50:04 +0100 Subject: add sample configuration for graph delivery with nginx --- sites/graph.krebsco.de/nginx/sites-available/graph.conf | 11 +++++++++++ .../nginx/sites-available/graph.krebsco.de.conf | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 sites/graph.krebsco.de/nginx/sites-available/graph.conf create mode 100644 sites/graph.krebsco.de/nginx/sites-available/graph.krebsco.de.conf diff --git a/sites/graph.krebsco.de/nginx/sites-available/graph.conf b/sites/graph.krebsco.de/nginx/sites-available/graph.conf new file mode 100644 index 00000000..98651cec --- /dev/null +++ b/sites/graph.krebsco.de/nginx/sites-available/graph.conf @@ -0,0 +1,11 @@ +server { + # graph hosting internal + listen :80; + server_name graph; # or your hostname + access_log /var/log/nginx/log/graph.log main; + default_type text/plain; + location / { + root /var/www/graph; + } +} + diff --git a/sites/graph.krebsco.de/nginx/sites-available/graph.krebsco.de.conf b/sites/graph.krebsco.de/nginx/sites-available/graph.krebsco.de.conf new file mode 100644 index 00000000..0619908e --- /dev/null +++ b/sites/graph.krebsco.de/nginx/sites-available/graph.krebsco.de.conf @@ -0,0 +1,10 @@ +server { + listen :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; + } +} + -- cgit v1.2.3 From ef0ccec590cf06088f180e6592d9f614c9341e93 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 02:51:01 +0100 Subject: sites:graph be more explicable about graph path --- sites/graph.krebsco.de/nginx/sites-available/graph.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/graph.krebsco.de/nginx/sites-available/graph.conf b/sites/graph.krebsco.de/nginx/sites-available/graph.conf index 98651cec..1b74f53a 100644 --- a/sites/graph.krebsco.de/nginx/sites-available/graph.conf +++ b/sites/graph.krebsco.de/nginx/sites-available/graph.conf @@ -1,11 +1,11 @@ server { # graph hosting internal listen :80; - server_name graph; # or your hostname + 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; + root /var/www/graph.retiolum; } } -- cgit v1.2.3 From 829de1f23e54788693933ea61f9214b3af155f1f Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 02:53:22 +0100 Subject: retiolum: note -> paste --- retiolum/hosts/note | 12 ------------ retiolum/hosts/paste | 12 ++++++++++++ util/bin/pigbin | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 retiolum/hosts/note create mode 100644 retiolum/hosts/paste diff --git a/retiolum/hosts/note b/retiolum/hosts/note deleted file mode 100644 index b1c08801..00000000 --- a/retiolum/hosts/note +++ /dev/null @@ -1,12 +0,0 @@ -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----- -MIIBCgKCAQEA/efJuJRLUIZROe3QE8WYTD/zyNGRh9I2/yw+5It9HSNVDMIOV1FZ -9PaspsC+YQSBUQRN8SJ95G4RM6TIn/+ei7LiUYsf1Ik+uEOpP5EPthXqvdJEeswv -3QFwbpBeOMNdvmGvQLeR1uJKVyf39iep1wWGOSO1sLtUA+skUuN38QKc1BPASzFG -4ATM6rd2Tkt8+9hCeoePJdLr3pXat9BBuQIxImgx7m5EP02SH1ndb2wttQeAi9cE -DdJadpzOcEgFatzXP3SoKVV9loRHz5HhV4WtAqBIkDvgjj2j+NnXolAUY25Ix+kv -sfqfIw5aNLoIX4kDhuDEVBIyoc7/ofSbkQIDAQAB ------END RSA PUBLIC KEY----- diff --git a/retiolum/hosts/paste b/retiolum/hosts/paste new file mode 100644 index 00000000..b1c08801 --- /dev/null +++ b/retiolum/hosts/paste @@ -0,0 +1,12 @@ +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----- +MIIBCgKCAQEA/efJuJRLUIZROe3QE8WYTD/zyNGRh9I2/yw+5It9HSNVDMIOV1FZ +9PaspsC+YQSBUQRN8SJ95G4RM6TIn/+ei7LiUYsf1Ik+uEOpP5EPthXqvdJEeswv +3QFwbpBeOMNdvmGvQLeR1uJKVyf39iep1wWGOSO1sLtUA+skUuN38QKc1BPASzFG +4ATM6rd2Tkt8+9hCeoePJdLr3pXat9BBuQIxImgx7m5EP02SH1ndb2wttQeAi9cE +DdJadpzOcEgFatzXP3SoKVV9loRHz5HhV4WtAqBIkDvgjj2j+NnXolAUY25Ix+kv +sfqfIw5aNLoIX4kDhuDEVBIyoc7/ofSbkQIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/util/bin/pigbin b/util/bin/pigbin index 7aad6cfc..ae0b270f 100755 --- a/util/bin/pigbin +++ b/util/bin/pigbin @@ -2,4 +2,4 @@ #usage: #echo aidsballs | pigbin -curl -F 'p=<-' note +curl -F 'p=<-' paste -- cgit v1.2.3 From f2cd78f33d93b1a92dd8a1c41aa0f52d93b29ad2 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:03:44 +0100 Subject: graph.krebsco.de: mv {,etc/}nginx --- .gitmodules | 3 +++ sites/graph.krebsco.de/etc/nginx/sites-available/graph.conf | 11 +++++++++++ .../etc/nginx/sites-available/graph.krebsco.de.conf | 10 ++++++++++ sites/graph.krebsco.de/nginx/sites-available/graph.conf | 11 ----------- .../nginx/sites-available/graph.krebsco.de.conf | 10 ---------- sites/paste/bump | 1 + 6 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 sites/graph.krebsco.de/etc/nginx/sites-available/graph.conf create mode 100644 sites/graph.krebsco.de/etc/nginx/sites-available/graph.krebsco.de.conf delete mode 100644 sites/graph.krebsco.de/nginx/sites-available/graph.conf delete mode 100644 sites/graph.krebsco.de/nginx/sites-available/graph.krebsco.de.conf create mode 160000 sites/paste/bump diff --git a/.gitmodules b/.gitmodules index 3b316b96..a462e958 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,3 +31,6 @@ [submodule "web"] path = web url = https://github.com/krebscode/krebscode.github.com +[submodule "/krebs/sites/paste/bump"] + path = /krebs/sites/paste/bump + url = git@github.com:makefu/bump.git 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 :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 :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/graph.krebsco.de/nginx/sites-available/graph.conf b/sites/graph.krebsco.de/nginx/sites-available/graph.conf deleted file mode 100644 index 1b74f53a..00000000 --- a/sites/graph.krebsco.de/nginx/sites-available/graph.conf +++ /dev/null @@ -1,11 +0,0 @@ -server { - # graph hosting internal - listen :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/nginx/sites-available/graph.krebsco.de.conf b/sites/graph.krebsco.de/nginx/sites-available/graph.krebsco.de.conf deleted file mode 100644 index 0619908e..00000000 --- a/sites/graph.krebsco.de/nginx/sites-available/graph.krebsco.de.conf +++ /dev/null @@ -1,10 +0,0 @@ -server { - listen :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/bump b/sites/paste/bump new file mode 160000 index 00000000..119d2723 --- /dev/null +++ b/sites/paste/bump @@ -0,0 +1 @@ +Subproject commit 119d2723b510be392ca03d5bca7e1573e533f848 -- cgit v1.2.3 From 1e25ca1c79333ca18c04191b2790d20b17c1a2b6 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:09:07 +0100 Subject: add paste.retiolum site --- .gitmodules | 2 +- sites/paste.retiolum/README.md | 31 ++++++++++++++++++++++ sites/paste.retiolum/bump | 1 + .../etc/nginx/sites-available/paste.conf | 14 ++++++++++ .../etc/supervisor.d/bump.supervisor.conf | 5 ++++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 sites/paste.retiolum/README.md create mode 160000 sites/paste.retiolum/bump create mode 100644 sites/paste.retiolum/etc/nginx/sites-available/paste.conf create mode 100644 sites/paste.retiolum/etc/supervisor.d/bump.supervisor.conf diff --git a/.gitmodules b/.gitmodules index a462e958..188a2d52 100644 --- a/.gitmodules +++ b/.gitmodules @@ -32,5 +32,5 @@ path = web url = https://github.com/krebscode/krebscode.github.com [submodule "/krebs/sites/paste/bump"] - path = /krebs/sites/paste/bump + path = /krebs/sites/paste.retiolum/bump url = git@github.com:makefu/bump.git 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 well +and have an nginx or apache which translates all request to hostname:80 to +localhost:4000. see Nginx Configuration. + +# Sources + +- https://github.com/makefu/bump + +# Installation + +## Environment + + git clone https://github.com/makefu/bump + useradd -a bump -m -d /opt/bump + cd /opt/paste + virtualenv . + pip install -r deps.txt + +## Nginx + +see etc/nginx/ + +## Supervisor + +see etc/supervisor.d/ diff --git a/sites/paste.retiolum/bump b/sites/paste.retiolum/bump new file mode 160000 index 00000000..119d2723 --- /dev/null +++ b/sites/paste.retiolum/bump @@ -0,0 +1 @@ +Subproject commit 119d2723b510be392ca03d5bca7e1573e533f848 diff --git a/sites/paste.retiolum/etc/nginx/sites-available/paste.conf b/sites/paste.retiolum/etc/nginx/sites-available/paste.conf new file mode 100644 index 00000000..b83abf95 --- /dev/null +++ b/sites/paste.retiolum/etc/nginx/sites-available/paste.conf @@ -0,0 +1,14 @@ +server { + listen :80; + server_name paste paste.retiolum; + access_log /var/log/nginx/log/paste.log main; + error_log /var/log/nginx/log/paste_error.log; + default_type text/plain; + location / { + proxy_pass http://127.0.0.1:4000/; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } +} diff --git a/sites/paste.retiolum/etc/supervisor.d/bump.supervisor.conf b/sites/paste.retiolum/etc/supervisor.d/bump.supervisor.conf new file mode 100644 index 00000000..6b83d5f2 --- /dev/null +++ b/sites/paste.retiolum/etc/supervisor.d/bump.supervisor.conf @@ -0,0 +1,5 @@ +[program:bump] +command=sh run.sh +user=bump +directory=/opt/bump +autorestart=true -- cgit v1.2.3 From cadbb50417dfbab153f31f0fa52b4d7e015692c9 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:09:24 +0100 Subject: add buildbot.krebsco.de Installation --- sites/buildbot.krebsco.de/INSTALLATION.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sites/buildbot.krebsco.de/INSTALLATION.md 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" +buildbot start master +buildslave start slave +# now make sure that docker is up and working -- cgit v1.2.3 From cdd27881d14f0e615db3eae9dead649b7a377531 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:11:34 +0100 Subject: fix .gitmodules --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 188a2d52..b59b012a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,6 +31,6 @@ [submodule "web"] path = web url = https://github.com/krebscode/krebscode.github.com -[submodule "/krebs/sites/paste/bump"] - path = /krebs/sites/paste.retiolum/bump +[submodule "sites/paste.retiolum/bump"] + path = sites/paste.retiolum/bump url = git@github.com:makefu/bump.git -- cgit v1.2.3 From 057d6c14bf7d5fde80236894af7da66751dd026e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:13:28 +0100 Subject: sites: cleanup --- retiolum/hosts/paste | 2 -- sites/paste/bump | 1 - 2 files changed, 3 deletions(-) delete mode 160000 sites/paste/bump diff --git a/retiolum/hosts/paste b/retiolum/hosts/paste index b1c08801..99ee7d15 100644 --- a/retiolum/hosts/paste +++ 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/sites/paste/bump b/sites/paste/bump deleted file mode 160000 index 119d2723..00000000 --- a/sites/paste/bump +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 119d2723b510be392ca03d5bca7e1573e533f848 -- cgit v1.2.3 From 1b609ba2b84f9b726e9eaf8cf2aae81c8eecfb99 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:26:26 +0100 Subject: sites: add tahoe.retiolum --- sites/tahoe.retiolum/README.md | 16 ++++++++++++++++ sites/tahoe.retiolum/conf/tahoe.cfg | 4 ++++ 2 files changed, 20 insertions(+) create mode 100644 sites/tahoe.retiolum/README.md create mode 100644 sites/tahoe.retiolum/conf/tahoe.cfg diff --git a/sites/tahoe.retiolum/README.md b/sites/tahoe.retiolum/README.md new file mode 100644 index 00000000..01e8ed03 --- /dev/null +++ b/sites/tahoe.retiolum/README.md @@ -0,0 +1,16 @@ +# Tahoe in Retiolum +For all the secret stuff, krebsco is using a tahoe installation with 1 +introducer and a number of tahoe bricks. + +# Adding new bricks & clients +see //cholerab/tahoe/{brick,client}\_installation + +# Replacing the introducer +if the introducer may die off, all crypto material is saved in +krebs:tahoe/introducer. There will be a backup somewhere, but bootstrapping +always sucks. + +Follow the generic brick installation, +use the configuration file at conf/tahoe.cfg and copy the crypto material in +the private folder of the installation. +autostart that shit diff --git a/sites/tahoe.retiolum/conf/tahoe.cfg b/sites/tahoe.retiolum/conf/tahoe.cfg new file mode 100644 index 00000000..f70a94da --- /dev/null +++ b/sites/tahoe.retiolum/conf/tahoe.cfg @@ -0,0 +1,4 @@ +[node] +nickname = intro +web.port = +web.static = public_html -- cgit v1.2.3 From 318840c0460c93242b15f66052ae32739a991ba3 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:33:25 +0100 Subject: sites: add gold.krebsco.de --- sites/gold.krebsco.de/README.md | 18 ++++++++++++++++++ .../etc/nginx/sites-available/gold.krebsco.de | 12 ++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 sites/gold.krebsco.de/README.md create mode 100644 sites/gold.krebsco.de/etc/nginx/sites-available/gold.krebsco.de 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 :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; + } +} + -- cgit v1.2.3 From da8f0952253b7463ec1951dcdee0127fe7782c88 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 Jan 2014 03:43:08 +0100 Subject: add tinc.krebsco.de --- sites/tinc.krebsco.de/README.md | 11 +++++++++++ .../etc/nginx/sites-available/tinc.krebsco.de.conf | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 sites/tinc.krebsco.de/README.md create mode 100644 sites/tinc.krebsco.de/etc/nginx/sites-available/tinc.krebsco.de.conf diff --git a/sites/tinc.krebsco.de/README.md b/sites/tinc.krebsco.de/README.md new file mode 100644 index 00000000..3d3d2faa --- /dev/null +++ b/sites/tinc.krebsco.de/README.md @@ -0,0 +1,11 @@ +# tinc.krebsco.de +tinc.krebsco.de is a curl | sh tinc bootstrapper. For more information see +//retiolum/scripts/tinc_setup/README. + +The nginx is pointed to the folder //boot in painload. + +In order to avoid adding an addition file name a special nginx configuration +based on the try_files directive. + +# Installation +See etc/nginx/sites-available/tinc.krebsco.de.conf diff --git a/sites/tinc.krebsco.de/etc/nginx/sites-available/tinc.krebsco.de.conf b/sites/tinc.krebsco.de/etc/nginx/sites-available/tinc.krebsco.de.conf new file mode 100644 index 00000000..15749985 --- /dev/null +++ b/sites/tinc.krebsco.de/etc/nginx/sites-available/tinc.krebsco.de.conf @@ -0,0 +1,10 @@ +server { + listen :80; + server_name tinc.krebsco.de; + access_log /var/log/nginx/log/boot.krebsco.log main; + default_type text/plain; + # this path should be //boot + root /var/www/boot.krebsco.de; + try_files $uri $uri/retiolum.sh ; +} + -- cgit v1.2.3