Browse Source

Update doc according to recent update of Spring / Swagger (#11755)

3.1.0-release
kezhenxu94 2 years ago committed by GitHub
parent
commit
31ba49ac02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      docs/docs/en/contribute/development-environment-setup.md
  2. 6
      docs/docs/en/faq.md
  3. 11
      docs/docs/en/guide/open-api.md
  4. 8
      docs/docs/zh/contribute/development-environment-setup.md
  5. 22
      docs/docs/zh/faq.md
  6. 12
      docs/docs/zh/guide/open-api.md

12
docs/docs/en/contribute/development-environment-setup.md

@ -30,7 +30,7 @@ Run `mvn clean install -Prelease -Dmaven.test.skip=true`
### Code Style
DolphinScheduler uses `Spotless` for code style and formatting checks.
You could run the following command and `Spotless` will automatically fix
You could run the following command and `Spotless` will automatically fix
the code style and formatting errors for you:
```shell
@ -53,7 +53,7 @@ cd dolphinscheduler
-Dmaven.javadoc.skip \
-Dmaven.checkstyle.skip \
-Ddocker.tag=<TAG> \
-Pdocker,release
-Pdocker,release
```
When the command is finished you could find them by command `docker imaegs`.
@ -68,7 +68,7 @@ cd dolphinscheduler
-Dmaven.deploy.skip \
-Ddocker.tag=<TAG> \
-Ddocker.hub=<HUB_URL> \
-Pdocker,release
-Pdocker,release
```
* If you want to modify DolphinScheduler source code, and also want to add customize dependencies of Docker image, you can modify the definition of Dockerfile after modifying the source code. You can run the following command to find all Dockerfile files.
@ -103,9 +103,9 @@ There are two ways to configure the DolphinScheduler development environment, st
## DolphinScheduler Standalone Quick Start
> **_Note:_** Use standalone server only for development and debugging, because it uses H2 Database as default database and Zookeeper Testing Server which may not be stable in production.
>
>
> Standalone is only supported in DolphinScheduler 1.3.9 and later versions.
>
>
> Standalone server is able to connect to external databases like mysql and postgresql, see [Standalone Deployment](https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/guide/installation/standalone.html) for instructions.
### Git Branch Choose
@ -206,7 +206,7 @@ There are three services that need to be started, including MasterServer, Worker
* MasterServer:Execute function `main` in the class `org.apache.dolphinscheduler.server.master.MasterServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
* WorkerServer:Execute function `main` in the class `org.apache.dolphinscheduler.server.worker.WorkerServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
* ApiApplicationServer:Execute function `main` in the class `org.apache.dolphinscheduler.api.ApiApplicationServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql`. After it started, you could find Open API documentation in http://localhost:12345/dolphinscheduler/doc.html
* ApiApplicationServer:Execute function `main` in the class `org.apache.dolphinscheduler.api.ApiApplicationServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql`. After it started, you could find Open API documentation in http://localhost:12345/dolphinscheduler/swagger-ui/index.html
> The `mysql` in the VM Options `-Dspring.profiles.active=mysql` means specified configuration file

6
docs/docs/en/faq.md

@ -533,7 +533,8 @@ A: 1, We can successly create scheduled task and add one record into t_scheduler
## Q : What is the address of swagger ui
A: 1, For version 1.2+ is http://apiServerIp:apiServerPort/dolphinscheduler/doc.html others is http://apiServerIp:apiServerPort/escheduler/doc.html.
A: 1, For version 3.1.0+ is http://apiServerIp:apiServerPort/dolphinscheduler/swagger-ui/index.html,
for version 1.2+ is http://apiServerIp:apiServerPort/dolphinscheduler/doc.html others is http://apiServerIp:apiServerPort/escheduler/doc.html.
---
@ -582,7 +583,7 @@ A: 1, It is currently judged according to natural days, at the end of last month
## Q : DS Backend Inteface Document
A: 1, http://106.75.43.194:8888/dolphinscheduler/doc.html?language=en.
A: 1, http://106.75.43.194:8888/dolphinscheduler/swagger-ui/index.html?language=en.
## During the operation of dolphinscheduler, the ip address is obtained incorrectly
@ -752,4 +753,3 @@ start API server. If you want disabled when Python gateway service you could cha
---
We will collect more FAQ later

11
docs/docs/en/guide/open-api.md

@ -20,9 +20,9 @@ Generally, projects and processes are created through pages, but considering the
#### Query project list
1. Open the API documentation
1. Open the API documentation
> Address:http://{API server ip}:12345/dolphinscheduler/doc.html?language=en_US&lang=en
> Address:http://{API server ip}:12345/dolphinscheduler/swagger-ui/index.html?language=en_US&lang=en
![api-doc](../../../img/new_ui/dev/open-api/api_doc.png)
@ -31,11 +31,11 @@ Generally, projects and processes are created through pages, but considering the
> projects/list
>
3. Open `Postman`, fill in the API address, enter the `Token` in `Headers`, and then send the request to view the result:
```
token: The Token just generated
```
![api-test](../../../img/new_ui/dev/open-api/api_test.png)
#### Create a Project
@ -63,6 +63,3 @@ If you are interested in the source code of creating a project, please continue
![api-source01](../../../img/new_ui/dev/open-api/api_source01.png)
![api-source02](../../../img/new_ui/dev/open-api/api_source02.png)

8
docs/docs/zh/contribute/development-environment-setup.md

@ -52,7 +52,7 @@ cd dolphinscheduler
-Dmaven.javadoc.skip \
-Dmaven.checkstyle.skip \
-Ddocker.tag=<TAG> \
-Pdocker,release
-Pdocker,release
```
当命令运行完了后你可以通过 `docker images` 命令查看刚刚创建的镜像
@ -66,7 +66,7 @@ cd dolphinscheduler
-Dmaven.deploy.skip \
-Ddocker.tag=<TAG> \
-Ddocker.hub=<HUB_URL> \
-Pdocker,release
-Pdocker,release
```
* 如果你不仅需要改造源码,还想要自定义 Docker 镜像打包的依赖,可以在修改源码的同时修改 Dockerfile 的定义。你可以运行以下命令找到所有的 Dockerfile 文件
@ -100,7 +100,7 @@ DolphinScheduler 开发环境配置有两个方式,分别是standalone模式
## DolphinScheduler Standalone快速开发模式
> **_注意:_** 仅供单机开发调试使用,默认使用 H2 Database,Zookeeper Testing Server
>
>
> Standalone 仅在 DolphinScheduler 1.3.9 及以后的版本支持
### 分支选择
@ -197,7 +197,7 @@ DolphinScheduler 的元数据存储在关系型数据库中,目前支持的关
* MasterServer:在 Intellij IDEA 中执行 `org.apache.dolphinscheduler.server.master.MasterServer` 中的 `main` 方法,并配置 *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
* WorkerServer:在 Intellij IDEA 中执行 `org.apache.dolphinscheduler.server.worker.WorkerServer` 中的 `main` 方法,并配置 *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
* ApiApplicationServer:在 Intellij IDEA 中执行 `org.apache.dolphinscheduler.api.ApiApplicationServer` 中的 `main` 方法,并配置 *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql`。启动完成可以浏览 Open API 文档,地址为 http://localhost:12345/dolphinscheduler/doc.html
* ApiApplicationServer:在 Intellij IDEA 中执行 `org.apache.dolphinscheduler.api.ApiApplicationServer` 中的 `main` 方法,并配置 *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql`。启动完成可以浏览 Open API 文档,地址为 http://localhost:12345/dolphinscheduler/swagger-ui/index.html
> VM Options `-Dspring.profiles.active=mysql``mysql` 表示指定的配置文件

22
docs/docs/zh/faq.md

@ -75,7 +75,7 @@ A:单独安装 **npm install node-sass --unsafe-perm**,之后再 **npm insta
A: 1,如果是 node 启动的查看 dolphinscheduler-ui 下的 .env 文件里的 API_BASE 配置是否是 Api Server 服务地址
2,如果是 nginx 启动的并且是通过 **install-dolphinscheduler-ui.sh** 安装的,查看
2,如果是 nginx 启动的并且是通过 **install-dolphinscheduler-ui.sh** 安装的,查看
**/etc/nginx/conf.d/dolphinscheduler.conf** 中的 proxy_pass 配置是否是 Api Server 服务地址
@ -298,7 +298,7 @@ A: 1,参考官网[部署文档](https://dolphinscheduler.apache.org/zh-cn/do
---
## Q:DolphinScheduler 什么时候发布新版本,同时新旧版本区别,以及如何升级,版本号规范
## Q:DolphinScheduler 什么时候发布新版本,同时新旧版本区别,以及如何升级,版本号规范
A:1,Apache 项目的发版流程是通过邮件列表完成的。 你可以订阅 DolphinScheduler 的邮件列表,订阅之后如果有发版,你就可以收到邮件。请参照这篇[指引](https://github.com/apache/dolphinscheduler#get-help)来订阅 DolphinScheduler 的邮件列表。
2,当项目发版的时候,会有发版说明告知具体的变更内容,同时也会有从旧版本升级到新版本的升级文档。
@ -321,11 +321,11 @@ A:
master.properties
设置 master 节点并发执行的最大工作流数
master.exec.threads=100
Control the number of parallel tasks in each workflow
设置每个工作流可以并发执行的最大任务数
master.exec.task.number=20
worker.properties
设置 worker 节点并发执行的最大任务数
worker.exec.threads=100
@ -423,7 +423,7 @@ A:调度系统不支持秒级任务。
---
## Q:编译前后端代码 (dolphinscheduler-ui) 报错不能下载"https://github.com/sass/node-sass/releases/download/v4.13.1/darwin-x64-72_binding.node"
A:1,cd dolphinscheduler-ui 然后删除 node_modules 目录
A:1,cd dolphinscheduler-ui 然后删除 node_modules 目录
```
sudo rm -rf node_modules
```
@ -488,7 +488,7 @@ A:1,我们可以成功创建调度任务,并且表 t_scheduler_schedules
---
## Q:请问 swagger ui 的地址是什么
A:1,1.2+ 版本地址是:http://apiServerIp:apiServerPort/dolphinscheduler/doc.html?language=zh_CN&lang=cn,其它版本是 http://apiServerIp:apiServerPort/escheduler/doc.html?language=zh_CN&lang=cn。
A:1, 3.1.0+ 版本地址是 http://apiServerIp:apiServerPort/dolphinscheduler/swagger-ui/index.html, 1.2+ 版本地址是:http://apiServerIp:apiServerPort/dolphinscheduler/swagger-ui/index.html?language=zh_CN&lang=cn,其它版本是 http://apiServerIp:apiServerPort/escheduler/swagger-ui/index.html?language=zh_CN&lang=cn。
---
@ -508,7 +508,7 @@ A: 1,用户修改了 api server 配置文件中的![apiServerContextPath](ht
<img src="https://user-images.githubusercontent.com/21357069/58231400-805b0e80-7d69-11e9-8107-7f37b06a95df.png" width="60%" />
</p>
A:1,编辑 ngnix 配置文件 vi /etc/nginx/nginx.conf,更改上传大小 client_max_body_size 1024m。
2,更新 google chrome 版本到最新版本。
---
@ -529,7 +529,7 @@ A:1,目前是按照自然天来判断,上月末:判断时间是工作流
---
## Q:DS 后端接口文档
A:1,http://106.75.43.194:8888/dolphinscheduler/doc.html?language=zh_CN&lang=zh。
A:1,http://106.75.43.194:8888/dolphinscheduler/swagger-ui/index.html?language=zh_CN&lang=zh。
## dolphinscheduler 在运行过程中,ip 地址获取错误的问题
@ -585,9 +585,9 @@ sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers
A:将Worker节点分别部署至多个Yarn集群,步骤如下(例如AWS EMR):
1. 将 Worker 节点部署至 EMR 集群的 Master 节点
2. 将 `conf/common.properties` 中的 `yarn.application.status.address` 修改为当前集群的 Yarn 的信息
3. 通过 `bin/dolphinscheduler-daemon.sh start worker-server` 启动 worker-server
---
@ -695,6 +695,6 @@ A:在 3.0.0-alpha 版本之后,Python gateway server 集成到 api server
如果您不想在 api server 启动的时候启动 Python gateway server,您可以修改 api server 中的配置文件 `api-server/conf/application.yaml`
并更改可选项 `python-gateway.enabled` 中的值设置为 `false`
---
---
我们会持续收集更多的 FAQ。

12
docs/docs/zh/guide/open-api.md

@ -11,7 +11,7 @@
1. 登录调度系统,点击 "安全中心",再点击左侧的 "令牌管理",点击 "令牌管理" 创建令牌。
![create-token](../../../img/new_ui/dev/security/create-token.png)
2. 选择 "失效时间" (Token 有效期),选择 "用户" (以指定的用户执行接口操作),点击 "生成令牌" ,拷贝 Token 字符串,然后点击 "提交" 。
![token-expiration](../../../img/new_ui/dev/open-api/token_expiration.png)
@ -22,10 +22,10 @@
1. 打开 API 文档页面
> 地址:http://{api server ip}:12345/dolphinscheduler/doc.html?language=zh_CN&lang=cn
> 地址:http://{api server ip}:12345/dolphinscheduler/swagger-ui/index.html?language=zh_CN&lang=cn
![api-doc](../../../img/new_ui/dev/open-api/api_doc.png)
2. 选一个测试的接口,本次测试选取的接口是:查询所有项目
> projects/list
@ -35,9 +35,9 @@
```
token: 刚刚生成的 Token
```
![api-test](../../../img/new_ui/dev/open-api/api_test.png)
#### 创建项目
这里演示如何使用调用 api 来创建对应的项目。
@ -63,5 +63,3 @@
![api-source01](../../../img/new_ui/dev/open-api/api_source01.png)
![api-source02](../../../img/new_ui/dev/open-api/api_source02.png)

Loading…
Cancel
Save