diff --git a/README.en.md b/README.en.md index f846518703..d7917eb343 100644 --- a/README.en.md +++ b/README.en.md @@ -59,7 +59,7 @@ For more information, please check Blueking's official website [Platform Product ## Getting started - [Download and Compile](docs/overview/source_compile.en.md) -- [Installation Setup](docs/overview/installation.en.md) +- [Install and Operation](docs/overview/operation_en.md) ## Support 1. [GitHub Community](https://github.com/Tencent/bk-job/discussions) diff --git a/README.md b/README.md index 47d91480ca..de85510336 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ bk-job 提供了快速执行、任务编排、定时执行等核心服务,多 ## Getting started - [下载与编译](docs/overview/source_compile.md) -- [安装部署](docs/overview/installation.md) +- [部署与运维](docs/overview/operation.md) ## Support 1. [GitHub讨论区](https://github.com/Tencent/bk-job/discussions) diff --git a/docs/overview/installation.en.md b/docs/overview/installation.en.md deleted file mode 100644 index 1f9ce92c0f..0000000000 --- a/docs/overview/installation.en.md +++ /dev/null @@ -1,138 +0,0 @@ -# Installation Setup - -English | [简体中文](installation.md) - -## 1. About Setup Directory - -The directory should conform to Blueking rules of operation. We're taking /data/bkee as the primary directory. Users can feel free to change them. The details are shown as follows: - -``` -|- /data/bkee # Blueking Root Directory - |- job # job Setup Program Directory - |- etc # Blueking Config File Catalog - |- job # job Config File Menu -``` - -Detailed explanation of the following chapters: - -### 1.1 job Setup Directory - -``` -|- /data/bkee/job # Home Directory - |- frontend # Static Resource Directory for Frontend Programs - |- index.html # Frontend Home Page File - |- __init__ # Initialization File Directory - |- js # Static JS Directory - |- static # Other Static File Directory - |- support-files # Resource Files - |- backend # The program that stores backend microservices and file source access points - |- job-manage # job-manage Microservice Jar package and ops script. There are 11 directories in total, which have already been introduced above. - |- job-manage.jar # job-manage Microservice's SpringBoot.jar - |- bin - |- job-manage.sh # job-manage Microservice's ops script - |- job-xxx -``` - -### 1.2 job Config File Directory - -``` -|- /data/bkee/etc # Blueking Config File Catalog - |- job # job Config File Menu - |- job.env # Specified environment variables when rendering job configuration files through template - |- application-manage.yml # job-manage's basic configuration. Each microservice has 1 yaml file. If there are new microservices, please put them here. - |- job-manage # job-manage's extended configuration. Each microservice has 1 corresponding directory for the extended configuration files. If there are new microservices, new directories should be added accordingly. - |- job-manage.properties # job-manage Extended configuration properties file -``` - -## 2. Basic Environment Setup - -### 2.1 System Requirement - -- CentOS 7.X -- jdk: 1.8 -- gradle: 6.3 -- redis: 4.0.14 -- mysql 5.7 -- rabbitmq: 3.7.14 -- mongoDB: 4.2.2 -- nginx: 1.16.1 -- Consul: 1.0+ - -### 2.2 Database Initialization - -Run the files under support-files/sql/* by the file sequence. - - -## 3 Program Setup - -### 3.1 support-files/template Initialize configuration file - -The underlined variables in the configuration file should be replaced with real data (e.g. MySQL account and password.) When the placement is made, the configuration file should be moved to the correct file directory to be read by the Configuration Center Microservice. - -### 3.2 Backend Microservice Setup - -- [Backend Service Setup] (../install/backend.md) - -### 3.3 Frontend Setup - -First, place all compiled static frontend files under the correct frontend directory. Refer to chapter 1.1 - Directory Setup. -Second, replace the variables of index.html in the frontend setup directory: -Location: /data/bkee/job/frontend/index.html -Change {{JOB_API_GATEWAY_URL}} into backend job API address (usually an independent API domain.) -And that's all the preparations for frontend setup. Later, you can set Nginx as frontend static service. - -### 3.4 Nginx Configuration and Setup -Job uses Nginx as the frontend static resource server, and forwards backend requests to the job-gateway microservice. The configuration is listed as follows: -```shell script -# Server Configuration of Frontend Static Resources -server { - listen 80; - server_name {{JOB_FRONTEND_HOST}}; - - gzip on; - client_max_body_size 150M; - root /data/bkee/job/frontend; - index index.html; - - location / { - add_header Cache-Control no-cache; - expires 0; - try_files $uri $uri/ @rewrites; - } - - location @rewrites { - rewrite ^(.+)$ /index.html last; - } -} -# Backend API Forwards Server Configuration -upstream job_gateway_servers { - server {{JOB_GATEWAY_IP0}}:19802; - server {{JOB_GATEWAY_IP1}}:19802; -} -server { - listen 80; - server_name {{JOB_API_HOST}}; - location / { - proxy_pass http://job_gateway_servers; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } - access_log /data/bkee/logs/nginx-access.log json_combined; - client_max_body_size 2048M; - error_log /data/bkee/logs/nginx-error.log; - error_page 404 403 500 502 503 504 /job_error.html; - location = /job_error.html { - root /data/html; - } -} -``` -When the configuration is completed, reload nginx to make the settings effective: -```shell script -nginx -s reload -c /path/to/nginx.conf -``` - -### 3.5 Access Job's Home Page -Access Job's home page via {{JOB_FRONTEND_HOST}} to use Job features. diff --git a/docs/overview/installation.md b/docs/overview/installation.md deleted file mode 100644 index e6e57a5dca..0000000000 --- a/docs/overview/installation.md +++ /dev/null @@ -1,138 +0,0 @@ -# 安装部署 - -[English](installation.en.md) | 简体中文 - -## 1. 部署目录说明 - -部署的目录遵循蓝鲸运营规范,这里举例以/data/bkee 作为主目录,用户可以自行更换,具体如下: - -``` -|- /data/bkee # 蓝鲸根目录 - |- job # job部署程序目录 - |- etc # 蓝鲸配置文件总目录 - |- job # job配置文件目录 -``` - -具体说明下以下章节。 - -### 1.1 job部署目录 - -``` -|- /data/bkee/job # 程序主目录 - |- frontend # 存放前端程序的静态资源目录 - |- index.html # 前端首页文件 - |- __init__ # 初始化文件目录 - |- js # 静态JS目录 - |- static # 其他静态文件目录 - |- support-files # 资源文件 - |- backend # 存放后台微服务及文件源接入点程序 - |- job-manage # job-manage微服务相关jar包与运维脚本,共有11个目录,不再一一列举 - |- job-manage.jar # job-manage微服务的SpringBoot.jar - |- bin - |- job-manage.sh # job-manage微服务的运维脚本 - |- job-xxx -``` - -### 1.2 job配置文件目录 - -``` -|- /data/bkee/etc # 蓝鲸配置文件总目录 - |- job # job配置文件目录 - |- job.env # 通过模板渲染job配置文件时所需要指定的环境变量 - |- application-manage.yml # job-manage的基础配置,每个微服务各有1个基础配置yaml文件,如有增加微服务也放此处 - |- job-manage # job-manage的扩展配置,每个微服务各有1个对应目录存放扩展配置文件,如有增加微服务须增加对应目录 - |- job-manage.properties # job-manage扩展配置properties文件 -``` - -## 2. 基础环境部署 - -### 2.1 系统要求 - -- CentOS 7.X -- jdk: 1.8 -- gradle: 6.3 -- redis: 4.0.14 -- mysql 5.7 -- rabbitmq: 3.7.14 -- mongoDB: 4.2.2 -- nginx: 1.16.1 -- Consul: 1.0+ - -### 2.2 数据库初始化 - -将support-files/sql/* 目录下按文件序号顺序执行。 - - -## 3 程序部署 - -### 3.1 support-files/template配置文件初始化 - -涉及到配置文件里面有双"_"下划线定义的变量需要根据实际数据(如MySQL账号密码等)做占位符号替换,完成替换后需将配置文件移动至正确的配置文件目录下,供配置中心微服务启动后读取。 - -### 3.2 后端微服务部署 - -- [后端服务部署](../install/backend.md) - -### 3.3 前端部署 - -首先,将编译生成的所有前端静态文件放置于正确的前端目录下,可参考1.1节部署目录。 -其次,对前端部署目录中的index.html文件做变量替换: -文件位置:/data/bkee/job/frontend/index.html -将其中的{{JOB_API_GATEWAY_URL}}替换为为Job后台API地址(通常为分配的独立API域名)。 -前端部署准备工作至此完成,后续通过配置Nginx作为前端静态服务即可。 - -### 3.4 Nginx配置与部署 -Job使用Nginx作为前端静态资源服务器并转发后端请求至job-gateway微服务,其配置可参考如下: -```shell script -# 前端静态资源服务server配置 -server { - listen 80; - server_name {{JOB_FRONTEND_HOST}}; - - gzip on; - client_max_body_size 150M; - root /data/bkee/job/frontend; - index index.html; - - location / { - add_header Cache-Control no-cache; - expires 0; - try_files $uri $uri/ @rewrites; - } - - location @rewrites { - rewrite ^(.+)$ /index.html last; - } -} -# 后台API转发server配置 -upstream job_gateway_servers { - server {{JOB_GATEWAY_IP0}}:19802; - server {{JOB_GATEWAY_IP1}}:19802; -} -server { - listen 80; - server_name {{JOB_API_HOST}}; - location / { - proxy_pass http://job_gateway_servers; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - } - access_log /data/bkee/logs/nginx-access.log json_combined; - client_max_body_size 2048M; - error_log /data/bkee/logs/nginx-error.log; - error_page 404 403 500 502 503 504 /job_error.html; - location = /job_error.html { - root /data/html; - } -} -``` -配置完成后reload nginx使其生效: -```shell script -nginx -s reload -c /path/to/nginx.conf -``` - -### 3.5 访问Job首页 -通过{{JOB_FRONTEND_HOST}}访问Job首页,即可开始体验Job功能。 diff --git a/docs/overview/operation.md b/docs/overview/operation.md index 94151e7d30..ce0bb1d972 100644 --- a/docs/overview/operation.md +++ b/docs/overview/operation.md @@ -1,5 +1,7 @@ # 蓝鲸作业平台部署与运维文档 +[English](operation_en.md) | 简体中文 + ## 一、部署 蓝鲸作业平台(后续简称作业平台)是蓝鲸原子平台之一,其底层依赖包括: ### 1.强依赖 diff --git a/docs/overview/operation_en.md b/docs/overview/operation_en.md index 196bcc607b..a598ca9f9d 100644 --- a/docs/overview/operation_en.md +++ b/docs/overview/operation_en.md @@ -1,5 +1,7 @@ # BlueKing Job Platform Deployment and Maintenance Documentation +English | [简体中文](operation.md) + ## I. Deployment The BlueKing Job Platform (Job) is one of the BlueKing atomic platforms. Its underlying dependencies include: