Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bba3307c
authored
Nov 04, 2018
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Docker 部署文档
parent
b990724e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
doc/XXL-JOB官方文档.md
xxl-job-admin/pom.xml
doc/XXL-JOB官方文档.md
View file @
bba3307c
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
@@ -316,7 +316,7 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
...
@@ -316,7 +316,7 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
xxl.job.i18n=
xxl.job.i18n=
#### 步骤二:部署项目:
#### 步骤二:部署项目:
如果已经正确进行上述配置,可将项目编译打
war包并部署到tomcat中
。
如果已经正确进行上述配置,可将项目编译打
包部署
。
调度中心访问地址:http://localhost:8080/xxl-job-admin (该地址执行器将会使用到,作为回调地址),登录后运行界面如下图所示
调度中心访问地址:http://localhost:8080/xxl-job-admin (该地址执行器将会使用到,作为回调地址),登录后运行界面如下图所示


...
@@ -332,6 +332,26 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
...
@@ -332,6 +332,26 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
-
集群机器时钟保持一致(单机集群忽视);
-
集群机器时钟保持一致(单机集群忽视);
-
建议:推荐通过nginx为调度中心集群做负载均衡,分配域名。调度中心访问、执行器回调配置、调用API服务等操作均通过该域名进行。
-
建议:推荐通过nginx为调度中心集群做负载均衡,分配域名。调度中心访问、执行器回调配置、调用API服务等操作均通过该域名进行。
#### 其他:Docker 镜像方式搭建调度中心:
-
下载镜像
```
// Docker地址:https://hub.docker.com/r/xuxueli/xxl-job-admin/
docker pull xuxueli/xxl-job-admin
```
-
创建容器并运行
```
docker run -p 8080:8080 -v /tmp:/data/applogs --name xxl-job-admin -d xuxueli/xxl-job-admin
/**
* 如需自定义 mysql 等配置,可通过 "PARAMS" 指定;
* 配置项参考文件:/xxl-job/xxl-job-admin/src/main/resources/application.properties
*/
docker run -e PARAMS="--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl-job?Unicode=true&characterEncoding=UTF-8" -p 8080:8080 -v /tmp:/data/applogs --name xxl-job-admin -d xuxueli/xxl-job-admin
```
### 2.4 配置部署“执行器项目”
### 2.4 配置部署“执行器项目”
“执行器”项目:xxl-job-executor-sample-spring (提供多种版本执行器供选择,现以Spring版本为例,可直接使用,也可以参考其并将现有项目改造成执行器)
“执行器”项目:xxl-job-executor-sample-spring (提供多种版本执行器供选择,现以Spring版本为例,可直接使用,也可以参考其并将现有项目改造成执行器)
...
...
xxl-job-admin/pom.xml
View file @
bba3307c
...
@@ -131,6 +131,24 @@
...
@@ -131,6 +131,24 @@
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<!-- docker -->
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
0.4.13
</version>
<configuration>
<!-- made of '[a-z0-9-_.]' -->
<imageName>
${project.artifactId}:${project.version}
</imageName>
<dockerDirectory>
${project.basedir}
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.build.directory}
</directory>
<include>
${project.build.finalName}.jar
</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment