mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 13:54:15 -07:00
Renamed supernode to rootserver
This commit is contained in:
parent
845955dea5
commit
a425bbc673
30 changed files with 166 additions and 156 deletions
|
@ -1,6 +1,6 @@
|
|||
Test Root Topology Script
|
||||
======
|
||||
|
||||
This builds a test-root-topology from any number of running test-supernode-# Docker containers. This can then be used with the (undocumented) -T (override root topology) option to run test networks under Docker.
|
||||
This builds a test-root-topology from any number of running test-rootserver-# Docker containers. This can then be used with the (undocumented) -T (override root topology) option to run test networks under Docker.
|
||||
|
||||
Once you have a local Docker test network running you can use iptables rules to simulate a variety of network pathologies, or you can just use it to test any new changes to the protocol or node behavior at some limited scale.
|
||||
|
|
|
@ -5,18 +5,18 @@ if [ ! -e ../mktopology ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo 'Populating supernodes/* with all Docker test-supernode-* container IPs and identities...'
|
||||
echo 'Populating rootservers/* with all Docker test-rootserver-* container IPs and identities...'
|
||||
|
||||
rm -rf supernodes
|
||||
mkdir supernodes
|
||||
rm -rf rootservers
|
||||
mkdir rootservers
|
||||
|
||||
for cid in `docker ps -f 'name=test-supernode-*' -q`; do
|
||||
for cid in `docker ps -f 'name=test-rootserver-*' -q`; do
|
||||
id=`docker exec $cid cat /var/lib/zerotier-one/identity.secret | cut -d : -f 1-3`
|
||||
ztaddr=`echo $id | cut -d : -f 1`
|
||||
ip=`docker exec $cid ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'`
|
||||
echo $cid $ztaddr $id $ip
|
||||
echo "id=$id" >supernodes/$ztaddr
|
||||
echo "udp=$ip/9993" >>supernodes/$ztaddr
|
||||
echo "id=$id" >rootservers/$ztaddr
|
||||
echo "udp=$ip/9993" >>rootservers/$ztaddr
|
||||
done
|
||||
|
||||
echo 'Creating test-root-topology...'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue