-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC Docker compose for small libp2p node network #364
Conversation
@@ -84,6 +86,9 @@ impl Swarm { | |||
.timeout(TRANSPORT_TIMEOUT) | |||
.boxed(); | |||
|
|||
// Wrapping TCP transport into DNS transport to resolve hostnames. | |||
let tcp_transport = dns::TokioDnsConfig::system(tcp_transport)?.boxed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes had it's own PR (#346) and was merged into this branch.
Codecov ReportPatch has no changes to coverable lines.
📢 Thoughts on this report? Let us know!. |
826d2d1
to
b2f7c6a
Compare
We could not figure out how to deal with this in Compose directly (since, sadly, Docker Compose does not expose the container name in the container itself) I wrote this simple golang tool to generate our compose based on simple (?:)) manifest It was just a few hours PoC, so it is very simplistic, but it feels like a reasonable approach, unless someone can figure out a more general way how to figure out "who am I?" from the container perspective |
Thank you very much for sharing your approach! I've taken a look and I believe that for our case it's too coupled with docker compose. I think it's perfectly fine for your use case, but even if nomos goes with docker compose for now, I'm not too sure about the long run. It's very likely that parts of infra will be provisioned by Ansible, especially the machines running nodes. Ideally Docker Compose will stay for local tests and new users, by some parts being reused on the public testnet. Having that in mind, I've been experimenting with observability tools like etcd and consul. I'll share results this week and would really value your insights. The basic idea is to have service registrar container, bootstrap node, and other nodes. The |
b2f7c6a
to
319025d
Compare
2b201c8
to
4850ecf
Compare
4850ecf
to
2dd2ab3
Compare
a02a299
to
3d94d6f
Compare
e820043
to
2e72cd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good for the most part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎸
POC for testnet using Docker compose, the same approach that waku is using for simulations.
Before going further, it would be great to discuss some nuances using this approach:
Writing and loading can be done from the host system using volumes, the problem is to determine which node should load a particular state and how not to load the same state twice.
Alternative tools to Docker Compose include Ansible and bash scripts; however, these may not function seamlessly on local setups. Another advantage of using Docker Compose is the straightforward integration of Prometheus and Grafana.