docs(zh): add zh docs (#777)
Signed-off-by: cndoit18 <cndoit18@outlook.com>
This commit is contained in:
parent
b083ff4b39
commit
e8d85c27ca
|
|
@ -10,4 +10,4 @@ Just run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./run.sh
|
./run.sh
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,3 @@
|
||||||
[English](en/README.md)
|
[English](en/README.md)
|
||||||
|
|
||||||
[简体中文](zh-CN/README.md)
|
[简体中文](zh-CN/README.md)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ Organization of document is as following:
|
||||||
* [manager](design/manager.md)
|
* [manager](design/manager.md)
|
||||||
* [TODO scheduler](design/scheduler.md)
|
* [TODO scheduler](design/scheduler.md)
|
||||||
* [TODO cdn](design/cdn.md)
|
* [TODO cdn](design/cdn.md)
|
||||||
* [TODO dfdaemon](desigin/dfdaemon.md)
|
* [TODO dfdaemon](design/dfdaemon.md)
|
||||||
* [Developer Guide](developer-guide/developer-guide.md)
|
* [Developer Guide](developer-guide/developer-guide.md)
|
||||||
* [Test Guide](test-guide/test-guide.md)
|
* [Test Guide](test-guide/test-guide.md)
|
||||||
* [API Reference](api-reference/api-reference.md)
|
* [API Reference](api-reference/api-reference.md)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ Console features preview reference document [console preview](../../../design/ma
|
||||||
|
|
||||||
Use Containerd with CRI as example, more runtimes can be found [here](../../../quick-start.md)
|
Use Containerd with CRI as example, more runtimes can be found [here](../../../quick-start.md)
|
||||||
|
|
||||||
> This example is for single registry, multiple registries configuration is [here](../../../container-runtimes)
|
> This example is for single registry, multiple registries configuration is [here](../../../runtime-integration)
|
||||||
|
|
||||||
For private registry:
|
For private registry:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,80 +1,32 @@
|
||||||
# 蜻蜓文档
|
# 蜻蜓文档
|
||||||
|
|
||||||
Dragonfly Document 是关于 Dragonfly 的介绍。对于一般对 Dragonfly 感兴趣的人,这个 repo 的 README.md 就足够了。对于最终用户来说,`/docs` 中包含的所有详细信息是最好的指南。而对于开发者来说,[开发者指南](#开发者指南)部分的内容才是最需要的。
|
Dragonfly Document 是关于 Dragonfly 的介绍。对于一般对 Dragonfly 感兴趣的人,这个 repo 的 README.md 就足够了。对于最终用户来说,`/docs` 中包含的所有详细信息是最好的指南。而对于开发者来说,[开发者指南](developer-guide/developer-guide.md)部分的内容才是最需要的。
|
||||||
|
|
||||||
文档文件组织如下:
|
文档文件组织如下:
|
||||||
|
|
||||||
* [快速开始](#快速开始)
|
* [快速开始](quick-start.md)
|
||||||
* [用户指南](#用户指南)
|
* [部署](deployment/README.md)
|
||||||
* [CLI参考](#CLI参考)
|
* [安装](deployment/installation)
|
||||||
* [dfget](cli-reference/dfget.md)
|
* [配置](deployment/configuration)
|
||||||
* [cdn](cli-reference/cdn.md)
|
* [故障排查](troubleshooting/README.md)
|
||||||
* [scheduler](cli-reference/scheduler.md)
|
* [CLI参考](cli-reference/README.md)
|
||||||
* [manager](cli-reference/manager.md)
|
* [dfget](cli-reference/dfget.md)
|
||||||
* [问题排查](troubleshooting/README.md)
|
* [cdn](cli-reference/cdn.md)
|
||||||
* [API 参考](#API参考)
|
* [scheduler](cli-reference/scheduler.md)
|
||||||
* [生态](#生态)
|
* [manager](cli-reference/manager.md)
|
||||||
* [Kubernetes 集成](ecosystem/Kubernetes-with-Dragonfly.md)
|
* [预热](preheat/README.md)
|
||||||
* [Harbor 集成](ecosystem/Harbor-with-Dragonfly.md)
|
* [Console](preheat/console.md)
|
||||||
* [开发者指南](#开发者指南)
|
* [Api](preheat/api.md)
|
||||||
* [设计文档](#设计文档)
|
* [运行时集成](runtime-integration/README.md)
|
||||||
* [测试指南](#测试指南)
|
* [containerd](runtime-integration/containerd/README.md)
|
||||||
|
* [cri-o](runtime-integration/cri-o.md)
|
||||||
## 如何贡献文档
|
* [docker](runtime-integration/docker.md)
|
||||||
|
* [架构设计](design/README.md)
|
||||||
在此页面中找到 `WIP` 或 `TODO` 并参考 [CONTRIBUTING](../../CONTRIBUTING.md)。
|
* [整体架构](design/architecture.md)
|
||||||
|
* [manager](design/manager.md)
|
||||||
## 快速开始
|
* [TODO scheduler](design/scheduler.md)
|
||||||
|
* [TODO cdn](design/cdn.md)
|
||||||
[快速开始](user-guide/quick-start.md) 如果您想尝试 Dragonfly,这正是您所需要的。本文件包括您需要做什么准备工作,
|
* [TODO dfdaemon](design/dfdaemon.md)
|
||||||
如何安装 Dragonfly 以及如何体验 Dragonfly 的使用。
|
* [开发者指南](developer-guide/developer-guide.md)
|
||||||
|
* [测试指南](test-guide/test-guide.md)
|
||||||
## 用户指南
|
* [API 参考](api-reference/api-reference.md)
|
||||||
|
|
||||||
[用户指南](user-guide) 帮助用户体验 Dragonfly 所需的各种指南。不仅仅是非常简短的 [快速开始]
|
|
||||||
(user-guide/quick-start.md),而且包括详细的安装和配置说明。此外,任何有助于用户更好地理解 Dragonfly 的概念也将包括在内。
|
|
||||||
|
|
||||||
## CLI参考
|
|
||||||
|
|
||||||
对于几乎所有用户,命令行是您可能需要的第一个参考。 [CLI Reference](cli-reference)目录下的文档是关于Dragonfly CLI的命令详细使用,包括`dfget`、`cdn`、`scheduler`和`manager`。您可以获得有关命令的介绍、概要、示例和选项。最后但同样重要的是,Dragonfly 可以保证命令行文档与 Dragonfly CLI 的源代码高度一致。更重要的是,所有命令行文档都是通过源代码自动生成的。
|
|
||||||
|
|
||||||
## API参考
|
|
||||||
|
|
||||||
命令行是体验 Dragonfly 能力的最简单方法。 API参考将为 Dragonfly 带来更多更进一步的体验。 Commandline只是API的一种组合用法,如果你想破解或利用Dragonfly的更多优势,请参见[API参考](/api/README.md)。与命令行文档一样,所有 API
|
|
||||||
文档都是通过源代码自动生成的。
|
|
||||||
|
|
||||||
## 生态
|
|
||||||
|
|
||||||
生态文档显示了 Dragonfly 与云原生生态系统中流行的工具或系统之间的联系。他们指导最终用户如何体验云
|
|
||||||
使用 Dragonfly 的原生系统,例如其他 CNCF 项目 [Kubernetes](ecosystem/Kubernetes-with-Dragonfly.md) 和 [Harbor](ecosystem/Harbor-with-Dragonfly.md)。
|
|
||||||
|
|
||||||
## 开发者指南
|
|
||||||
|
|
||||||
[开发者指南](development/local.md) 帮助(潜在的)开发者/贡献者理解 Dragonfly 内部的理论而不是它公开的接口。和
|
|
||||||
更好地理解 Dragonfly 的设计方式,开发人员可以更轻松地学习 Dragonfly 的源代码,并知道如何调试、测试和破解。
|
|
||||||
|
|
||||||
### 设计文档
|
|
||||||
|
|
||||||
[设计文档](./design/architecture.md) 是关于 Dragonfly 设计的内容。它包括一开始就考虑到的所有事情,为 Dragonfly 中所有组件设计的架构,组件之间的交互工作流,Dragonfly 中的所有 API 以及其他一些技术内容。
|
|
||||||
|
|
||||||
### 测试指南
|
|
||||||
|
|
||||||
[测试指南](./test-guide/test-guide.md) 是帮助贡献者了解如何设置测试环境并进行操作的最佳参考。目前我们可以将 Dragonfly 的测试分为四个维度:
|
|
||||||
|
|
||||||
* 单元测试;
|
|
||||||
* API集成测试;
|
|
||||||
* CLI集成测试;
|
|
||||||
* 节点 e2e 测试。
|
|
||||||
|
|
||||||
更多详情请参考[测试](./test-guide/test-guide.md)。
|
|
||||||
|
|
||||||
## 写在后面
|
|
||||||
|
|
||||||
文件夹`/docs` 没有完全包含有关蜻蜓的所有文档,在此 repo 的其他路径中还有其他非常有用的文档,例如:
|
|
||||||
|
|
||||||
* [TODO FAQ.md](./FAQ.md)
|
|
||||||
* [CHANGELOG.md](../../CHANGELOG.md)
|
|
||||||
* [TODO ROADMAP.md](./ROADMAP.md)
|
|
||||||
* 其他。
|
|
||||||
|
|
||||||
如果您正在搜索某个文档但没有找到,请不要犹豫 [提交问题](https://github.com/dragonflyoss/Dragonfly2/issues/new/choose) 寻求帮助。另外,如果您发现文档中有一些不正确的地方或错别字,请发起 Pull Request 以更正。
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
# CLI Reference
|
||||||
|
|
||||||
|
对于几乎所有用户,命令行是您可能需要的第一个参考。 [CLI Reference](cli-reference)目录下的文档是关于Dragonfly CLI的命令详细使用,包括`dfget`、`cdn`、`scheduler`和`manager`。您可以获得有关命令的介绍、概要、示例和选项。最后但同样重要的是,Dragonfly 可以保证命令行文档与 Dragonfly CLI 的源代码高度一致。更重要的是,所有命令行文档都是通过源代码自动生成的。
|
||||||
|
|
||||||
|
内容列表:
|
||||||
|
|
||||||
|
* [dfget](dfget.md)
|
||||||
|
* [cdn](cdn.md)
|
||||||
|
* [scheduler](scheduler.md)
|
||||||
|
* [manager](manager.md)
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
# 部署
|
||||||
|
|
||||||
|
内容:
|
||||||
|
|
||||||
|
* [安装](installation/README.md)
|
||||||
|
* [配置](configuration)
|
||||||
|
|
||||||
|
## 安装
|
||||||
|
|
||||||
|
安装文档为您提供了几个可以用部署 Dragonfly 的方式,例如 [Kubernetes](installation/kubernetes/README.md) 和 [Docker](installation/docker/README.md)。
|
||||||
|
|
||||||
|
## 配置
|
||||||
|
|
||||||
|
[配置](configuration) 是关于定制 Dragonfly 的所有内容。它包括所有组件的配置信息及其相应的解释。
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
# 安装
|
||||||
|
|
||||||
|
内容:
|
||||||
|
|
||||||
|
* [docker](docker/README.md)
|
||||||
|
* [executable-files](executable-files/README.md)
|
||||||
|
* [kubernetes](kubernetes/README.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# 安装
|
||||||
|
|
||||||
|
提供了有两种安装方法,建议使用 `docker-compose` 进行整体安装,或者按照模块分别安装。
|
||||||
|
|
||||||
|
安装选项:
|
||||||
|
|
||||||
|
* [Docker Compose](docker-compose.md)
|
||||||
|
* [Standalone](standalone/README.md)
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
# WIP Docker-Compose Support
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# 安装
|
||||||
|
|
||||||
|
有两种安装模式,推荐使用 Helm Charts 一次性整体安装,也可以各模块单独安装。
|
||||||
|
|
||||||
|
## 使用 Helm Charts 进行安装
|
||||||
|
|
||||||
|
> ArtifactHub 仓库链接为: https://artifacthub.io/packages/helm/dragonfly/dragonfly
|
||||||
|
|
||||||
|
推荐使用 Helm Charts 进行安装,简单且快捷。参考文档 [Kubernetes-with-Dragonfly](../../kubernetes/README.md)。
|
||||||
|
|
||||||
|
## 按模块单独安装
|
||||||
|
|
||||||
|
* [install-dfdaemon](./dfdaemon.md) 是 dfdaemon 的安装指南
|
||||||
|
|
||||||
|
* [install-manager](./manager.md) 是 manager 的安装指南
|
||||||
|
|
||||||
|
* [install-scheduler](./scheduler.md) 是 scheduler 的安装指南
|
||||||
|
|
||||||
|
* [install-cdn](./cdn.md) 是 CDN 的安装指南
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
# 安装 Dragonfly CDN
|
||||||
|
|
||||||
|
本文档阐述如何安装并启动 Dragonfly CDN。
|
||||||
|
|
||||||
|
## 环境要求
|
||||||
|
|
||||||
|
使用 Docker 部署时,以下条件必须满足:
|
||||||
|
|
||||||
|
所需软件 | 版本要求
|
||||||
|
---|---
|
||||||
|
Git|1.9.1+
|
||||||
|
Docker|1.12.0+
|
||||||
|
|
||||||
|
## 使用 Docker 部署
|
||||||
|
|
||||||
|
### 获取 CDN 镜像
|
||||||
|
|
||||||
|
您可以直接从 [DockerHub](https://hub.docker.com/) 获取 CDN 镜像。
|
||||||
|
|
||||||
|
1. 获取最新的 CDN 镜像
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull dragonflyoss/cdn
|
||||||
|
```
|
||||||
|
|
||||||
|
或者您可以构建自己的 CDN 镜像
|
||||||
|
|
||||||
|
1. 获取 Dragonfly 的源码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 打开项目文件夹
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd Dragonfly2
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 构建 CDN 的 Docker 镜像
|
||||||
|
|
||||||
|
```sh
|
||||||
|
TAG="2.0.0"
|
||||||
|
make docker-build-cdn D7Y_VERSION=$TAG
|
||||||
|
```
|
||||||
|
|
||||||
|
4. 获取最新的 CDN 镜像 ID
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker image ls | grep 'cdn' | awk '{print $3}' | head -n1
|
||||||
|
```
|
||||||
|
|
||||||
|
### 启动 cdn
|
||||||
|
|
||||||
|
**注意:** 需要使用上述步骤获得的 ID 替换 ${cdnDockerImageId}。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -d --name cdn --restart=always -p 8001:8001 -p 8003:8003 -v /home/admin/ftp:/home/admin/ftp ${cdnDockerImageId}
|
||||||
|
--download-port=8001
|
||||||
|
```
|
||||||
|
|
||||||
|
CDN 部署完成之后,运行以下命令以检查 Nginx 和 **cdn** 是否正在运行,以及 `8001` 和 `8003` 端口是否可用。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
telnet 127.0.0.1 8001
|
||||||
|
telnet 127.0.0.1 8003
|
||||||
|
```
|
||||||
|
|
@ -2,13 +2,6 @@
|
||||||
|
|
||||||
本文档阐述如何安装并启动 Dragonfly Dfdaemon。
|
本文档阐述如何安装并启动 Dragonfly Dfdaemon。
|
||||||
|
|
||||||
## 部署方式
|
|
||||||
|
|
||||||
用下列方式之一部署 dfdaemon:
|
|
||||||
|
|
||||||
- 通过 Docker 部署:推荐用于生产用途
|
|
||||||
- 直接在物理机上部署
|
|
||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
使用 Docker 部署时,以下条件必须满足:
|
使用 Docker 部署时,以下条件必须满足:
|
||||||
|
|
@ -18,14 +11,6 @@
|
||||||
Git|1.9.1+
|
Git|1.9.1+
|
||||||
Docker|1.12.0+
|
Docker|1.12.0+
|
||||||
|
|
||||||
直接在物理机上部署时,以下条件必须满足:
|
|
||||||
|
|
||||||
所需软件 | 版本要求
|
|
||||||
---|---
|
|
||||||
Git|1.9.1+
|
|
||||||
Golang|1.12.x
|
|
||||||
Nginx|0.8+
|
|
||||||
|
|
||||||
## 使用 Docker 部署
|
## 使用 Docker 部署
|
||||||
|
|
||||||
### 获取 dfdaemon 镜像
|
### 获取 dfdaemon 镜像
|
||||||
|
|
@ -90,58 +75,3 @@ telnet 127.0.0.1 65000
|
||||||
telnet 127.0.0.1 65001
|
telnet 127.0.0.1 65001
|
||||||
telnet 127.0.0.1 65002
|
telnet 127.0.0.1 65002
|
||||||
```
|
```
|
||||||
|
|
||||||
## 在物理机上部署
|
|
||||||
|
|
||||||
### 获取 dfget 可执行文件
|
|
||||||
|
|
||||||
1. 下载 Dragonfly 项目的压缩包。您可以从 [github releases page](https://github.
|
|
||||||
com/dragonflyoss/Dragonfly2/releases) 下载一个已发布的最近版本
|
|
||||||
|
|
||||||
```sh
|
|
||||||
version=2.0.0
|
|
||||||
wget https://github.com/dragonflyoss/Dragonfly2/releases/download/v$version/Dragonfly2_$version_linux_amd64.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 解压压缩包
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Replace `xxx` with the installation directory.
|
|
||||||
tar -zxf Dragonfly2_2.0.0_linux_amd64.tar.gz -C xxx
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 把 `dfget` 移动到环境变量 `PATH` 下以确保您可以直接使用 `dfget` 命令
|
|
||||||
|
|
||||||
或者您可以编译生成自己的 dfget 可执行文件。
|
|
||||||
|
|
||||||
1. 获取 Dragonfly 的源码
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 打开项目文件夹
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd Dragonfly2
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 编译源码
|
|
||||||
|
|
||||||
```sh
|
|
||||||
make build-dfget && make install-dfget
|
|
||||||
```
|
|
||||||
|
|
||||||
### 启动 dfdaemon
|
|
||||||
|
|
||||||
```sh
|
|
||||||
dfget dfdaemon --options
|
|
||||||
```
|
|
||||||
|
|
||||||
dfget 部署完成之后,运行以下命令以检查 **dfdaemon** 是否正在运行,以及 `65000`, `65001` 和 `65002` 端口是否可用。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
telnet 127.0.0.1 65000
|
|
||||||
telnet 127.0.0.1 65001
|
|
||||||
telnet 127.0.0.1 65002
|
|
||||||
```
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
# 安装 Dragonfly Manager
|
||||||
|
|
||||||
|
本文档阐述如何安装并启动 Dragonfly Manger。
|
||||||
|
|
||||||
|
## 环境要求
|
||||||
|
|
||||||
|
使用 Docker 部署时,以下条件必须满足:
|
||||||
|
|
||||||
|
所需软件 | 版本要求
|
||||||
|
---|---
|
||||||
|
Git|1.9.1+
|
||||||
|
Docker|1.12.0+
|
||||||
|
|
||||||
|
## 使用 Docker 部署
|
||||||
|
|
||||||
|
### 获取 Manager 镜像
|
||||||
|
|
||||||
|
您可以直接从 [DockerHub](https://hub.docker.com/) 获取 Manager 镜像。
|
||||||
|
|
||||||
|
1. 获取最新的 Manager 镜像
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull dragonflyoss/manager
|
||||||
|
```
|
||||||
|
|
||||||
|
或者您可以构建自己的 manager 镜像
|
||||||
|
|
||||||
|
1. 获取 Dragonfly 的源码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 打开项目文件夹
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd Dragonfly2
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 构建 manager 的 Docker 镜像
|
||||||
|
|
||||||
|
```sh
|
||||||
|
TAG="2.0.0"
|
||||||
|
make docker-build-manager D7Y_VERSION=$TAG
|
||||||
|
```
|
||||||
|
|
||||||
|
4. 获取最新的 manager 镜像 ID
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker image ls | grep 'manager' | awk '{print $3}' | head -n1
|
||||||
|
```
|
||||||
|
|
||||||
|
### 启动 manager
|
||||||
|
|
||||||
|
**注意:** 需要使用上述步骤获得的 ID 替换 ${managerDockerImageId}。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -d --name manager --restart=always -p 8080:8080 -p 65003:65003 ${managerDockerImageId}
|
||||||
|
```
|
||||||
|
|
||||||
|
manager 部署完成之后,运行以下命令以检查 **manager** 是否正在运行,以及 `8080` 和 `65003` 端口是否可用。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
telnet 127.0.0.1 8080
|
||||||
|
telnet 127.0.0.1 65003
|
||||||
|
```
|
||||||
|
|
||||||
|
### 控制台
|
||||||
|
|
||||||
|
现在可以打开浏览器,访问控制台 [console](http://localhost:8080)。
|
||||||
|
|
||||||
|
控制台功能预览参考文档 [console preview](../../user-guide/console/preview.md)。
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
# 安装 Dragonfly Scheduler
|
||||||
|
|
||||||
|
本文档阐述如何安装并启动 Dragonfly Scheduler。
|
||||||
|
|
||||||
|
## 环境要求
|
||||||
|
|
||||||
|
使用 Docker 部署时,以下条件必须满足:
|
||||||
|
|
||||||
|
所需软件 | 版本要求
|
||||||
|
---|---
|
||||||
|
Git|1.9.1+
|
||||||
|
Docker|1.12.0+
|
||||||
|
|
||||||
|
## 使用 Docker 部署
|
||||||
|
|
||||||
|
### 获取 scheduler 镜像
|
||||||
|
|
||||||
|
您可以直接从 [DockerHub](https://hub.docker.com/) 获取 scheduler 镜像。
|
||||||
|
|
||||||
|
1. 获取最新的 scheduler 镜像
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull dragonflyoss/scheduler
|
||||||
|
```
|
||||||
|
|
||||||
|
或者您可以构建自己的 scheduler 镜像
|
||||||
|
|
||||||
|
1. 获取 Dragonfly 的源码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 打开项目文件夹
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd Dragonfly2
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 构建 scheduler 的 Docker 镜像
|
||||||
|
|
||||||
|
```sh
|
||||||
|
TAG="2.0.0"
|
||||||
|
make docker-build-scheduler D7Y_VERSION=$TAG
|
||||||
|
```
|
||||||
|
|
||||||
|
4. 获取最新的 scheduler 镜像 ID
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker image ls | grep 'scheduler' | awk '{print $3}' | head -n1
|
||||||
|
```
|
||||||
|
|
||||||
|
### 启动 scheduler
|
||||||
|
|
||||||
|
**注意:** 需要使用上述步骤获得的 ID 替换 ${schedulerDockerImageId}。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -d --name scheduler --restart=always -p 8002:8002 ${schedulerDockerImageId}
|
||||||
|
```
|
||||||
|
|
||||||
|
scheduler 部署完成之后,运行以下命令以检查 **scheduler** 是否正在运行,以及 `8002` 端口是否可用。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
telnet 127.0.0.1 8002
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
# 安装
|
||||||
|
|
||||||
|
通过可执行文件分模块进行安装。
|
||||||
|
|
||||||
|
## 按模块单独安装
|
||||||
|
|
||||||
|
* [install-dfdaemon](dfdaemon.md) 是 dfdaemon 的安装指南
|
||||||
|
|
||||||
|
* [install-manager](manager.md) 是 manager 的安装指南
|
||||||
|
|
||||||
|
* [install-scheduler](scheduler.md) 是 scheduler 的安装指南
|
||||||
|
|
||||||
|
* [install-cdn](cdn.md) 是 CDN 的安装指南
|
||||||
|
|
@ -2,22 +2,8 @@
|
||||||
|
|
||||||
本文档阐述如何安装并启动 Dragonfly CDN。
|
本文档阐述如何安装并启动 Dragonfly CDN。
|
||||||
|
|
||||||
## 部署方式
|
|
||||||
|
|
||||||
用下列方式之一部署 CDN:
|
|
||||||
|
|
||||||
- 通过 Docker 部署
|
|
||||||
- 直接在物理机上部署:推荐用于生产用途
|
|
||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
使用 Docker 部署时,以下条件必须满足:
|
|
||||||
|
|
||||||
所需软件 | 版本要求
|
|
||||||
---|---
|
|
||||||
Git|1.9.1+
|
|
||||||
Docker|1.12.0+
|
|
||||||
|
|
||||||
直接在物理机上部署时,以下条件必须满足:
|
直接在物理机上部署时,以下条件必须满足:
|
||||||
|
|
||||||
所需软件 | 版本要求
|
所需软件 | 版本要求
|
||||||
|
|
@ -26,61 +12,6 @@ Git|1.9.1+
|
||||||
Golang|1.12.x
|
Golang|1.12.x
|
||||||
Nginx|0.8+
|
Nginx|0.8+
|
||||||
|
|
||||||
## 使用 Docker 部署
|
|
||||||
|
|
||||||
### 获取 CDN 镜像
|
|
||||||
|
|
||||||
您可以直接从 [DockerHub](https://hub.docker.com/) 获取 CDN 镜像。
|
|
||||||
|
|
||||||
1. 获取最新的 CDN 镜像
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker pull dragonflyoss/cdn
|
|
||||||
```
|
|
||||||
|
|
||||||
或者您可以构建自己的 CDN 镜像
|
|
||||||
|
|
||||||
1. 获取 Dragonfly 的源码
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 打开项目文件夹
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd Dragonfly2
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 构建 CDN 的 Docker 镜像
|
|
||||||
|
|
||||||
```sh
|
|
||||||
TAG="2.0.0"
|
|
||||||
make docker-build-cdn D7Y_VERSION=$TAG
|
|
||||||
```
|
|
||||||
|
|
||||||
4. 获取最新的 CDN 镜像 ID
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker image ls | grep 'cdn' | awk '{print $3}' | head -n1
|
|
||||||
```
|
|
||||||
|
|
||||||
### 启动 cdn
|
|
||||||
|
|
||||||
**注意:** 需要使用上述步骤获得的 ID 替换 ${cdnDockerImageId}。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run -d --name cdn --restart=always -p 8001:8001 -p 8003:8003 -v /home/admin/ftp:/home/admin/ftp ${cdnDockerImageId}
|
|
||||||
--download-port=8001
|
|
||||||
```
|
|
||||||
|
|
||||||
CDN 部署完成之后,运行以下命令以检查 Nginx 和 **cdn** 是否正在运行,以及 `8001` 和 `8003` 端口是否可用。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
telnet 127.0.0.1 8001
|
|
||||||
telnet 127.0.0.1 8003
|
|
||||||
```
|
|
||||||
|
|
||||||
## 在物理机上部署
|
## 在物理机上部署
|
||||||
|
|
||||||
### 获取 CDN 可执行文件
|
### 获取 CDN 可执行文件
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
# 安装 Dragonfly Dfdaemon
|
||||||
|
|
||||||
|
本文档阐述如何安装并启动 Dragonfly Dfdaemon。
|
||||||
|
|
||||||
|
## 环境要求
|
||||||
|
|
||||||
|
直接在物理机上部署时,以下条件必须满足:
|
||||||
|
|
||||||
|
所需软件 | 版本要求
|
||||||
|
---|---
|
||||||
|
Git|1.9.1+
|
||||||
|
Golang|1.12.x
|
||||||
|
|
||||||
|
## 在物理机上部署
|
||||||
|
|
||||||
|
### 获取 dfget 可执行文件
|
||||||
|
|
||||||
|
1. 下载 Dragonfly 项目的压缩包。您可以从 [github releases page](https://github.
|
||||||
|
com/dragonflyoss/Dragonfly2/releases) 下载一个已发布的最近版本
|
||||||
|
|
||||||
|
```sh
|
||||||
|
version=2.0.0
|
||||||
|
wget https://github.com/dragonflyoss/Dragonfly2/releases/download/v$version/Dragonfly2_$version_linux_amd64.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 解压压缩包
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Replace `xxx` with the installation directory.
|
||||||
|
tar -zxf Dragonfly2_2.0.0_linux_amd64.tar.gz -C xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 把 `dfget` 移动到环境变量 `PATH` 下以确保您可以直接使用 `dfget` 命令
|
||||||
|
|
||||||
|
或者您可以编译生成自己的 dfget 可执行文件。
|
||||||
|
|
||||||
|
1. 获取 Dragonfly 的源码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 打开项目文件夹
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd Dragonfly2
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 编译源码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make build-dfget && make install-dfget
|
||||||
|
```
|
||||||
|
|
||||||
|
### 启动 dfdaemon
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dfget dfdaemon --options
|
||||||
|
```
|
||||||
|
|
||||||
|
dfget 部署完成之后,运行以下命令以检查 **dfdaemon** 是否正在运行,以及 `65000`, `65001` 和 `65002` 端口是否可用。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
telnet 127.0.0.1 65000
|
||||||
|
telnet 127.0.0.1 65001
|
||||||
|
telnet 127.0.0.1 65002
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
# 安装 Dragonfly Manager
|
||||||
|
|
||||||
|
本文档阐述如何安装并启动 Dragonfly Manger。
|
||||||
|
|
||||||
|
## 环境要求
|
||||||
|
|
||||||
|
直接在物理机上部署时,以下条件必须满足:
|
||||||
|
|
||||||
|
所需软件 | 版本要求
|
||||||
|
---|---
|
||||||
|
Git|1.9.1+
|
||||||
|
Golang|1.12.x
|
||||||
|
Nginx|0.8+
|
||||||
|
|
||||||
|
## 在物理机上部署
|
||||||
|
|
||||||
|
### 获取 manager 可执行文件
|
||||||
|
|
||||||
|
1. 下载 Dragonfly 项目的压缩包。您可以从 [github releases page](https://github.
|
||||||
|
com/dragonflyoss/Dragonfly2/releases) 下载一个已发布的最近版本
|
||||||
|
|
||||||
|
```sh
|
||||||
|
version=2.0.0
|
||||||
|
wget https://github.com/dragonflyoss/Dragonfly2/releases/download/v$version/Dragonfly2_$version_linux_amd64.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 解压压缩包
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Replace `xxx` with the installation directory.
|
||||||
|
tar -zxf Dragonfly2_2.0.0_linux_amd64.tar.gz -C xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 把 `manager` 移动到环境变量 `PATH` 下以确保您可以直接使用 `manager` 命令
|
||||||
|
|
||||||
|
或者您可以编译生成自己的 manager 可执行文件。
|
||||||
|
|
||||||
|
1. 获取 Dragonfly 的源码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 打开项目文件夹
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd Dragonfly2
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 编译源码
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make build-manager && make install-manager
|
||||||
|
```
|
||||||
|
|
||||||
|
### 启动 manager
|
||||||
|
|
||||||
|
```sh
|
||||||
|
manager --options
|
||||||
|
```
|
||||||
|
|
||||||
|
manager 部署完成之后,运行以下命令以检查 **manager** 是否正在运行,以及 `8080` 和 `65003` 端口是否可用。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
telnet 127.0.0.1 8080
|
||||||
|
telnet 127.0.0.1 65003
|
||||||
|
```
|
||||||
|
|
||||||
|
### 控制台
|
||||||
|
|
||||||
|
可以在 `localhost:8080` 访问控制台。
|
||||||
|
|
||||||
|
控制台功能预览参考文档 [console preview](../../../design/manager.md)。
|
||||||
|
|
@ -2,22 +2,8 @@
|
||||||
|
|
||||||
本文档阐述如何安装并启动 Dragonfly Scheduler。
|
本文档阐述如何安装并启动 Dragonfly Scheduler。
|
||||||
|
|
||||||
## 部署方式
|
|
||||||
|
|
||||||
用下列方式之一部署 scheduler:
|
|
||||||
|
|
||||||
- 通过 Docker 部署:推荐用于生产用途
|
|
||||||
- 直接在物理机上部署
|
|
||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
使用 Docker 部署时,以下条件必须满足:
|
|
||||||
|
|
||||||
所需软件 | 版本要求
|
|
||||||
---|---
|
|
||||||
Git|1.9.1+
|
|
||||||
Docker|1.12.0+
|
|
||||||
|
|
||||||
直接在物理机上部署时,以下条件必须满足:
|
直接在物理机上部署时,以下条件必须满足:
|
||||||
|
|
||||||
所需软件 | 版本要求
|
所需软件 | 版本要求
|
||||||
|
|
@ -26,59 +12,6 @@ Git|1.9.1+
|
||||||
Golang|1.12.x
|
Golang|1.12.x
|
||||||
Nginx|0.8+
|
Nginx|0.8+
|
||||||
|
|
||||||
## 使用 Docker 部署
|
|
||||||
|
|
||||||
### 获取 scheduler 镜像
|
|
||||||
|
|
||||||
您可以直接从 [DockerHub](https://hub.docker.com/) 获取 scheduler 镜像。
|
|
||||||
|
|
||||||
1. 获取最新的 scheduler 镜像
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker pull dragonflyoss/scheduler
|
|
||||||
```
|
|
||||||
|
|
||||||
或者您可以构建自己的 scheduler 镜像
|
|
||||||
|
|
||||||
1. 获取 Dragonfly 的源码
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 打开项目文件夹
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd Dragonfly2
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 构建 scheduler 的 Docker 镜像
|
|
||||||
|
|
||||||
```sh
|
|
||||||
TAG="2.0.0"
|
|
||||||
make docker-build-scheduler D7Y_VERSION=$TAG
|
|
||||||
```
|
|
||||||
|
|
||||||
4. 获取最新的 scheduler 镜像 ID
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker image ls | grep 'scheduler' | awk '{print $3}' | head -n1
|
|
||||||
```
|
|
||||||
|
|
||||||
### 启动 scheduler
|
|
||||||
|
|
||||||
**注意:** 需要使用上述步骤获得的 ID 替换 ${schedulerDockerImageId}。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run -d --name scheduler --restart=always -p 8002:8002 ${schedulerDockerImageId}
|
|
||||||
```
|
|
||||||
|
|
||||||
scheduler 部署完成之后,运行以下命令以检查 **scheduler** 是否正在运行,以及 `8002` 端口是否可用。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
telnet 127.0.0.1 8002
|
|
||||||
```
|
|
||||||
|
|
||||||
## 在物理机上部署
|
## 在物理机上部署
|
||||||
|
|
||||||
### 获取 scheduler 可执行文件
|
### 获取 scheduler 可执行文件
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
# Dragonfly 部署 kubernetes 集群
|
||||||
|
|
||||||
|
下面会解释如何在 Kubernetes 集群内部署 Dragonfly。Dragonfly 部署具体模块包括 4 部分: scheduler 和 cdn 会作为 `StatefulSets` 部署, dfdaemon 会作为 `DaemonSets` 部署, manager 会作为 `Deployments` 部署。
|
||||||
|
|
||||||
|
部署方式:
|
||||||
|
|
||||||
|
* [Helm](helm.md)
|
||||||
|
* [Kustomize](kustomize.md)
|
||||||
|
* [TODO Upgrade Guide](upgrade-guide.md)
|
||||||
|
|
@ -1,20 +1,10 @@
|
||||||
# Dragonfly 部署 kubernetes 集群
|
# Helm 部署
|
||||||
|
|
||||||
下面会解释如何在 Kubernetes 集群内部署 Dragonfly。Dragonfly 部署具体模块包括 4 部分: scheduler 和 cdn 会作为 `StatefulSets` 部署, dfdaemon 会作为 `DaemonSets` 部署, manager 会作为 `Deployments` 部署。
|
## Helm Chart 运行时配置
|
||||||
|
|
||||||
部署方式:
|
当使用 Helm Chart 运行时配置时,可以忽略 [运行时配置](#运行时配置) 章节。因为 Helm Chart 安装时会自动帮助改变 Docker、Containerd 等配置, 无需再手动配置。
|
||||||
|
|
||||||
* [Helm](#helm-support)
|
### 1. Docker
|
||||||
* [Kustomize](#kustomize-support)
|
|
||||||
* [TODO Upgrade Guide](#upgrade-guide)
|
|
||||||
|
|
||||||
## Helm 部署
|
|
||||||
|
|
||||||
### Helm Chart 运行时配置
|
|
||||||
|
|
||||||
当使用 Helm Chart 运行时配置时,可以忽略 [运行时配置](#configure-runtime-manually) 章节。因为 Helm Chart 安装时会自动帮助改变 Docker、Containerd 等配置, 无需再手动配置。
|
|
||||||
|
|
||||||
#### 1. Docker
|
|
||||||
|
|
||||||
> **不推荐在 docker 环境中使用蜻蜓**:1. 拉镜像没有 fallback 机制,2. 在未来的 Kubernetes 中已经废弃。
|
> **不推荐在 docker 环境中使用蜻蜓**:1. 拉镜像没有 fallback 机制,2. 在未来的 Kubernetes 中已经废弃。
|
||||||
>
|
>
|
||||||
|
|
@ -43,12 +33,6 @@ containerRuntime:
|
||||||
- "harbor.example.net"
|
- "harbor.example.net"
|
||||||
```
|
```
|
||||||
|
|
||||||
When upgrade dfdaemon, the old pods will be deleted and the injected hosts info will be removed,
|
|
||||||
then docker will pull image without dragonfly, finally, the new pods will be created.
|
|
||||||
|
|
||||||
Advantages:
|
|
||||||
* Support upgrade dfdaemon smoothness
|
|
||||||
|
|
||||||
此配置允许 docker 通过 Dragonfly 拉取 `harbor.example.com` 和 `harbor.example.net` 域名镜像。
|
此配置允许 docker 通过 Dragonfly 拉取 `harbor.example.com` 和 `harbor.example.net` 域名镜像。
|
||||||
使用上述配置部署 Dragonfly 时,无需重新启动 docker。
|
使用上述配置部署 Dragonfly 时,无需重新启动 docker。
|
||||||
|
|
||||||
|
|
@ -80,7 +64,7 @@ containerRuntime:
|
||||||
* 必须开启 docker 的 `live-restore` 功能
|
* 必须开启 docker 的 `live-restore` 功能
|
||||||
* 需要重启 docker daemon
|
* 需要重启 docker daemon
|
||||||
|
|
||||||
#### 2. Containerd
|
### 2. Containerd
|
||||||
|
|
||||||
Containerd 的配置有两个版本,字段复杂。有很多情况需要考虑:
|
Containerd 的配置有两个版本,字段复杂。有很多情况需要考虑:
|
||||||
|
|
||||||
|
|
@ -141,7 +125,7 @@ containerRuntime:
|
||||||
enable: true
|
enable: true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 3. [WIP] CRI-O
|
### 3. [WIP] CRI-O
|
||||||
|
|
||||||
> 请勿使用,开发中。
|
> 请勿使用,开发中。
|
||||||
|
|
||||||
|
|
@ -162,20 +146,20 @@ containerRuntime:
|
||||||
- "https://harbor.example.com:8443"
|
- "https://harbor.example.com:8443"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 准备 Kubernetes 集群
|
## 准备 Kubernetes 集群
|
||||||
|
|
||||||
如果没有可用的 Kubernetes 集群进行测试,推荐使用 [minikube](https://minikube.sigs.k8s.io/docs/start/)。只需运行`minikube start`。
|
如果没有可用的 Kubernetes 集群进行测试,推荐使用 [minikube](https://minikube.sigs.k8s.io/docs/start/)。只需运行`minikube start`。
|
||||||
|
|
||||||
### 安装 Dragonfly
|
## 安装 Dragonfly
|
||||||
|
|
||||||
#### 默认配置安装
|
### 默认配置安装
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
helm repo add dragonfly https://dragonflyoss.github.io/helm-charts/
|
helm repo add dragonfly https://dragonflyoss.github.io/helm-charts/
|
||||||
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly
|
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 自定义配置安装
|
### 自定义配置安装
|
||||||
|
|
||||||
创建 `values.yaml` 配置文件。建议使用外部 redis 和 mysql 代替容器启动。
|
创建 `values.yaml` 配置文件。建议使用外部 redis 和 mysql 代替容器启动。
|
||||||
|
|
||||||
|
|
@ -209,7 +193,7 @@ helm repo add dragonfly https://dragonflyoss.github.io/helm-charts/
|
||||||
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly -f values.yaml
|
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly -f values.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 安装 Drgonfly 使用已经部署的 manager
|
### 安装 Drgonfly 使用已经部署的 manager
|
||||||
|
|
||||||
创建 `values.yaml` 配置文件。需要配置 scheduler 和 cdn 关联的对应集群的 id。
|
创建 `values.yaml` 配置文件。需要配置 scheduler 和 cdn 关联的对应集群的 id。
|
||||||
|
|
||||||
|
|
@ -256,19 +240,19 @@ mysql:
|
||||||
kubectl -n dragonfly-system wait --for=condition=ready --all --timeout=10m pod
|
kubectl -n dragonfly-system wait --for=condition=ready --all --timeout=10m pod
|
||||||
```
|
```
|
||||||
|
|
||||||
### Manager 控制台
|
## Manager 控制台
|
||||||
|
|
||||||
控制台页面会在 `dragonfly-manager.dragonfly-system.svc.cluster.local:8080` 展示。
|
控制台页面会在 `dragonfly-manager.dragonfly-system.svc.cluster.local:8080` 展示。
|
||||||
|
|
||||||
需要绑定 Ingress 可以参考 [Helm Charts 配置选项](https://artifacthub.io/packages/helm/dragonfly/dragonfly#values), 或者手动自行创建 Ingress。
|
需要绑定 Ingress 可以参考 [Helm Charts 配置选项](https://artifacthub.io/packages/helm/dragonfly/dragonfly#values), 或者手动自行创建 Ingress。
|
||||||
|
|
||||||
控制台功能预览参考文档 [console preview](../user-guide/console/preview.md)。
|
控制台功能预览参考文档 [console preview](../../../design/manager.md)。
|
||||||
|
|
||||||
### 运行时配置
|
## 运行时配置
|
||||||
|
|
||||||
以 Containerd 和 CRI 为例,更多运行时[文档](../user-guide/quick-start.md)
|
以 Containerd 和 CRI 为例,更多运行时[文档](../../../quick-start.md)
|
||||||
|
|
||||||
> 例子为单镜像仓库配置,多镜像仓库配置参考[文档](../user-guide/registry-mirror/cri-containerd.md)
|
> 例子为单镜像仓库配置,多镜像仓库配置参考[文档](../../../runtime-integration)
|
||||||
|
|
||||||
私有仓库:
|
私有仓库:
|
||||||
|
|
||||||
|
|
@ -294,7 +278,7 @@ endpoint = ["http://127.0.0.1:65001", "https://registry-1.docker.io"]
|
||||||
systemctl restart containerd
|
systemctl restart containerd
|
||||||
```
|
```
|
||||||
|
|
||||||
### 使用 Dragonfly
|
## 使用 Dragonfly
|
||||||
|
|
||||||
以上步骤执行完毕,可以使用 `crictl` 命令拉取镜像:
|
以上步骤执行完毕,可以使用 `crictl` 命令拉取镜像:
|
||||||
|
|
||||||
|
|
@ -321,32 +305,3 @@ kubectl -n dragonfly-system exec -it ${pod_name} -- grep "peer task done" /var/l
|
||||||
```
|
```
|
||||||
{"level":"info","ts":"2021-06-28 06:02:30.924","caller":"peer/peertask_stream_callback.go:77","msg":"stream peer task done, cost: 2838ms","peer":"172.17.0.9-1-ed7a32ae-3f18-4095-9f54-6ccfc248b16e","task":"3c658c488fd0868847fab30976c2a079d8fd63df148fb3b53fd1a418015723d7","component":"streamPeerTask"}
|
{"level":"info","ts":"2021-06-28 06:02:30.924","caller":"peer/peertask_stream_callback.go:77","msg":"stream peer task done, cost: 2838ms","peer":"172.17.0.9-1-ed7a32ae-3f18-4095-9f54-6ccfc248b16e","task":"3c658c488fd0868847fab30976c2a079d8fd63df148fb3b53fd1a418015723d7","component":"streamPeerTask"}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Kustomize 支持
|
|
||||||
|
|
||||||
### 准备 Kubernetes 集群
|
|
||||||
|
|
||||||
如果没有可用的 Kubernetes 集群进行测试,推荐使用 [minikube](https://minikube.sigs.k8s.io/docs/start/)。只需运行`minikube start`。
|
|
||||||
|
|
||||||
### 构建 Kustomize 模版并部署
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
|
||||||
kustomize build Dragonfly2/deploy/kustomize/single-cluster-native/overlays/sample | kubectl apply -f -
|
|
||||||
```
|
|
||||||
|
|
||||||
### 等待部署成功
|
|
||||||
|
|
||||||
等待所有的服务运行成功。
|
|
||||||
|
|
||||||
```shell
|
|
||||||
kubectl -n dragonfly-system wait --for=condition=ready --all --timeout=10m pod
|
|
||||||
```
|
|
||||||
|
|
||||||
### 下一步
|
|
||||||
|
|
||||||
按照[文档](#configure-runtime-manually)来配置运行时。
|
|
||||||
|
|
||||||
按照[文档](#configure-runtime-manually)来使用 Dragonfly。
|
|
||||||
|
|
||||||
## 升级指南
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
# Kustomize 支持
|
||||||
|
|
||||||
|
## 准备 Kubernetes 集群
|
||||||
|
|
||||||
|
如果没有可用的 Kubernetes 集群进行测试,推荐使用 [minikube](https://minikube.sigs.k8s.io/docs/start/)。只需运行`minikube start`。
|
||||||
|
|
||||||
|
## 构建 Kustomize 模版并部署
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
||||||
|
kustomize build Dragonfly2/deploy/kustomize/single-cluster-native/overlays/sample | kubectl apply -f -
|
||||||
|
```
|
||||||
|
|
||||||
|
## 等待部署成功
|
||||||
|
|
||||||
|
等待所有的服务运行成功。
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl -n dragonfly-system wait --for=condition=ready --all --timeout=10m pod
|
||||||
|
```
|
||||||
|
|
||||||
|
## Manager 控制台
|
||||||
|
|
||||||
|
控制台页面会在 `dragonfly-manager.dragonfly-system.svc.cluster.local:8080` 展示。
|
||||||
|
|
||||||
|
需要绑定 Ingress 可以参考 [Helm Charts 配置选项](https://artifacthub.io/packages/helm/dragonfly/dragonfly#values), 或者手动自行创建 Ingress。
|
||||||
|
|
||||||
|
控制台功能预览参考文档 [console preview](../../../design/manager.md)。
|
||||||
|
|
||||||
|
## 运行时配置
|
||||||
|
|
||||||
|
以 Containerd 和 CRI 为例,更多运行时[文档](../../../quick-start.md)
|
||||||
|
|
||||||
|
> 例子为单镜像仓库配置,多镜像仓库配置参考[文档](../../../runtime-integration)
|
||||||
|
|
||||||
|
私有仓库:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# explicitly use v2 config format, if already v2, skip the "version = 2"
|
||||||
|
version = 2
|
||||||
|
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."harbor.example.com"]
|
||||||
|
endpoint = ["http://127.0.0.1:65001", "https://harbor.example.com"]
|
||||||
|
```
|
||||||
|
|
||||||
|
dockerhub 官方仓库:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# explicitly use v2 config format, if already v2, skip the "version = 2"
|
||||||
|
version = 2
|
||||||
|
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
|
||||||
|
endpoint = ["http://127.0.0.1:65001", "https://registry-1.docker.io"]
|
||||||
|
```
|
||||||
|
|
||||||
|
增加配置到 `/etc/containerd/config.toml` 文件并重启 Containerd。
|
||||||
|
|
||||||
|
```shell
|
||||||
|
systemctl restart containerd
|
||||||
|
```
|
||||||
|
|
||||||
|
## 使用 Dragonfly
|
||||||
|
|
||||||
|
以上步骤执行完毕,可以使用 `crictl` 命令拉取镜像:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
crictl harbor.example.com/library/alpine:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
crictl pull docker.io/library/alpine:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
拉取镜像后可以在 dfdaemon 查询日志:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# find pods
|
||||||
|
kubectl -n dragonfly-system get pod -l component=dfdaemon
|
||||||
|
# find logs
|
||||||
|
pod_name=dfdaemon-xxxxx
|
||||||
|
kubectl -n dragonfly-system exec -it ${pod_name} -- grep "peer task done" /var/log/dragonfly/daemon/core.log
|
||||||
|
```
|
||||||
|
|
||||||
|
日志输出例子:
|
||||||
|
|
||||||
|
```
|
||||||
|
{"level":"info","ts":"2021-06-28 06:02:30.924","caller":"peer/peertask_stream_callback.go:77","msg":"stream peer task done, cost: 2838ms","peer":"172.17.0.9-1-ed7a32ae-3f18-4095-9f54-6ccfc248b16e","task":"3c658c488fd0868847fab30976c2a079d8fd63df148fb3b53fd1a418015723d7","component":"streamPeerTask"}
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
# WIP Upgrade guide
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Design
|
||||||
|
|
||||||
|
这里包含了所有关于 Dragonfly 的设计内容。它包括从最初设计时就考虑到的所有事情, Dragonfly 的所有组件设计的架构,组件之间的交互工作流程,Dragonfly 的所有 API 以及其他一些技术性的东西。
|
||||||
|
|
||||||
|
具体设计:
|
||||||
|
|
||||||
|
* [architecture](architecture.md)
|
||||||
|
* [manager](manager.md)
|
||||||
|
* [TODO scheduler](scheduler.md)
|
||||||
|
* [TODO cdn](cdn.md)
|
||||||
|
* [TODO dfdaemon](dfdaemon.md)
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
# WIP CDN
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
# WIP Dfdaemon
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
# Manager 控制台
|
# Manager
|
||||||
|
|
||||||
Manager 控制台方便用户控制集群各模块服务,并且提供动态配置以及数据收集等功能。
|
Manager 控制台方便用户控制集群各模块服务,并且提供动态配置以及数据收集等功能。
|
||||||
|
|
||||||
## 关系模型
|
## 关系模型
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="../../../en/images/manager-console/relationship.jpg" width="500" title="manager-relationship">
|
<img src="../../en/images/manager-console/relationship.jpg" width="500" title="manager-relationship">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
- CDN 集群与 Scheduler 集群为一对多关系
|
- CDN 集群与 Scheduler 集群为一对多关系
|
||||||
- CDN 集群与 CDN 实例是一对多关系
|
- CDN 集群与 CDN 实例是一对多关系
|
||||||
- Scheduler 集群与 Scheduler 实例是一对多关系
|
- Scheduler 集群与 Scheduler 实例是一对多关系
|
||||||
|
|
||||||
Scheduler 实例信息通过,配置文件启动实例上报指定 Scheduler 集群 ID。参考[文档配置](../../config/scheduler.yaml) `schedulerClusterID`。
|
Scheduler 实例信息通过,配置文件启动实例上报指定 Scheduler 集群 ID。参考[文档配置](../deployment/configuration/scheduler.yaml) `schedulerClusterID`。
|
||||||
|
|
||||||
CDN 实例信息通过,配置文件启动实例上报指定 CDN 集群 ID。参考[文档配置](../../config/cdn.yaml) `cdnClusterID`。
|
CDN 实例信息通过,配置文件启动实例上报指定 CDN 集群 ID。参考[文档配置](../deployment/configuration/cdn.yaml) `cdnClusterID`。
|
||||||
|
|
||||||
## 用户账号
|
## 用户账号
|
||||||
|
|
||||||
|
|
@ -47,13 +47,13 @@ CDN 实例信息通过,配置文件启动实例上报指定 CDN 集群 ID。
|
||||||
##### 配置 Scheduler 集群
|
##### 配置 Scheduler 集群
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img width="500" height="500" src="../../../en/images/manager-console/configure-scheduler-cluster.jpg">
|
<img width="500" height="500" src="../../en/images/manager-console/configure-scheduler-cluster.jpg">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
##### 配置 Scheduler 集群覆盖的客户端
|
##### 配置 Scheduler 集群覆盖的客户端
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img width="500" height="500" src="../../../en/images/manager-console/configure-scheduler-cluster-client.jpg">
|
<img width="500" height="500" src="../../en/images/manager-console/configure-scheduler-cluster-client.jpg">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- `load_limit`: 客户端可以提供的最大下载任务负载数。
|
- `load_limit`: 客户端可以提供的最大下载任务负载数。
|
||||||
|
|
@ -71,14 +71,14 @@ CDN 实例信息通过,配置文件启动实例上报指定 CDN 集群 ID。
|
||||||
##### 配置 CDN 集群
|
##### 配置 CDN 集群
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img width="500" height="500" src="../../../en/images/manager-console/configure-cdn-cluster.jpg">
|
<img width="500" height="500" src="../../en/images/manager-console/configure-cdn-cluster.jpg">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- `load_limit`: CDN 可以提供的最大下载任务负载数。
|
- `load_limit`: CDN 可以提供的最大下载任务负载数。
|
||||||
|
|
||||||
[signin]: ../../../en/images/manager-console/signin.jpg
|
[signin]: ../../en/images/manager-console/signin.jpg
|
||||||
[signup]: ../../../en/images/manager-console/signup.jpg
|
[signup]: ../../en/images/manager-console/signup.jpg
|
||||||
[scheduler-cluster]: ../../../en/images/manager-console/scheduler-cluster.jpg
|
[scheduler-cluster]: ../../en/images/manager-console/scheduler-cluster.jpg
|
||||||
[add-scheduler-cluster]: ../../../en/images/manager-console/add-scheduler-cluster.jpg
|
[add-scheduler-cluster]: ../../en/images/manager-console/add-scheduler-cluster.jpg
|
||||||
[cdn-cluster]: ../../../en/images/manager-console/cdn-cluster.jpg
|
[cdn-cluster]: ../../en/images/manager-console/cdn-cluster.jpg
|
||||||
[add-cdn-cluster]: ../../../en/images/manager-console/add-cdn-cluster.jpg
|
[add-cdn-cluster]: ../../en/images/manager-console/add-cdn-cluster.jpg
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
# WIP Scheduler
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# [WIP] Harbor 和 Dragonfly 集成
|
|
||||||
|
|
||||||
文档会解释如何使 dragonfly 和 harbor 进行集成。
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# 预热
|
||||||
|
|
||||||
|
P2P 加速可预热两种类型数据 `image` 和 `file`, 用户可以在控制台操作或者直接调用 api 进行预热。
|
||||||
|
|
||||||
|
预热方式:
|
||||||
|
|
||||||
|
* [Console](console.md)
|
||||||
|
* [Api](api.md)
|
||||||
|
|
@ -1,14 +1,6 @@
|
||||||
# 预热
|
# API
|
||||||
|
|
||||||
P2P 加速可预热两种类型数据 `image` 和 `file`, 用户可以在控制台操作或者直接调用 api 进行预热。
|
用户使用 api 进行预热。首先发送 POST 请求创建预热任务,具体 api 可以参考文档 [create job api document](../api-reference/api-reference.md#create-job)。
|
||||||
|
|
||||||
## Console
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
用户使用 api 进行预热。首先发送 POST 请求创建预热任务,具体 api 可以参考文档 [create job api document](../../api/api.md#create-job)。
|
|
||||||
|
|
||||||
如果 `scheduler_cluster_ids` 不存在,表示对所有 scheduler cluster 进行预热。
|
如果 `scheduler_cluster_ids` 不存在,表示对所有 scheduler cluster 进行预热。
|
||||||
|
|
||||||
|
|
@ -30,7 +22,7 @@ curl --location --request POST 'http://dragonfly-manager:8080/api/v1/jobs' \
|
||||||
{ "id": 1 "task_id": "group_4d1ea00e-740f-4dbf-a47e-dbdc08eb33e1", "type": "preheat", "status": "PENDING", "args": { "filter": "", "headers": null, "type": "image", "url": "https://registry-1.docker.io/v2/library/redis/manifests/latest" }}
|
{ "id": 1 "task_id": "group_4d1ea00e-740f-4dbf-a47e-dbdc08eb33e1", "type": "preheat", "status": "PENDING", "args": { "filter": "", "headers": null, "type": "image", "url": "https://registry-1.docker.io/v2/library/redis/manifests/latest" }}
|
||||||
```
|
```
|
||||||
|
|
||||||
使用预热任务 ID 轮训查询任务是否成功,具体 api 可以参考文档 [get job api document](../../api/api.md#get-job)。
|
使用预热任务 ID 轮训查询任务是否成功,具体 api 可以参考文档 [get job api document](../api-reference/api-reference.md#get-job)。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl --request GET 'http://dragonfly-manager:8080/api/v1/jobs/1'
|
curl --request GET 'http://dragonfly-manager:8080/api/v1/jobs/1'
|
||||||
|
|
@ -40,4 +32,4 @@ curl --request GET 'http://dragonfly-manager:8080/api/v1/jobs/1'
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
{ "id": 1 "task_id": "group_4d1ea00e-740f-4dbf-a47e-dbdc08eb33e1", "type": "preheat", "status": "SUCCESS", "args": { "filter": "", "headers": null, "type": "image", "url": "https://registry-1.docker.io/v2/library/redis/manifests/latest" }}
|
{ "id": 1 "task_id": "group_4d1ea00e-740f-4dbf-a47e-dbdc08eb33e1", "type": "preheat", "status": "SUCCESS", "args": { "filter": "", "headers": null, "type": "image", "url": "https://registry-1.docker.io/v2/library/redis/manifests/latest" }}
|
||||||
```
|
```
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
# WIP console
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
# Dragonfly 快速开始
|
||||||
|
|
||||||
|
文档的目标是帮助您快速开始使用 Dragonfly。
|
||||||
|
|
||||||
|
您可以根据 [Kubernetes-with-Dragonfly](./deployment/installation/kubernetes/README.md) 文档中的内容快速搭建 Dragonfly 的 Kubernetes 集群。我们推荐使用 `Containerd with CRI` 和 `CRI-O` 客户端。
|
||||||
|
|
||||||
|
下表列出了一些容器的运行时、版本和文档。
|
||||||
|
|
||||||
|
| Runtime | Version | Document | CRI Support | Pull Command |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| Containerd<sup>*</sup> | v1.1.0+ | [Link](runtime-integration/containerd/mirror.md) | Yes | crictl pull docker.io/library/alpine:latest |
|
||||||
|
| Containerd without CRI | < v1.1.0 | [Link](runtime-integration/containerd/proxy.md) | No | ctr image pull docker.io/library/alpine |
|
||||||
|
| CRI-O | All | [Link](runtime-integration/cri-o.md) | Yes | crictl pull docker.io/library/alpine:latest |
|
||||||
|
|
||||||
|
**:推荐使用`containerd`*
|
||||||
|
## Helm Chart 运行时配置
|
||||||
|
|
||||||
|
Dragonfly Helm 支持自动更改 docker 配置。
|
||||||
|
|
||||||
|
**支持指定仓库**
|
||||||
|
|
||||||
|
定制 values.yaml 文件:
|
||||||
|
```yaml
|
||||||
|
containerRuntime:
|
||||||
|
docker:
|
||||||
|
enable: true
|
||||||
|
# -- Inject domains into /etc/hosts to force redirect traffic to dfdaemon.
|
||||||
|
# Caution: This feature need dfdaemon to implement SNI Proxy, confirm image tag is greater than v2.0.0.
|
||||||
|
# When use certs and inject hosts in docker, no necessary to restart docker daemon.
|
||||||
|
injectHosts: true
|
||||||
|
registryDomains:
|
||||||
|
- "harbor.example.com"
|
||||||
|
- "harbor.example.net"
|
||||||
|
```
|
||||||
|
|
||||||
|
此配置允许 docker 通过 Dragonfly 拉取 `harbor.example.com` 和 `harbor.example.net` 域名镜像。
|
||||||
|
使用上述配置部署 Dragonfly 时,无需重新启动 docker。
|
||||||
|
|
||||||
|
优点:
|
||||||
|
* 支持 dfdaemon 自身平滑升级
|
||||||
|
|
||||||
|
> 这种模式下,当删除 dfdaemon pod 的时候,`preStop` 钩子将会清理已经注入到 `/etc/hosts` 下的所有主机信息,所有流量将会走原来的镜像中心。
|
||||||
|
|
||||||
|
限制:
|
||||||
|
* 只支持指定域名。
|
||||||
|
|
||||||
|
## 准备 Kubernetes 集群
|
||||||
|
|
||||||
|
如果没有可用的 Kubernetes 集群进行测试,推荐使用 [minikube](https://minikube.sigs.k8s.io/docs/start/)。只需运行`minikube start`。
|
||||||
|
|
||||||
|
## 安装 Dragonfly
|
||||||
|
|
||||||
|
### 默认配置安装
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm repo add dragonfly https://dragonflyoss.github.io/helm-charts/
|
||||||
|
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly
|
||||||
|
```
|
||||||
|
|
||||||
|
### 等待部署成功
|
||||||
|
|
||||||
|
等待所有的服务运行成功。
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl -n dragonfly-system wait --for=condition=ready --all --timeout=10m pod
|
||||||
|
```
|
||||||
|
|
||||||
|
## Manager 控制台
|
||||||
|
|
||||||
|
控制台页面会在 `dragonfly-manager.dragonfly-system.svc.cluster.local:8080` 展示。
|
||||||
|
|
||||||
|
需要绑定 Ingress 可以参考 [Helm Charts 配置选项](https://artifacthub.io/packages/helm/dragonfly/dragonfly#values), 或者手动自行创建 Ingress。
|
||||||
|
|
||||||
|
控制台功能预览参考文档 [console preview](design/manager.md)。
|
||||||
|
|
||||||
|
## 使用 Dragonfly
|
||||||
|
|
||||||
|
以上步骤执行完毕,可以使用 `crictl` 命令拉取镜像:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
crictl harbor.example.com/library/alpine:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
crictl pull docker.io/library/alpine:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
拉取镜像后可以在 dfdaemon 查询日志:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# find pods
|
||||||
|
kubectl -n dragonfly-system get pod -l component=dfdaemon
|
||||||
|
# find logs
|
||||||
|
pod_name=dfdaemon-xxxxx
|
||||||
|
kubectl -n dragonfly-system exec -it ${pod_name} -- grep "peer task done" /var/log/dragonfly/daemon/core.log
|
||||||
|
```
|
||||||
|
|
||||||
|
日志输出例子:
|
||||||
|
|
||||||
|
```
|
||||||
|
{"level":"info","ts":"2021-06-28 06:02:30.924","caller":"peer/peertask_stream_callback.go:77","msg":"stream peer task done, cost: 2838ms","peer":"172.17.0.9-1-ed7a32ae-3f18-4095-9f54-6ccfc248b16e","task":"3c658c488fd0868847fab30976c2a079d8fd63df148fb3b53fd1a418015723d7","component":"streamPeerTask"}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Preheat
|
||||||
|
|
||||||
|
为了使用 Dragonfly 的最佳体验, 你可以通过 [预热](preheat/README.md) 提前下拉镜像。
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
# 运行时集成
|
||||||
|
|
||||||
|
运行时:
|
||||||
|
|
||||||
|
* [containerd](containerd/README.md)
|
||||||
|
* [cri-o](cri-o.md)
|
||||||
|
* [docker](docker.md)
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Containerd
|
||||||
|
|
||||||
|
该文档将帮助你集成 Dragonfly2 到 Containerd。我们推荐使用 `mirror`。
|
||||||
|
|
||||||
|
集成方式:
|
||||||
|
|
||||||
|
* [mirror](mirror.md)
|
||||||
|
* [proxy](proxy.md)
|
||||||
|
|
@ -153,4 +153,3 @@ proxy:
|
||||||
```
|
```
|
||||||
openssl x509 -in <(openssl s_client -showcerts -servername xxx -connect xxx:443 -prexit 2>/dev/null)
|
openssl x509 -in <(openssl s_client -showcerts -servername xxx -connect xxx:443 -prexit 2>/dev/null)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
# 安装
|
|
||||||
|
|
||||||
有两种安装模式,推荐使用 Helm Charts 一次性整体安装,也可以各模块单独安装。
|
|
||||||
|
|
||||||
## 使用 Helm Charts 进行按轧辊
|
|
||||||
|
|
||||||
> ArtifactHub 仓库链接为: https://artifacthub.io/packages/helm/dragonfly/dragonfly
|
|
||||||
|
|
||||||
推荐使用 Helm Charts 进行安装,简单且快捷。参考文档 [Kubernetes-with-Dragonfly](../../ecosystem/Kubernetes-with-Dragonfly.md)。
|
|
||||||
|
|
||||||
## 按模块单独安装
|
|
||||||
|
|
||||||
* [install-dfdaemon](./install-dfdaemon.md) 是 dfdaemon 的安装指南
|
|
||||||
|
|
||||||
* [install-manager](./install-manager.md) 是 manager 的安装指南
|
|
||||||
|
|
||||||
* [install-scheduler](./install-scheduler.md) 是 scheduler 的安装指南
|
|
||||||
|
|
||||||
* [install-cdn](./install-cdn.md) 是 CDN 的安装指南
|
|
||||||
|
|
@ -1,147 +0,0 @@
|
||||||
# 安装 Dragonfly Manager
|
|
||||||
|
|
||||||
本文档阐述如何安装并启动 Dragonfly Manger。
|
|
||||||
|
|
||||||
## 部署方式
|
|
||||||
|
|
||||||
用下列方式之一部署 Manager:
|
|
||||||
|
|
||||||
- 通过 Docker 部署:推荐用于生产用途
|
|
||||||
- 直接在物理机上部署
|
|
||||||
|
|
||||||
## 环境要求
|
|
||||||
|
|
||||||
使用 Docker 部署时,以下条件必须满足:
|
|
||||||
|
|
||||||
所需软件 | 版本要求
|
|
||||||
---|---
|
|
||||||
Git|1.9.1+
|
|
||||||
Docker|1.12.0+
|
|
||||||
|
|
||||||
直接在物理机上部署时,以下条件必须满足:
|
|
||||||
|
|
||||||
所需软件 | 版本要求
|
|
||||||
---|---
|
|
||||||
Git|1.9.1+
|
|
||||||
Golang|1.12.x
|
|
||||||
Nginx|0.8+
|
|
||||||
|
|
||||||
## 使用 Docker 部署
|
|
||||||
|
|
||||||
### 获取 Manager 镜像
|
|
||||||
|
|
||||||
您可以直接从 [DockerHub](https://hub.docker.com/) 获取 Manager 镜像。
|
|
||||||
|
|
||||||
1. 获取最新的 Manager 镜像
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker pull dragonflyoss/manager
|
|
||||||
```
|
|
||||||
|
|
||||||
或者您可以构建自己的 manager 镜像
|
|
||||||
|
|
||||||
1. 获取 Dragonfly 的源码
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 打开项目文件夹
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd Dragonfly2
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 构建 manager 的 Docker 镜像
|
|
||||||
|
|
||||||
```sh
|
|
||||||
TAG="2.0.0"
|
|
||||||
make docker-build-manager D7Y_VERSION=$TAG
|
|
||||||
```
|
|
||||||
|
|
||||||
4. 获取最新的 manager 镜像 ID
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker image ls | grep 'manager' | awk '{print $3}' | head -n1
|
|
||||||
```
|
|
||||||
|
|
||||||
### 启动 manager
|
|
||||||
|
|
||||||
**注意:** 需要使用上述步骤获得的 ID 替换 ${managerDockerImageId}。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run -d --name manager --restart=always -p 8080:8080 -p 65003:65003 ${managerDockerImageId}
|
|
||||||
```
|
|
||||||
|
|
||||||
manager 部署完成之后,运行以下命令以检查 **manager** 是否正在运行,以及 `8080` 和 `65003` 端口是否可用。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
telnet 127.0.0.1 8080
|
|
||||||
telnet 127.0.0.1 65003
|
|
||||||
```
|
|
||||||
|
|
||||||
### 控制台
|
|
||||||
|
|
||||||
现在可以打开浏览器,访问控制台 [console](http://localhost:8080)。
|
|
||||||
|
|
||||||
控制台功能预览参考文档 [console preview](../../user-guide/console/preview.md)。
|
|
||||||
|
|
||||||
## 在物理机上部署
|
|
||||||
|
|
||||||
### 获取 manager 可执行文件
|
|
||||||
|
|
||||||
1. 下载 Dragonfly 项目的压缩包。您可以从 [github releases page](https://github.
|
|
||||||
com/dragonflyoss/Dragonfly2/releases) 下载一个已发布的最近版本
|
|
||||||
|
|
||||||
```sh
|
|
||||||
version=2.0.0
|
|
||||||
wget https://github.com/dragonflyoss/Dragonfly2/releases/download/v$version/Dragonfly2_$version_linux_amd64.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 解压压缩包
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Replace `xxx` with the installation directory.
|
|
||||||
tar -zxf Dragonfly2_2.0.0_linux_amd64.tar.gz -C xxx
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 把 `manager` 移动到环境变量 `PATH` 下以确保您可以直接使用 `manager` 命令
|
|
||||||
|
|
||||||
或者您可以编译生成自己的 manager 可执行文件。
|
|
||||||
|
|
||||||
1. 获取 Dragonfly 的源码
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/dragonflyoss/Dragonfly2.git
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 打开项目文件夹
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd Dragonfly2
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 编译源码
|
|
||||||
|
|
||||||
```sh
|
|
||||||
make build-manager && make install-manager
|
|
||||||
```
|
|
||||||
|
|
||||||
### 启动 manager
|
|
||||||
|
|
||||||
```sh
|
|
||||||
manager --options
|
|
||||||
```
|
|
||||||
|
|
||||||
manager 部署完成之后,运行以下命令以检查 **manager** 是否正在运行,以及 `8080` 和 `65003` 端口是否可用。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
telnet 127.0.0.1 8080
|
|
||||||
telnet 127.0.0.1 65003
|
|
||||||
```
|
|
||||||
|
|
||||||
### 控制台
|
|
||||||
|
|
||||||
可以在 `localhost:8080` 访问控制台。
|
|
||||||
|
|
||||||
控制台功能预览参考文档 [console preview](../../user-guide/console/preview.md)。
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
# Dragonfly 快速开始
|
|
||||||
|
|
||||||
文档的目标是帮助您快速开始使用 Dragonfly。
|
|
||||||
|
|
||||||
您可以根据 [Kubernetes-with-Dragonfly](../ecosystem/Kubernetes-with-Dragonfly.md) 文档中的内容快速搭建 Dragonfly 的 Kubernetes 集群。我们推荐使用 `Containerd with CRI` 和 `CRI-O` 客户端。
|
|
||||||
|
|
||||||
下表列出了一些容器的运行时、版本和文档。
|
|
||||||
|
|
||||||
| Runtime | Version | Document | CRI Support | Pull Command |
|
|
||||||
| --- | --- | --- | --- | --- |
|
|
||||||
| Containerd without CRI | All | [Link](./proxy/containerd.md) | No | ctr image pull docker.io/library/alpine |
|
|
||||||
| Containerd with CRI | v1.1.0+ | [Link](./registry-mirror/cri-containerd.md) | Yes | crictl pull docker.io/library/alpine:latest |
|
|
||||||
| CRI-O | All | [Link](./registry-mirror/cri-o.md) | Yes | crictl pull docker.io/library/alpine:latest |
|
|
||||||
|
|
||||||
## 相关文档
|
|
||||||
|
|
||||||
- [install manager](../user-guide/install/install-manager.md) - 安装 Dragonfly manager
|
|
||||||
- [install cdn](../user-guide/install/install-cdn.md) - 安装 Dragonfly cdn
|
|
||||||
- [install scheduler](../user-guide/install/install-scheduler.md) - 安装 Dragonfly scheduler
|
|
||||||
- [manager console](../user-guide/console/preview.md) - manager 控制台预览
|
|
||||||
- [docker proxy](../user-guide/proxy/docker.md) - 使用 Dragonfly 作为 docker daemon 的 HTTP 代理
|
|
||||||
- Container Runtimes
|
|
||||||
- [cri-o mirror](../user-guide/registry-mirror/cri-o.md) - 使用 Dragonfly 作为 CRIO daemon 的 Registry Mirror
|
|
||||||
- [cri-containerd mirror](../user-guide/registry-mirror/cri-containerd.md) - 使用 Dragonfly 作为 containerd daemon 的 Registry Mirror
|
|
||||||
- [preheat](../user-guide/preheat/preheat.md) - 预热功能
|
|
||||||
Loading…
Reference in New Issue