All Projects → sinksmell → bee-crontab

sinksmell / bee-crontab

Licence: other
go 语言实现的分布式定时任务调度器

Programming Languages

go
31211 projects - #10 most used programming language
HTML
75241 projects
Makefile
30231 projects

Bee-crontab

GoDoc

基于go语言实现的一个分布式的任务调度系统,类似crontab

  • 可视化Web后台管理,配置定时任务方便
  • 分布式架构,集群化调度,可用性高
  • 秒级调度,准确性高
  • 追踪任务执行状态,采集任务输出
  • 可视化日志查看

Bee-crontab 架构图

worker节点核心 调度器架构图

应用界面

  • 主界面

  • 添加任务

  • 查看当前worker节点信息

  • 查看任务执行日志

k8s部署

测试集群

  • 建立上图对应的k8s资源,检查pod状态
master@ubuntu:~/k8s/bee_crontab$ kubectl get po
NAME                              READY   STATUS    RESTARTS   AGE
bc-master-76df4bb9cf-l2wz2        1/1     Running   2          12h
bc-master-76df4bb9cf-vl2h8        1/1     Running   0          18s
bc-worker-58bd56f44c-5gzjl        1/1     Running   2          12h
bc-worker-58bd56f44c-cwrbc        1/1     Running   2          12h
bc-worker-58bd56f44c-d98vq        1/1     Running   2          12h
etcd-operator-84db9bc774-lzvrs    1/1     Running   10         3d
example-etcd-cluster-b64p5wxst8   1/1     Running   0          3m36s
mongo-69d6d44cb4-4lst7            1/1     Running   4          3d18h

  • 查看Service 的ip
master@ubuntu:~/k8s/bee_crontab$ kubectl get svc
NAME                                  TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
bc-master                             ClusterIP   10.152.183.229   <none>        80/TCP              13h
example-etcd-cluster                  ClusterIP   None             <none>        2379/TCP,2380/TCP   7m2s
example-etcd-cluster-client           ClusterIP   10.152.183.2     <none>        2379/TCP            7m2s
example-etcd-cluster-client-service   NodePort    10.152.183.54    <none>        2379:32379/TCP      2d23h
kubernetes                            ClusterIP   10.152.183.1     <none>        443/TCP             6d23h
mongo                                 ClusterIP   10.152.183.161   <none>        27017/TCP           3d18h
nginx-app                             ClusterIP   10.152.183.159   <none>        80/TCP              6d22h

  • 根据Service的信息修改master和worker的配置文件中的etcd和mongodb的地址

  • 使用浏览器访问master提供的管理界面

测试结果

部分图标资源未找到

  • 主界面
  • 查看健康节点
  • 添加任务
  • 查看任务执行日志

可以看到集群可以正常工作,任务不会被并发调度。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].