diff --git a/docs/en/config/scheduler.yaml b/docs/en/config/scheduler.yaml index c4d3ac9d0a0..6551734d054 100644 --- a/docs/en/config/scheduler.yaml +++ b/docs/en/config/scheduler.yaml @@ -4,7 +4,7 @@ debug: false server: - # ListenPort is the ip and port supernode server listens on. + # ListenPort is the ip and port scheduler server listens on. # default: 8002 port: 8002 diff --git a/docs/en/user-guide/download-files.md b/docs/en/user-guide/download-files.md deleted file mode 100644 index e0c4c8b41e4..00000000000 --- a/docs/en/user-guide/download-files.md +++ /dev/null @@ -1,131 +0,0 @@ -# Downloading Files with Dragonfly - -Things are done differently when you download container images and download general files with Dragonfly. - -## Prerequisites - -- You are using Linux operating system. -- The supernode service is started. - - **Tip:** For more information on the dfget command, see [dfget](../cli_reference/dfget.md). For more information on the installation of supernodes, see [Installing Server](./install_server.md). - -## Downloading container images - -1. Config the supernodes with the configuration file. - - ```shell - cat < /etc/dragonfly/dfget.yml - nodes: - - supernode01:port - - supernode02:port - - supernode03:port - EOD - ``` - -2. Start the dfget proxy (dfdaemon). - - ```sh - # Start dfdaemon and specify the image repo URL. The default port is `65001`. - dfdaemon --registry https://xxx.xx.x - # Review dfdaemon logs - tailf ~/.small-dragonfly/logs/dfdaemon.log - ``` - - **Tip:** To list all available parameters for dfdaemon, run `dfdaemon -h`. - -3. Configure the Docker daemon. - - a. Modify the configuration file `/etc/docker/daemon.json`. - - ```sh - vi /etc/docker/daemon.json - ``` - - **Tip:** For more information on `/etc/docker/daemon.json`, see [Docker documentation](https://docs.docker.com/registry/recipes/mirror/#configure-the-cache). - - b. Add or update the configuration item `registry-mirrors` in the configuration file. - - ```sh - "registry-mirrors": ["http://127.0.0.1:65001"] - ``` - - c. Restart Docker daemon. - - ```bash - systemctl restart docker - ``` - - d. Add authentication info for the private docker registry in `~/.docker/config.json` if the registry is configured with auth. - - ```json - { - "auths": { - "https://index.docker.io/v1/": { - "auth": "${auth_value}" - } - } - } - ``` - - The ${auth_value} is `base64("${username}:${password}")`. - - ```bash - echo "${username}:${password}" | base64 - ``` - -4. Download an image with Dragonfly. - - ```bash - docker pull {imageName} - ``` - - **Note:** Don't include the image repo URL in {imageName}, because the repo URL has been specified with the `registry` parameter when starting dfdaemon. - -## Downloading General Files - -1. Specify the supernodes in one of the following ways. - - - Specifying with the configuration file. - - ```sh - cat < /etc/dragonfly/dfget.yml - nodes: - - supernode01:port - - supernode02:port - - supernode03:port - EOD - ``` - - - Specifying with the parameter in the command line. - - ```sh - dfget -u "http://www.taobao.com" -o /tmp/test.html --node supernode01:port,supernode02:port,supernode03:port - ``` - - **Note:** When using this method, you must add the `node` parameter whenever you run the dfget command. And the parameter in the command line takes precedence over the configuration file. - -2. Download general files with Dragonfly in one of the following ways. - - - Download files with the default `/etc/dragonfly/dfget.yml` configuration. - - ```sh - dfget --url "http://xxx.xx.x" - ``` - - **Tip:** To list all available parameters for dfget, run `dfget -h`. - - - Download files with your specified supernodes. - - ```sh - dfget --url "http://xxx.xx.x" --node "127.0.0.1:8002" - ``` - - - Download files to your specified output file. - - ```sh - dfget --url "http://xxx.xx.x" -o a.txt - ``` - -## After this Task - -To review the downloading log, run `less ~/.small-dragonfly/logs/dfclient.log`. diff --git a/docs/en/user-guide/multi-machines-deployment.md b/docs/en/user-guide/multi-machines-deployment.md deleted file mode 100644 index 6c24ad43d3f..00000000000 --- a/docs/en/user-guide/multi-machines-deployment.md +++ /dev/null @@ -1,118 +0,0 @@ -# Dragonfly multi-machines deployment - -The multi-machines deployment documentation is designed to help you fully experience Dragonfly on multiple machines. - -If you are using Dragonfly in your production environment to handle production image distribution, please refer to supernode and dfget's detailed production parameter configuration. - -## Prerequisites - -Assuming that experiment requires us to prepare three host machines, one to play a role of supernode, and the other two for dfclient. Then the topology of the three nodes cluster is like the following: - -![quick start cluster topology](../images/quick-start-topo.png) - -Then, we must provide: - -1. three host nodes in a LAN, and we assume that 3 machine IPs are replaced by the following names. - - - **dfsupernode**: Dragonfly server - - **dfclient0**: Dragonfly client one - - **dfclient1**: Dragonfly client two - -2. every node has deployed docker daemon - -## Step 1: Deploy Dragonfly Server (SuperNode) - -Deploy the Dragonfly server (Supernode) on the machine `dfsupernode`. - -```bash -docker run -d --name supernode \ - --restart=always \ - -p 8001:8001 \ - -p 8002:8002 \ - -v /home/admin/supernode:/home/admin/supernode \ - dragonflyoss/supernode:1.0.2 --download-port=8001 -``` - -## Step 2: Deploy Dragonfly Client (dfclient) - -The following operations should be performed both on the client machine `dfclient0`, `dfclient1`. - -### Prepare the configuration file - -Dragonfly's configuration file is located in the `/etc/dragonfly` directory by default. When using the container to deploy the client, you need to mount the configuration file to the container. - -Configure the Dragonfly Supernode address for the client: - -```bash -cat < /etc/dragonfly/dfget.yml -nodes: - - dfsupernode -EOD -``` - -### Start Dragonfly Client - -```bash -docker run -d --name dfclient \ - --restart=always \ - -p 65001:65001 \ - -v /etc/dragonfly:/etc/dragonfly \ - -v $HOME/.small-dragonfly:/root/.small-dragonfly \ - dragonflyoss/dfclient:1.0.2 --registry https://index.docker.io -``` - -**NOTE**: The `--registry` parameter specifies the mirrored image registry address, and `https://index.docker.io` is the address of official image registry, you can also set it to the others. - -## Step 3. Configure Docker Daemon - -We need to modify the Docker Daemon configuration to use the Dragonfly as a pull through registry both on the client machine `dfclient0`, `dfclient1`. - -1. Add or update the configuration item `registry-mirrors` in the configuration file`/etc/docker/daemon.json`. - -```json -{ - "registry-mirrors": ["http://127.0.0.1:65001"] -} -``` - -**Tip:** For more information on `/etc/docker/daemon.json`, see [Docker documentation](https://docs.docker.com/registry/recipes/mirror/#configure-the-cache). - -2. Restart Docker Daemon. - -```bash -systemctl restart docker -``` - -## Step 4: Pull images with Dragonfly - -Through the above steps, we can start to validate if Dragonfly works as expected. - -And you can pull the image as usual on either `dfclient0` or `dfclient1`, for example: - -```bash -docker pull nginx:latest -``` - -## Step 5: Validate Dragonfly - -You can execute the following command to check if the nginx image is distributed via Dragonfly. - -```bash -docker exec dfclient grep 'downloading piece' /root/.small-dragonfly/logs/dfclient.log -``` - -If the output of command above has content like - -``` -2019-03-29 15:49:53.913 INFO sign:96027-1553845785.119 : downloading piece:{"taskID":"00a0503ea12457638ebbef5d0bfae51f9e8e0a0a349312c211f26f53beb93cdc","superNode":"127.0.0.1","dstCid":"127.0.0.1-95953-1553845720.488","range":"67108864-71303167","result":503,"status":701,"pieceSize":4194304,"pieceNum":16} -``` - -that means that the image download is done by Dragonfly. - -If you need to ensure that if the image is transferred through other peer nodes, you can execute the following command: - -```bash -docker exec dfclient grep 'downloading piece' /root/.small-dragonfly/logs/dfclient.log | grep -v cdnnode -``` - -If the above command does not output the result, the mirror does not complete the transmission through other peer nodes. Otherwise, the transmission is completed through other peer nodes. diff --git a/docs/en/user-guide/quick-start.md b/docs/en/user-guide/quick-start.md index c7d0da439d8..6253719b3cd 100644 --- a/docs/en/user-guide/quick-start.md +++ b/docs/en/user-guide/quick-start.md @@ -18,13 +18,10 @@ found in [Kubernetes-with-Dragonfly](../ecosystem/Kubernetes-with-Dragonfly.md). ## SEE ALSO -- [multi machines deployment](../user-guide/multi-machines-deployment.md) - experience Dragonfly on multiple machines - [install manager](../user-guide/install/install-manager.md) - how to install the Dragonfly manager - [install cdn](../user-guide/install/install-cdn.md) - how to install the Dragonfly cdn - [install scheduler](../user-guide/install/install-scheduler.md) - how to install the Dragonfly scheduler -- [install client](../user-guide/install/install-client.md) - how to install the Dragonfly client - [proxy](../user-guide/proxy/containerd.md) - make Dragonfly as an HTTP proxy for docker daemon -- [download files](../user-guide/download-files.md) - download files with Dragonfly - Container Runtimes - [cri-o mirror](../user-guide/registry-mirror/cri-o.md) - make Dragonfly as Registry Mirror for CRIO daemon - [cri-containerd_mirror](../user-guide/registry-mirror/cri-containerd.md) - make Dragonfly as Registry Mirror for containerd daemon \ No newline at end of file