-
Notifications
You must be signed in to change notification settings - Fork 773
docs: add --node when starting dfclient container in quick_start docs #645
Conversation
Codecov Report
@@ Coverage Diff @@
## master #645 +/- ##
==========================================
+ Coverage 46.58% 48.24% +1.66%
==========================================
Files 106 99 -7
Lines 6187 5889 -298
==========================================
- Hits 2882 2841 -41
+ Misses 3072 2824 -248
+ Partials 233 224 -9
Continue to review full report at Codecov.
|
9f06e08
to
6f4fa73
Compare
docs/quick_start/README.md
Outdated
@@ -20,10 +20,13 @@ docker run -d --name supernode --restart=always -p 8001:8001 -p 8002:8002 \ | |||
## Step 2:Deploy Dragonfly Client (dfclient) | |||
|
|||
```bash | |||
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.0 --registry https://index.docker.io | |||
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.0 --registry https://index.docker.io --node `docker inspect supernode -f '{{.NetworkSettings.Networks.bridge.IPAddress}}'` |
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 don't think this is the best way to make dfclient to access the supernode
deployed by docker in quick-start
document. It will fail if you deploy them on macOS.
The root cause why dfclient:0.4.0
cannot access supernode:0.4.0
is the wrong command line parameter and wrong Dockerfile.supernode
:
- In version
0.4.0
, we use supernode written by golang, and the correct parameter is--adverties-ip
, not-Dsupernode.advertiseIP
. - The supernode image builded by
Dockerfile.supernode
cannot pass parameters tosupernode
process.
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.
Thanks for pointing this. So how to fix this issue? Do we have to change the Dockerfile first?
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.
Has been fixed by #663.
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 think it may be easier to understand for user:
SUPERNODE_IP=`docker inspect supernode -f '{{.NetworkSettings.Networks.bridge.IPAddress}}'`
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.0 --registry https://index.docker.io --node ${SUPERNODE_IP}
@lowzj Hi, I have tested this in my mac. And it works well. Do you have time to test it in your local environment? |
6f4fa73
to
0870085
Compare
The PR #663 has been merged. PTAL. |
docs/quick_start/README.md
Outdated
@@ -45,6 +50,16 @@ We need to modify the Docker Daemon configuration to use the Dragonfly as a pull | |||
systemctl restart docker | |||
``` | |||
|
|||
For macOS users: |
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.
The doc of quick_start
should be as concise as possible. We treat Linux as default and maybe you can add an external link for MacOS or something else. WDYT?
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.
Yes, I will remove the part of macos.
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.
Could you rebase your code and force push again to fix the CI problem?
docs/quick_start/README.md
Outdated
@@ -20,10 +20,13 @@ docker run -d --name supernode --restart=always -p 8001:8001 -p 8002:8002 \ | |||
## Step 2:Deploy Dragonfly Client (dfclient) | |||
|
|||
```bash | |||
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.0 --registry https://index.docker.io | |||
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.0 --registry https://index.docker.io --node `docker inspect supernode -f '{{.NetworkSettings.Networks.bridge.IPAddress}}'` |
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 think it may be easier to understand for user:
SUPERNODE_IP=`docker inspect supernode -f '{{.NetworkSettings.Networks.bridge.IPAddress}}'`
docker run -d --name dfclient -p 65001:65001 dragonflyoss/dfclient:0.4.0 --registry https://index.docker.io --node ${SUPERNODE_IP}
c402aa8
to
c5a2032
Compare
c5a2032
to
c33d257
Compare
docs/quick_start/README.md
Outdated
|
||
## Step 1: Deploy Dragonfly Server (SuperNode) | ||
|
||
```bash | ||
docker run -d --name supernode --restart=always -p 8001:8001 -p 8002:8002 \ | ||
dragonflyoss/supernode:0.4.0 -Dsupernode.advertiseIp=127.0.0.1 | ||
dragonflyoss/supernode:0.4.1 -D --advertise-ip $(host-ip) |
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.
- remove
-D
$(host-ip)
is not clear for use, it cannot be executed in command line directly.- If we use image 0.4.1, we can remove this option
--advertise-ip
, add--node
to dfclient and remind user to use--advertise-ip
if thedfclient
cannot connect tosupernode
.
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.
Done. I have remove these two parameters.
c33d257
to
437cafb
Compare
docs/quick_start/README.md
Outdated
> **NOTE**: `supernode.advertiseIp` should be the ip that clients can connect to, `127.0.0.1` here is an example for testing, and it can only be used if the server and client are in the same machine. | ||
**NOTE**: | ||
|
||
- If dfclient cannot connect to supernode directly, you can specify parameter `--advertise-ip` when supernode starts. This ip address must be accessible from dfclient. |
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.
Maybe it's better to point out that the IP used by supernode will be the first non-loop address if not specified.
437cafb
to
38ace01
Compare
Signed-off-by: yeya24 <[email protected]>
38ace01
to
6f76e4a
Compare
LGTM. |
docs: add --node when starting dfclient container in quick_start docs
docs: add --node when starting dfclient container in quick_start docs
Signed-off-by: Gaius <[email protected]>
Signed-off-by: yeya24 [email protected]
Ⅰ. Describe what this PR did
Specify --node to make sure that dfget can access supernode container.
Ⅱ. Does this pull request fix one issue?
fix #643
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews