libp2p / testlab

A testlab built with Nomad and Consul to analyze the behavior of p2p networks at scale
Other
22 stars 8 forks source link

Enhance task building, add IPFS support #20

Open bigs opened 5 years ago

bigs commented 5 years ago

This is an early-stage implementation of an IPFS support. The changes, summarized:

There are some known problems I will work past this week:

This is now ready for review. It can definitely use cleaning, but it correctly schedules IPFS clusters!

jimpick commented 5 years ago

I tried running the test2.json ipfs example in my vagrant cluster and it worked first try!

It scheduled all the 4 ipfs docker images into the 3rd machine in the cluster though - I was expecting them to be spread across my 3 virtual machines.

jimpick commented 5 years ago

Ah, I see, a "TaskGroup" will schedule all of it's tasks on the same client.

I tried creating 6 different "ipfspeers" groups, and it schedules them on multiple clients, but I still had one client with no tasks.

Running "nomad alloc status -verbose " shows zero for "job-anti-affinity", so that might be a factor.

jimpick commented 5 years ago

I think it might need a "spread" in there somewhere to evenly schedule the docker instances across the clients.

https://github.com/hashicorp/nomad/blob/master/website/source/guides/operating-a-job/advanced-scheduling/spread.html.md