Browse Source

Merge pull request #158 from lidongdai/dev-20190415

Dev 20190415
pull/2/head
easyscheduler 6 years ago committed by GitHub
parent
commit
d8ff5e3296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      docs/zh_CN/前端开发文档.md
  2. 11
      docs/zh_CN/前端部署文档.md
  3. 6
      docs/zh_CN/后端部署文档.md
  4. 2
      escheduler-server/src/main/resources/worker.properties
  5. 12
      install.sh

12
docs/zh_CN/前端开发文档.md

@ -21,6 +21,7 @@ Lodash 高性能的 JavaScript 实用工具库
- #### Node安装
Node包下载 (注意版本 8.9.4) `https://nodejs.org/download/release/v8.9.4/`
- #### 前端项目构建
用命令行模式 `cd` 进入 `escheduler-ui`项目目录并执行 `npm install` 拉取项目依赖包
@ -31,6 +32,16 @@ Node包下载 (注意版本 8.9.4) `https://nodejs.org/download/release/v8.9.4/`
> 运行 `cnpm install`
- 新建一个`.env`文件,用于跟后端交互的接口
在`escheduler-ui`目录下新建一个`.env`文件,在文件里添加后端服务的ip地址和端口,用于跟后端交互,`.env`文件内容如下:
```
# 代理的接口地址(自行修改)
API_BASE = http://192.168.xx.xx:12345
# 如果您需要用ip访问项目可以把 "#" 号去掉(例)
#DEV_HOST = 192.168.xx.xx
```
> ##### !!!这里特别注意 项目如果在拉取依赖包的过程中报 " node-sass error " 错误,请在执行完后再次执行以下命令
```
@ -49,6 +60,7 @@ npm install node-sass --unsafe-perm //单独安装node-sass依赖
再拷贝到服务器对应的目录下(前端服务静态页面存放目录)
访问地址 `http://localhost:8888/#/`

11
docs/zh_CN/前端部署文档.md

@ -3,23 +3,14 @@
前端有3种部署方式,分别为自动化部署,手动部署和编译源码部署
## 1、准备工作
#### 准备一:下载安装包
#### 下载安装包
目前最新安装包版本是1.0.1,下载地址: [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files/)
下载escheduler-ui-1.0.1.tar.gz后,解压后会产生dist目录,进入dist目录
> cd dist
#### 准备二:新建一个`.env`文件
在dist目录下新建一个`.env`文件,在文件里添加后端服务的ip地址和端口,用于跟后端交互,`.env`文件内容如下:
```
# 代理的接口地址(自行修改)
API_BASE = http://192.168.xx.xx:12345
# 如果您需要用ip访问项目可以把 "#" 号去掉(例)
#DEV_HOST = 192.168.xx.xx
```
## 2、部署
以下两种方式任选其一部署即可,推荐自动化部署

6
docs/zh_CN/后端部署文档.md

@ -89,7 +89,7 @@ install.sh : 一键部署脚本
- 修改 **install.sh**中的各参数,替换成自身业务所需的值
- 如果使用hdfs相关功能,需要拷贝**hdfs-site.xml**和**core-site.xml**到conf目录下
- 如果使用hdfs相关功能,需要拷贝**hdfs-site.xml**和**core-site.xml**到conf目录下
## 2、部署
@ -148,11 +148,11 @@ install.sh : 一键部署脚本
* 一键停止集群所有服务
` sh ./script/stop_all.sh`
` sh ./bin/stop_all.sh`
* 一键开启集群所有服务
` sh ./script/start_all.sh`
` sh ./bin/start_all.sh`
* 启停Master

2
escheduler-server/src/main/resources/worker.properties

@ -9,7 +9,7 @@ worker.fetch.task.num = 3
# only less than cpu avg load, worker server can work. default value : the number of cpu cores * 2
worker.max.cpuload.avg=10
#worker.max.cpuload.avg=10
# only larger than reserved memory, worker server can work. default value : physical memory * 1/6, unit is G.
worker.reserved.memory=1

12
install.sh

@ -187,7 +187,7 @@ masterTaskCommitRetryTimes="5"
masterTaskCommitInterval="100"
# master最大cpu平均负载,用来判断master是否还有执行能力
masterMaxCupLoadAvg="10"
masterMaxCpuLoadAvg="10"
# master预留内存,用来判断master是否还有执行能力
masterReservedMemory="1"
@ -201,10 +201,10 @@ workerExecThreads="100"
workerHeartbeatInterval="10"
# worker一次抓取任务数
workerFetchTaskNum="10"
workerFetchTaskNum="3"
# worker最大cpu平均负载,用来判断master是否还有执行能力
workerMaxCupLoadAvg="10"
# worker最大cpu平均负载,用来判断worker是否还有执行能力,保持系统默认,默认为cpu核数的2倍,当负载达到2倍时,
#workerMaxCupLoadAvg="10"
# worker预留内存,用来判断master是否还有执行能力
workerReservedMemory="1"
@ -272,14 +272,14 @@ sed -i ${txt} "s#master.exec.task.number.*#master.exec.task.number=${masterExecT
sed -i ${txt} "s#master.heartbeat.interval.*#master.heartbeat.interval=${masterHeartbeatInterval}#g" conf/master.properties
sed -i ${txt} "s#master.task.commit.retryTimes.*#master.task.commit.retryTimes=${masterTaskCommitRetryTimes}#g" conf/master.properties
sed -i ${txt} "s#master.task.commit.interval.*#master.task.commit.interval=${masterTaskCommitInterval}#g" conf/master.properties
sed -i ${txt} "s#master.max.cpuload.avg.*#master.max.cpuload.avg=${masterMaxCupLoadAvg}#g" conf/master.properties
sed -i ${txt} "s#master.max.cpuload.avg.*#master.max.cpuload.avg=${masterMaxCpuLoadAvg}#g" conf/master.properties
sed -i ${txt} "s#master.reserved.memory.*#master.reserved.memory=${masterReservedMemory}#g" conf/master.properties
sed -i ${txt} "s#worker.exec.threads.*#worker.exec.threads=${workerExecThreads}#g" conf/worker.properties
sed -i ${txt} "s#worker.heartbeat.interval.*#worker.heartbeat.interval=${workerHeartbeatInterval}#g" conf/worker.properties
sed -i ${txt} "s#worker.fetch.task.num.*#worker.fetch.task.num=${workerFetchTaskNum}#g" conf/worker.properties
sed -i ${txt} "s#worker.max.cpuload.avg.*#worker.max.cpuload.avg=${workerMaxCupLoadAvg}#g" conf/worker.properties
#sed -i ${txt} "s#worker.max.cpuload.avg.*#worker.max.cpuload.avg=${workerMaxCupLoadAvg}#g" conf/worker.properties
sed -i ${txt} "s#worker.reserved.memory.*#worker.reserved.memory=${workerReservedMemory}#g" conf/worker.properties

Loading…
Cancel
Save