cronicle 任务调度一主多从安装试用
Posted rongfengliang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cronicle 任务调度一主多从安装试用相关的知识,希望对你有一定的参考价值。
cronicle 对于一主多从的安装还是很简单的,对于slave 就是少了setup一步,同时在master 界面,添加下slave 就可以了
就会加入集群中了
项目使用docker-compose 运行
环境准备
- docker-compose 文件
version: "3"
services:
cronicle:
image: dalongrong/cronicle
ports:
- "3012:3012"
cronicle2:
hostname: cronicle2
image: dalongrong/cronicle
ports:
- "3013:3012"
cronicle3:
hostname: cronicle3
image: dalongrong/cronicle
ports:
- "3014:3012"
启动&&配置
- 启动docker服务
docker-compose up -d
- 启动master
docker-compose exec cronicle /opt/cronicle/bin/control.sh setup
docker-compose exec cronicle /opt/cronicle/bin/control.sh start
效果
Setup completed successfully!
This server (066d3ba29173) has been added as the single primary master server.
An administrator account has been created with username ‘admin‘ and password ‘admin‘.
You should now be able to start the service by typing: ‘/opt/cronicle/bin/control.sh start‘
Then, the web interface should be available at: http://066d3ba29173:3012/
Please allow for up to 60 seconds for the server to become master.
/opt/cronicle/bin/control.sh start: Starting up Cronicle Daemon
/opt/cronicle/bin/control.sh start: Cronicle Daemon started
- 启动slave1
docker-compose exec cronicle2 /opt/cronicle/bin/control.sh start
效果
/opt/cronicle/bin/control.sh start: Starting up Cronicle Daemon
/opt/cronicle/bin/control.sh start: Cronicle Daemon started
- 启动slave2
docker-compose exec cronicle3 /opt/cronicle/bin/control.sh start
效果
/opt/cronicle/bin/control.sh start: Starting up Cronicle Daemon
/opt/cronicle/bin/control.sh start: Cronicle Daemon started
- 添加slave
- 添加之后的效果
- 一个简单的调度任务
- 执行效果
说明
cronicle 的单master 多slave 还是很方便的,使用上也很简单,配置方便
参考资料
https://github.com/jhuckaby/Cronicle#single-master-with-slaves
https://github.com/rongfengliang/cronicle-docker
以上是关于cronicle 任务调度一主多从安装试用的主要内容,如果未能解决你的问题,请参考以下文章
ShardingJdbc-分表;分库分表;读写分离;一主多从+分表;一主多从+分库分表;公共表;数据脱敏;分布式事务