Skip to content

Commit 42532a6

Browse files
authored
Merge pull request dragonflyoss#623 from Starnop/doc-0.4.0
doc: update doc because update 0.3 to 0.4
2 parents 9b12f1d + 7842b4f commit 42532a6

File tree

3 files changed

+51
-33
lines changed

3 files changed

+51
-33
lines changed

FAQ.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ While container technologies makes devops life easier most of the time, it sure
1919

2020
It delivers up to 57 times the throughput of native docker and saves up to 99.5% the out bandwidth of registry(*2).
2121

22-
Dragonfly makes it simple and cost-effective to set up, operate, and scale any kind of files/images/data distribution.
22+
Dragonfly makes it simple and cost-effective to set up, operate, and scale any kind of files/images/data distribution.
2323

2424
## Is Dragonfly only designed for distribute container images
2525

@@ -266,16 +266,39 @@ You can follow the steps:
266266
267267
- find a failed task: `grep 'download FAIL' dfclient.log`, such as:
268268
269-
```
269+
```sh
270270
2019-05-22 05:40:58.120 INFO sign:38923-1558496382.915 : download FAIL cost:75.208s length:4120442 reason:0
271271
```
272272

273273
- get all the logs of this task through the sign `38923-1558496382.915`: `grep 38923-1558496382.915 dfclient.log`, such as:
274274

275-
```
275+
```sh
276276
2019-05-22 05:39:42.919 INFO sign:38923-1558496382.915 : get cmd params:["dfget" "-u" "https://xxx" "-o" "./a.test"]
277277
...
278278
...
279279
2019-05-22 05:40:58.120 INFO sign:38923-1558496382.915 : download FAIL cost:75.208s length:4120442 reason:0
280280
```
281281

282+
## Can I use self-specified ports for dragonfly
283+
284+
Announce the results firstly, and it is yes.
285+
286+
Here are the port list that dragonfly will use:
287+
288+
Name | Default Value | Description
289+
------------------------------ | ------------- | ----------
290+
dfdaemon proxy server port | 65001 | The port that dfdaemon proxy will listen.
291+
dfget uploader server port | Random | The port that the dfget uploader server will listen.
292+
supernode register port | 8002 | It's used for clients to register themselves as peers of p2p-network into supernode.
293+
supernode cdn file server port | 8001 | It's used for clients to download file pieces from supernode.
294+
295+
And each item in the above table can be self-defined.
296+
297+
Name | Flag | Remark
298+
------------------------------ | ------------------------- | ----------
299+
dfdaemon proxy server port | dfdaemon --port | The port should be in the range of 2000-65535.
300+
dfget uploader server port | dfget server --port | You can use command `dfget server` to start a uploader server before using dfget to download if you don't want to use a random port.
301+
supernode register port | supernode --port | You can use `dfget --node IP:port` to register with the specified supernode register port.
302+
supernode cdn file server port | supernode --download-port | You should prepare a file server firstly and listen on the port that flag `download-port` will use.
303+
304+
**NOTE**: The supernode maintains both Java and Golang versions currently. And the above table is for the Golang version. And you will get a guide [here](https://d7y.io/en-us/docs/userguide/supernode_configuration.html) for Java version.

docs/user_guide/download_files.md

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Downloading Files
1+
# Downloading Files with Dragonfly
22

33
Things are done differently when you download container images and download general files with Dragonfly.
44

@@ -11,19 +11,15 @@ Things are done differently when you download container images and download gene
1111

1212
## Downloading container images
1313

14-
1. Specify the supernodes.
14+
1. Config the supernodes with the configuration file.
1515

16-
a. Open the Dragonfly configuration file.
17-
18-
```sh
19-
vi /etc/dragonfly.conf
20-
```
21-
22-
b. Add the IP of supernodes separated by comma to the configuration file.
23-
24-
```sh
25-
[node]
26-
address=nodeIp1,nodeIp2
16+
```shell
17+
cat <<EOD > /etc/dragonfly/dfget.yml
18+
nodes:
19+
- supernode01:port
20+
- supernode02:port
21+
- supernode03:port
22+
EOD
2723
```
2824
2925
2. Start the dfget proxy (dfdaemon).
@@ -92,25 +88,25 @@ Things are done differently when you download container images and download gene
9288
- Specifying with the configuration file.
9389
9490
```sh
95-
# Open the Dragonfly configuration file.
96-
vi /etc/dragonfly.conf
97-
98-
# Add the IP of supernodes separated by comma to the configuration file
99-
[node]
100-
address=nodeIp1,nodeIp2
101-
```
91+
cat <<EOD > /etc/dragonfly/dfget.yml
92+
nodes:
93+
- supernode01:port
94+
- supernode02:port
95+
- supernode03:port
96+
EOD
97+
```
10298
10399
- Specifying with the parameter in the command line.
104100
105101
```sh
106-
dfget -u "http://www.taobao.com" -o /tmp/test.html --node nodeIp1,nodeIp2
102+
dfget -u "http://www.taobao.com" -o /tmp/test.html --node supernode01:port,supernode02:port,supernode03:port
107103
```
108104
109105
**Note:** When using this method, you must add the `node` parameter every time when you run the dfget command. And the parameter in the command line takes precedence over the configuration file.
110106
111107
2. Download general files with Dragonfly in one of the following ways.
112108
113-
- Download files with the default `/etc/dragonfly.conf` configuration.
109+
- Download files with the default `/etc/dragonfly/dfget.yml` configuration.
114110
115111
```sh
116112
dfget --url "http://xxx.xx.x"
@@ -121,7 +117,7 @@ Things are done differently when you download container images and download gene
121117
- Download files with your specified supernodes.
122118
123119
```sh
124-
dfget --url "http://xxx.xx.x" --node "127.0.0.1"
120+
dfget --url "http://xxx.xx.x" --node "127.0.0.1:8002"
125121
```
126122
127123
- Download files to your specified output file.
@@ -133,4 +129,3 @@ Things are done differently when you download container images and download gene
133129
## After this Task
134130
135131
To review the downloading log, run `less ~/.small-dragonfly/logs/dfclient.log`.
136-

docs/user_guide/install_client.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ You can install from the latest packages we provided.
1818

1919
- If you're in China:
2020
21-
- [Linux 64-bit](http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.3.0_linux_amd64.tar.gz): `http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.3.0_linux_amd64.tar.gz`
21+
- [Linux 64-bit](http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.4.0_linux_amd64.tar.gz): `http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.4.0_linux_amd64.tar.gz`
2222
23-
- [MacOS 64-bit](http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.3.0_darwin_amd64.tar.gz): `http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.3.0_darwin_amd64.tar.gz`
23+
- [MacOS 64-bit](http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.4.0_darwin_amd64.tar.gz): `http://dragonflyoss.oss-cn-hangzhou.aliyuncs.com/df-client_0.4.0_darwin_amd64.tar.gz`
2424
2525
- If you're not in China:
2626

27-
- [Linux 64-bit](https://github.com/dragonflyoss/Dragonfly/releases/download/v0.3.0/df-client_0.3.0_linux_amd64.tar.gz): `https://github.com/dragonflyoss/Dragonfly/releases/download/v0.3.0/df-client_0.3.0_linux_amd64.tar.gz`
27+
- [Linux 64-bit](https://github.com/dragonflyoss/Dragonfly/releases/download/v0.4.0/df-client_0.4.0_linux_amd64.tar.gz): `https://github.com/dragonflyoss/Dragonfly/releases/download/v0.4.0/df-client_0.4.0_linux_amd64.tar.gz`
2828

29-
- [MacOS 64-bit](https://github.com/dragonflyoss/Dragonfly/releases/download/v0.3.0/df-client_0.3.0_darwin_amd64.tar.gz): `https://github.com/dragonflyoss/Dragonfly/releases/download/v0.3.0/df-client_0.3.0_darwin_amd64.tar.gz`
29+
- [MacOS 64-bit](https://github.com/dragonflyoss/Dragonfly/releases/download/v0.4.0/df-client_0.4.0_darwin_amd64.tar.gz): `https://github.com/dragonflyoss/Dragonfly/releases/download/v0.4.0/df-client_0.4.0_darwin_amd64.tar.gz`
3030

3131
2. Unzip the package.
3232

3333
```bash
3434
# Replace `xxx` with the installation directory.
35-
tar -zxf df-client_0.3.0_linux_amd64.tar.gz -C xxx
35+
tar -zxf df-client_0.4.0_linux_amd64.tar.gz -C xxx
3636
```
3737

3838
3. Add the directory of `df-client` to your `PATH` environment variable to make sure you can directly use `dfget` and `dfdaemon` command.
@@ -80,5 +80,5 @@ You can also install from the source code.
8080
Test if the downloading works.
8181

8282
```sh
83-
dfget --url "http://${resourceUrl}" --output ./resource.png --node "127.0.0.1"
83+
dfget --url "http://${resourceUrl}" --output ./resource.png --node "127.0.0.1:8002"
8484
```

0 commit comments

Comments
 (0)