Skip to content

Instantly share code, notes, and snippets.

@bigs
Created January 17, 2019 18:03
Show Gist options
  • Select an option

  • Save bigs/bc6804b79f44fd2e13cf86fe24657355 to your computer and use it in GitHub Desktop.

Select an option

Save bigs/bc6804b79f44fd2e13cf86fe24657355 to your computer and use it in GitHub Desktop.
i'm so tired, these are probably slightly stupid
testbed notes
worth considering notes here https://github.com/ipfs/notes/issues/191, though
i have fears this leads us towards a path to kubernetes!
definition of terms:
- topology: weighted composition of nodes, e.g. gateway vs full ipfs vs p2pd
with specific modules enabled.
- scenario: the general definition of behaviors of nodes in the testbed. one
scenario runner is run per physical machine. it is responsible for
coordinating iptb to run the nodes that will be homed on this
machine.
- provisioning: the process through which a topology is rendered.
- scenario running: the process through which a scenario is run on the testbed.
local machine testbed:
- backed by IPTB, brought in as a library in golang or used via CLI by js
- test framework similar to what i would expect in integration tests
- input topology, get back daemon clients
- topology can include network characteristics
- beta exists today
cluster:
- v0
- provisioning
- terraform cloud hardware w/ iptb and versions of daemon/ipfs
- has and uses curl
- uses https gateways to fetch deps from ipfs
- bins topology by physical machines
- renders each binned topology on each physical machine
- query each physical node for virtual nodes running on it
- elect gateways
- scenario running
- for each physical node
- ssh into box
- look for running scenario (pidfile)
- kill if exists
- connect other nodes to gateways
- scp new scenario (or fetch from ipfs gateway)
- launch scenario, creating pidfile
- scenarios
- uses daemon/external api of nodes
- executes defined scenario
- shuts down gracefully
- v1
- provisioning
- provisioning supports network degradation
- provisioning will properly evaluate a raw scenario description, binning
as necessary.
- after starting nodes, provisioning will query for node addresses, elect
gateways, and connect other nodes to them.
- v2-option1
- provisioning
- uses virtual networking and local DNS to assign gateways and make them
discoverable
- v2-option2
- creates iptb daemon, which federates with other daemons via gossip
- in this manner, we can coordinate the election and propagation of, and
connection to gateway nodes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment