You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cronsun/README.md

101 lines
2.7 KiB

8 years ago
# cronsun [![Build Status](https://travis-ci.org/shunfei/cronsun.svg?branch=master)](https://travis-ci.org/shunfei/cronsun)
8 years ago
`cronsun` is a distributed cron-style job system. It's similar with `crontab` on stand-alone `*nix`.
8 years ago
[简体中文](README_ZH.md)
## Purpose
8 years ago
The goal of this project is to make it much easier to manage jobs on lots of machines and provides high availability.
`cronsun` is different from [Azkaban](https://azkaban.github.io/), [Chronos](https://mesos.github.io/chronos/), [Airflow](https://airflow.incubator.apache.org/).
## Features
- Easy manage jobs on multiple machines
- Managemant panel
- Mail service
8 years ago
- Multi-language support
## Architecture
8 years ago
```
[web]
|
--------------------------
(add/del/update/exec jobs)| |(query job exec result)
[etcd] [mongodb]
| ^
-------------------- |
| | | |
[node.1] [node.2] [node.n] |
(job exec fail)| | | |
[send mail]<-----------------------------------------(job exec result)
```
8 years ago
## Security
8 years ago
`cronsun` support security with `security.json` config. When `open=true` job command is only allow local files with special extension on the node.
8 years ago
```json
{
"open": true,
"#users": "allowed execution users",
8 years ago
"users": [
"www", "db"
],
"#ext": "allowed execution file extension",
8 years ago
"ext": [
".cron.sh", ".cron.py"
]
}
```
8 years ago
## Getting started
8 years ago
### Setup / installation
8 years ago
Install from binary [releases](https://github.com/shunfei/cronsun/releases), download and unzip.
Or build from source, require `go >= 1.7+`
8 years ago
```
8 years ago
go get -u github.com/shunfei/cronsun
cd $GOPATH/src/github.com/shunfei/cronsun
8 years ago
sh build.sh
8 years ago
```
### Run
1. Install [MongoDB](http://docs.mongodb.org/manual/installation/)
2. Install [etcd3](https://github.com/coreos/etcd)
3. Modify config in `conf` dir
4. Start Node: `./cronnode -conf conf/base.json`, start Web: `./cronweb -conf conf/base.json`
5. Opne `http://127.0.0.1:7079/ui/` with the browser
8 years ago
## Screenshot
**Brief**:
8 years ago
![](doc/img/Cronsun_dashboard_en.png)
8 years ago
**Exec result**:
8 years ago
![](doc/img/Cronsun_log_list_en.png)
![](doc/img/Cronsun_log_item_en.png)
8 years ago
**Job**:
8 years ago
![](doc/img/Cronsun_job_list_en.png)
8 years ago
8 years ago
![](doc/img/Cronsun_job_new_en.png)
8 years ago
**Node**:
8 years ago
![](doc/img/Cronsun_node_en.png)
8 years ago
## Credits
cron is base on [robfig/cron](https://github.com/robfig/cron)