-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Update docker config to use docker networking instead of host networking #312
Conversation
The CI tests are failing with errors: |
1a88d3b
to
2673f6e
Compare
2673f6e
to
d08f671
Compare
I'm still getting errors on macOS with the latest docker:
I'm only using docker to start the envoy service. I start the other services manually (monerod1, monerod2, funding-wallet-local, and the seed node). But the only changes in the PR are for docker files, so I suppose something needs updated for macOS too. |
That's the idea of this PR, to ditch starting all services manually with make in 4 terminals, now they are started with docker. Spawning of other processes is not scoped in this PR so the haveno compilation is still needed |
What is the rationale for starting only envoy with docker. Why other services are needed there? |
It’s helpful to have manual control to start, stop, modify, build, and delete the services individually throughout the development process, instead of using docker to start all services together, which can’t be easily managed individually. I found there was too much overhead for making small changes and rapidly iterating, so I do want to preserve the ability to run the services manually. |
So you want to keep it as is? So I struggle to see what is actually needed? I see pure docker setup is used for CI, but |
I can introduce two docker files, for localdev and for CI |
Updating docker makes the tests fail at least when the services are started manually (I didn't test when started with docker). So the goal is to make the tests work after updating docker, with the services started manually and with docker. |
dist/HavenoClient.test.js
Outdated
@@ -0,0 +1,4109 @@ | |||
"use strict"; |
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.
Please remove dist files from PR.
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.
Sure
docker/docker-compose.yml
Outdated
network_mode: "host" | ||
depends_on: | ||
- seed1 | ||
# arbitrator: |
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.
I saw that the log files were not collected in the CI tests for the arbitrator, user1, and user2. Guessing because these were commented out. Should be uncommented?
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.
No, because these containers are currently unused. Tests are invoking arbitrator, user1 and user2 from haveno directory. To fully dockerize the project we'd need to invoke monerod and haveno processes with docker run
.
If I'd uncomment these containers, there would be binding errors since docker and local haveno will be racing to bind to the same port. If I remove the port exposure from docker, then logs will be essentially empty (as in current master).
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.
How can we get the logging for arbitrator, user1, and user2 to remain collected in the CI tests then? Those logs are sometimes needed for debugging.
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.
"--rpc-access-control-origins=http://localhost:8080", | ||
"--wallet-dir=./.localnet", | ||
"--rpc-access-control-origins='*'", | ||
"--wallet-dir=./.localnet/funding_wallet", |
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.
Why move the funding wallet to this folder?
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.
This is for docker to place the artifacts into proper local persistent directory
ecb0600
to
1bf6587
Compare
@@ -1,591 +0,0 @@ | |||
import type * as grpcWeb from "grpc-web"; |
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.
No changes to dist files should be included with the PR.
"--add-exclusive-node=127.0.0.1:48080", | ||
"--rpc-access-control-origins=http://localhost:8080", | ||
"--add-exclusive-node=node1:48080", | ||
"--rpc-access-control-origins='*'", |
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.
Any reason to open up the access control origins from http://localhost:8080? Thinking to keep it as is to be more representative of production.
depends_on: | ||
- seed1 | ||
# ports: |
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.
Can these comments be removed, or they're documenting something?
Closing as incompleted. |
This allows us to update the docker version to latest and have no issues on macOS.