diff --git a/docs/concepts/terminology/dfstore.md b/docs/concepts/terminology/dfstore.md index debb139f..9a437ff6 100644 --- a/docs/concepts/terminology/dfstore.md +++ b/docs/concepts/terminology/dfstore.md @@ -143,7 +143,7 @@ objectStorage: ### Step 4: Install dragofly system -Install dragonfly system with object storage, refer to [install dragonfly](../../setup/install/helm-charts.md). +Install dragonfly system with object storage, refer to [install dragonfly](../../getting-started/installation/helm-charts.md). ### Step 5: Install the dfstore command-line tool diff --git a/docs/setup/install/source.md b/docs/getting-started/installation/binaries.md similarity index 99% rename from docs/setup/install/source.md rename to docs/getting-started/installation/binaries.md index 92a325a7..a385859d 100644 --- a/docs/setup/install/source.md +++ b/docs/getting-started/installation/binaries.md @@ -1,6 +1,6 @@ --- -id: source -title: Source +id: binaries +title: Binaries --- There are installation methods to install diff --git a/docs/setup/install/helm-charts.md b/docs/getting-started/installation/helm-charts.md similarity index 100% rename from docs/setup/install/helm-charts.md rename to docs/getting-started/installation/helm-charts.md diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md index 602f2159..9b60dee2 100644 --- a/docs/getting-started/quick-start.md +++ b/docs/getting-started/quick-start.md @@ -6,6 +6,5 @@ slug: /getting-started/quick-start/ Table of contents: -- [Docker Compose](./quick-start/docker-compose.md) - [Kubernetes](./quick-start/kubernetes.md) - [Multi-cluster Kubernetes](./quick-start/multi-cluster-kubernetes.md) diff --git a/docs/getting-started/quick-start/docker-compose.md b/docs/getting-started/quick-start/docker-compose.md deleted file mode 100644 index bbb17e19..00000000 --- a/docs/getting-started/quick-start/docker-compose.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -id: docker-compose -title: Docker Compose -slug: /getting-started/quick-start/docker-compose/ ---- - -In order to facilitate you to quickly set up the Dragonfly environment, -this article uses [Docker-Compose](https://docs.docker.com/compose/) Take kubernetes as an example to explain, -if you need kubernetes related content, you can refer to [Quick Start: Helm Charts](../../setup/install/helm-charts.md) - -If you want to use Dragonfly to complete production-level image and file distribution in the production environment, -please refer to the detailed production-level configuration parameters of supernode and dfget. If it is kubernetes, -you can use . - -## Preconditions {#preconditions} - -All the steps in this document are done on the same machine using the docker container, -so please make sure that you have installed and started -the docker container engine and installed docker-compose on your machine. - -## Step 1: Download and run Dragonfly docker-compose {#step-1-download-and-run-dragonfly-docker-compose} - -> If run with the Mac OS, an error may be reported, -> ref [sed command with -i option failing on Mac, but works on Linux](https://stackoverflow.com/a/41416710) - -```bash -git clone https://github.com/dragonflyoss/Dragonfly2.git -cd ./Dragonfly2/deploy/docker-compose/ - -export IP= -./run.sh -``` - -## Step 2: Modify the Docker Daemon configuration {#step-2-modify-the-docker-daemon-configuration} - -We need to modify the Docker Daemon configuration and use Dragonfly to pull the image by mirroring. - -Add or update the following configuration items in the configuration file `/etc/docker/daemon.json` - -```bash -{ - "registry-mirrors": ["http://127.0.0.1:65001"] -} -``` - -Restart Docker Daemon and Dragonfly - -```bash -systemctl restart docker -./run.sh -``` - -> **Tips**: -> Note that this action affects containers running on this host -> For more information `/etc/docker/daemon.json`, -> please refer to the [Docker documents](https://docs.docker.com/registry/recipes/mirror/#configure-the-cache). - -## Step 3: Pull the image {#step-3-pull-the-image} - -Through the above steps, we have completed the deployment of Dragonfly server and client, -and set up Docker Daemon to pull official images through Dragonfly. - -You can pull the image as usual, for example: - -```bash -docker pull nginx:latest -``` - -## Step 4: Verify {#step-4-verify} - -You can verify that the nginx image is transferred through Dragonfly by executing the following command. - -```bash -docker compose exec dfdaemon grep "peer task done" /var/log/dragonfly/daemon/core.log -``` - -If the above command has something like - -```json -{ - "level": "info", - "ts": "2022-09-07 12:04:26.485", - "caller": "peer/peertask_conductor.go:1500", - "msg": "peer task done, cost: 1ms", - "peer": "10.140.2.175-5184-1eab18b6-bead-4b9f-b055-6c1120a30a33", - "task": "b423e11ddb7ab19a3c2c4c98e5ab3b1699a597e974c737bb4004edeef6016ed2", - "component": "PeerTask" -} -``` - -It means that the mirror download is completed through Dragonfly. - -## Step 5: Manager Console {#step-5-manager-console} - -Open via browser `http://ip:8080/` - -The account is `root`, password is `dragonfly` - -> Tip: Please remember to modify the user name and password for the generation environment - -For more information refer to -[Manager Console document](../../reference/manage-console.md) - -## Step 6: Preheat {#step-6-preheat} - -To get the best out of Dragonfly, you can pull the image in advance by [preheat](../../reference/preheat.md) diff --git a/docs/getting-started/quick-start/kubernetes.md b/docs/getting-started/quick-start/kubernetes.md index 87b1a5ba..058ccd39 100644 --- a/docs/getting-started/quick-start/kubernetes.md +++ b/docs/getting-started/quick-start/kubernetes.md @@ -7,7 +7,7 @@ slug: /getting-started/quick-start/kubernetes/ Documentation for deploying dragonfly on kubernetes using helm. -You can have a quick start following [Helm Charts](../../setup/install/helm-charts.md). +You can have a quick start following [Helm Charts](../installation/helm-charts.md). We recommend to use `Containerd with CRI` and `CRI-O` client. This table describes some container runtimes version and documents. diff --git a/docs/getting-started/quick-start/multi-cluster-kubernetes.md b/docs/getting-started/quick-start/multi-cluster-kubernetes.md index 0669ba5c..74588969 100644 --- a/docs/getting-started/quick-start/multi-cluster-kubernetes.md +++ b/docs/getting-started/quick-start/multi-cluster-kubernetes.md @@ -17,7 +17,7 @@ and internal peers can only schedule and transmit data in a kubernetes cluster. ## Runtime -You can have a quick start following [Helm Charts](../../setup/install/helm-charts.md). +You can have a quick start following [Helm Charts](../../installation/helm-charts). We recommend to use `Containerd with CRI` and `CRI-O` client. This table describes some container runtimes version and documents. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json index d259ae2a..c4ce31ed 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -59,6 +59,10 @@ "message": "快速开始", "description": "The label for category Quick Start in sidebar docs" }, + "sidebar.docs.category.Installation": { + "message": "安装", + "description": "The label for category Quick Start in sidebar docs" + }, "sidebar.docs.category.Containerd": { "message": "Containerd", "description": "The label for category Containerd in sidebar docs" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/concepts/terminology/dfstore.md b/i18n/zh/docusaurus-plugin-content-docs/current/concepts/terminology/dfstore.md index c8b87717..c3b24b68 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/concepts/terminology/dfstore.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/concepts/terminology/dfstore.md @@ -138,7 +138,7 @@ objectStorage: ### 步骤 4: 安装 Dragonfly 系统 -安装 Dragonfly 系统参考文档 [install dragonfly](../../setup/install/helm-charts.md)。[] +安装 Dragonfly 系统参考文档 [install dragonfly](../../getting-started/installation/helm-charts.md)。 ### 步骤 5: 安装 dfstore 命令行工具 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/setup/install/source.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation/binaries.md similarity index 99% rename from i18n/zh/docusaurus-plugin-content-docs/current/setup/install/source.md rename to i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation/binaries.md index 26c2c049..c0143360 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/setup/install/source.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation/binaries.md @@ -1,6 +1,6 @@ --- -id: source -title: 源码安装 +id: binaries +title: 使用二进制文件安装 --- 通过可执行文件分模块进行安装。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/setup/install/helm-charts.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation/helm-charts.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/setup/install/helm-charts.md rename to i18n/zh/docusaurus-plugin-content-docs/current/getting-started/installation/helm-charts.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start.md index f0fb831d..971a4186 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start.md @@ -7,6 +7,5 @@ slug: /getting-started/quick-start/ 部署方式: -- [Docker Compose](quick-start/docker-compose.md) - [Kubernetes](quick-start/kubernetes.md) - [Multi-cluster Kubernetes](./quick-start/multi-cluster-kubernetes.md) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/docker-compose.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/docker-compose.md deleted file mode 100644 index 755744f1..00000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/docker-compose.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -id: docker-compose -title: Docker Compose -description: Docker Compose -slug: /getting-started/quick-start/docker-compose/ ---- - -为了方便您快速搭建起 Dragonfly 环境,本文以 [Docker-Compose](https://docs.docker.com/compose/) 为例进行讲解, -如果需要 kubernetes 相关内容,可以参考 [快速开始: Helm Charts](../../setup/install/helm-charts.md) - -如需在生产环境使用 Dragonfly 完成生产级别的镜像与文件分发,请参考 supernode 和 dfget 的详细生产级别配置参数,如果是 kubernetes , 可以使用 - 项目。 - -## 前提条件 - -本文档所有操作步骤均使用 docker 容器在同一台机器上完成,所以请确保您的机器上已经安装并启动 docker 容器引擎及安装 docker-compose。 - -## 步骤 1:下载并运行 Dragonfly docker-compose - -> 国内用户可以考虑使用 [gitee 镜像库](https://gitee.com/mirrors/Dragonfly2) 加速下载 -> 如果是 Mac OS 可能会报错, 参考 [sed command with -i option failing on Mac, but works on Linux](https://stackoverflow.com/a/41416710) - -```bash -git clone https://github.com/dragonflyoss/Dragonfly2.git -cd ./Dragonfly2/deploy/docker-compose/ - -export IP= -./run.sh -``` - -## 步骤 2: 修改 Docker Daemon 配置 - -我们需要修改 Docker Daemon 配置,通过 mirror 方式来使用 Dragonfly 进行镜像的拉取。 - -在配置文件  `/etc/docker/daemon.json`  中添加或更新如下配置项: - -```bash -{ - "registry-mirrors": ["http://127.0.0.1:65001"] -} -``` - -重启 Docker Daemon 和 Dragonfly - -```bash -systemctl restart docker -./run.sh -``` - -> **提示**: -> -> 注意该操作会影响该主机正在运行的容器 -> -> 如需进一步了解 `/etc/docker/daemon.json`,请参考 [Docker 文档](https://docs.docker.com/registry/recipes/mirror/#configure-the-cache)。 - -## 步骤 3:拉取镜像 - -通过以上步骤我们即完成了 Dragonfly 服务端与客户端的部署,并且设置了 Docker Daemon 通过 Dragonfly 来拉取官方镜像。 - -您可以如平时一样来拉取镜像,例如: - -```bash -docker pull nginx:latest -``` - -## 步骤 4:验证 - -您可以通过执行以下命令,检验 nginx 镜像是否通过 Dragonfly 来传输完成。 - -```bash -docker compose exec dfdaemon grep "peer task done" /var/log/dragonfly/daemon/core.log -``` - -如果以上命令有诸如 - -```json -{ - "level": "info", - "ts": "2022-09-07 12:04:26.485", - "caller": "peer/peertask_conductor.go:1500", - "msg": "peer task done, cost: 1ms", - "peer": "10.140.2.175-5184-1eab18b6-bead-4b9f-b055-6c1120a30a33", - "task": "b423e11ddb7ab19a3c2c4c98e5ab3b1699a597e974c737bb4004edeef6016ed2", - "component": "PeerTask" -} -``` - -则说明镜像下载通过 Dragonfly 来完成了。 - -## 步骤 5: Manager 控制台 - -通过浏览器打开 `http://ip:8080/` - -账号为 `root`, 密码为 `dragonfly` - -> 提示:用于生成环境请记得修改用户名和密码 - -更多信息参考 [Manager Console 文档](../../reference/manage-console.md) - -## 步骤 6: 预热 - -为了使用 Dragonfly 的最佳体验, 你可以通过 [预热](../../reference/preheat.md) 提前下拉镜像。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/kubernetes.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/kubernetes.md index 393ad40e..4ebe4b5e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/kubernetes.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/kubernetes.md @@ -7,7 +7,7 @@ slug: /getting-started/quick-start/kubernetes/ 文档的目标是帮助您快速开始使用 Helm 部署 Dragonfly。 -您可以根据 [Helm Charts](../../setup/install/helm-charts.md) +您可以根据 [Helm Charts](../installation/helm-charts.md) 文档中的内容快速搭建 Dragonfly 的 Kubernetes 集群。 我们推荐使用 `Containerd with CRI` 和 `CRI-O` 客户端。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/multi-cluster-kubernetes.md b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/multi-cluster-kubernetes.md index 17caa2ae..30189225 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/multi-cluster-kubernetes.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/getting-started/quick-start/multi-cluster-kubernetes.md @@ -17,7 +17,7 @@ Peers 只能在当前 Dragonfly 集群内 P2P 传输数据,所以一定要保 ## Runtime -您可以根据 [Helm Charts](../../setup/install/helm-charts.md) +您可以根据 [Helm Charts](../installation/helm-charts.md) 文档中的内容快速搭建 Dragonfly 的 Kubernetes 集群。 我们推荐使用 `Containerd with CRI` 和 `CRI-O` 客户端。 diff --git a/sidebars.js b/sidebars.js index 2d4ddc0b..6babc5dd 100644 --- a/sidebars.js +++ b/sidebars.js @@ -23,6 +23,10 @@ module.exports = { { type: 'category', label: 'Quick Start', + link: { + type: 'doc', + id: 'getting-started/quick-start', + }, items: [ { type: 'autogenerated', @@ -30,6 +34,11 @@ module.exports = { }, ], }, + { + type: 'category', + label: 'Installation', + items: ['getting-started/installation/helm-charts', 'getting-started/installation/binaries'], + }, ], }, { @@ -37,11 +46,6 @@ module.exports = { label: 'Setup', collapsed: false, items: [ - { - type: 'category', - label: 'Install', - items: ['setup/install/helm-charts', 'getting-started/quick-start/docker-compose', 'setup/install/source'], - }, { type: 'category', label: 'Runtime', diff --git a/sidebars/docs.js b/sidebars/docs.js index b8bc2ebe..a746452b 100644 --- a/sidebars/docs.js +++ b/sidebars/docs.js @@ -12,6 +12,10 @@ module.exports = { { type: 'category', label: 'Quick Start', + link: { + type: 'doc', + id: 'getting-started/quick-start', + }, items: [ { type: 'autogenerated', @@ -19,6 +23,11 @@ module.exports = { }, ], }, + { + type: 'category', + label: 'Installation', + items: ['getting-started/installation/helm-charts', 'getting-started/installation/binaries'], + }, ], }, { @@ -26,11 +35,6 @@ module.exports = { label: 'Setup', collapsed: false, items: [ - { - type: 'category', - label: 'Install', - items: ['setup/install/helm-charts', 'getting-started/quick-start/docker-compose', 'setup/install/source'], - }, { type: 'category', label: 'Runtime',