oduwsdl / ipwb

InterPlanetary Wayback: A distributed and persistent archive replay system using IPFS
MIT License
610 stars 39 forks source link

Use docker for testing communication between ipwb instances #209

Open machawk1 opened 7 years ago

machawk1 commented 7 years ago

https://github.com/oduwsdl/ipwb/blob/master/tests/test_nodeToNode.py requires two ipwb instances. I am unaware on how to do this within a single test case but travis-ci supports docker, so using it to spin up two ipwb instances might be the ticket in testing inter-instance communication.

70 is still needed to ensure ipwb fundamentally runs w/ docker (which should not be an issue). Consider that a dependency for that issue (and once again, I'm recalling @jbenet's suggestion for this functionality on GitHub).

Ping @ibnesayeed

ibnesayeed commented 7 years ago

It should be possible by running two container instances mapped to different host ports, or by standard docker linking mechanism. As far as the storage is concerned, I think we can mount two separate host directories in those two containers or leave containers without mounted volumes and let them inflate with data because after testing is over the data doesn't need to be persisted anyway.

machawk1 commented 7 years ago

@ibnesayeed Identical ports would have eventually bitten me. Thanks for mentioning that.

I am hoping to have one container start with data (or blank and generated on the fly) and the other have no payload data, push the data using ipwb then test the facets of replay on the container that originally had no payload data.

ibnesayeed commented 7 years ago

Thinking out loud, discovery using global IPFS peer network would require these containers to be accessible from outside, which means container service ports need to be mapped to some open host ports, just establishing a private network between those containers might not be sufficient, unless they are initialized as peers of one another.

machawk1 commented 7 years ago

@ibnesayeed That's a good point and will require additional testing. The instance we setup for #152 would allow an additional data point for testing with a source outside of the CI system.

I think the goal of this ticket, however, will be to simply get multiple instances running on Travis-CI and have them communicate in the manner described above (using Docker on a single system).

machawk1 commented 6 years ago

See also https://github.com/whyrusleeping/iptb

machawk1 commented 4 years ago

https://github.com/ipfs/testground