-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Victor Castell
committed
Nov 23, 2018
1 parent
c7da170
commit 4da0b3b
Showing
27 changed files
with
308 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,7 @@ | ||
--- | ||
title: "Basics" | ||
date: 2017-06-30T14:58:54+02:00 | ||
draft: false | ||
weight: 20 | ||
icon: "<b>1. </b>" | ||
--- | ||
|
||
## Dkron - Distributed, fault tolerant job scheduling system | ||
|
||
Welcome to the Dkron documentation! This is the reference guide on how to use Dkron. If you want a getting started guide refer to the [getting started guide](getting-started). | ||
|
||
## What is Dkron | ||
|
||
Dkron is a distributed system to run scheduled jobs against a server or a group of servers of any size. One of the machines is the leader and the others will be followers. If the leader fails or becomes unreachable, any other one will take over and reschedule all jobs to keep the system healthy. | ||
|
||
In case the old leader becomes alive again, it'll become a follower. | ||
|
||
Dkron is a distributed cron drop-in replacement, easy to setup and fault tolerant with focus in: | ||
|
||
- Easy: Easy to use with a great UI | ||
- Reliable: Completely fault tolerant | ||
- High scalable: Able to handle high volumes of scheduled jobs and thousands of nodes | ||
|
||
Dkron is written in Go and leverage the power of distributed key value stores and [Serf](https://www.serfdom.io/) for providing fault tolerance, reliability and scalability while keeping simple and easily installable. | ||
|
||
Dkron is inspired by the google whitepaper [Reliable Cron across the Planet](https://queue.acm.org/detail.cfm?id=2745840) | ||
|
||
Dkron runs on Linux, OSX and Windows. It can be used to run scheduled commands on a server cluster using any combination of servers for each job. It has no single points of failure due to the use of the fault tolerant distributed databases and can work at large scale thanks to the efficient and lightweight gossip protocol. | ||
|
||
Dkron uses the efficient and lightweight [gossip protocol](https://www.serfdom.io/docs/internals/gossip.html) underneath to communicate with nodes. Failure notification and task handling are run efficiently across an entire cluster of any size. | ||
|
||
## Web UI | ||
<center class="hidden-xs"> | ||
![](/img/screenshot1.png) | ||
</center> | ||
|
||
## Dkron design | ||
|
||
Dkron is designed to solve one problem well, executing commands in given intervals. Following the unix philosophy of doing one thing and doing it well (like the battle-tested cron) but with the given addition of being designed for the cloud era, removing single points of failure in environments where scheduled jobs are needed to be run in multiple servers. | ||
|
||
{{% children style="h2" depth="3" description="true" %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
|
||
--- | ||
title: Installation | ||
weight: 10 | ||
--- | ||
|
||
## Running the binary | ||
|
||
Download the packaged archive for your platform from the [downloads page](https://github.com/victorcoder/dkron/releases) and extract the package to a shared location in your drive, like /opt/local/bin. | ||
|
||
Run Dkron with default setting: `dkron agent --server` | ||
|
||
Navigate to http://localhost:8080 | ||
|
||
|
||
{{% notice note %}} | ||
By default dkron will start with a file based, embedded KV store called BoltDB, it is functional for a single node demo but does not offers clustering or HA. | ||
{{% /notice %}} | ||
|
||
## Installing the package | ||
|
||
### Debian repo | ||
|
||
APT repository: | ||
``` | ||
deb [trusted=yes] https://apt.fury.io/victorcoder/ / | ||
``` | ||
|
||
Then install: `sudo apt-get install dkron` | ||
|
||
### YUM repo | ||
|
||
YUM repository: | ||
|
||
``` | ||
[dkron] | ||
name=Dkron Pro Private Repo | ||
baseurl=https://yum.fury.io/victorcoder/ | ||
enabled=1 | ||
gpgcheck=0 | ||
``` | ||
|
||
Then install: `sudo apt-get install dkron` | ||
|
||
This will start Dkron as a system service and the place example configuration file under `/etc/dkron/dkron.yml` | ||
|
||
## Running in Docker | ||
|
||
Dkron provides an official Docker image vi Dockerhub that can be used for deployment on any system running Docker. | ||
|
||
### Launching Dkron on a new container | ||
|
||
Here’s a quick one-liner to get you off the ground (please note, we recommend further configuration for production deployments below): | ||
|
||
``` | ||
docker run -d -p 8080:8080 --name dkron dkron/dkron agent --server | ||
``` | ||
|
||
This will launch a Dkron server on port 8080 by default. You can use docker logs -f dkron to follow the rest of the initialization progress. Once the Dkron startup completes you can access the app at localhost:8080 | ||
|
||
Since Docker containers have their own ports and we just map them to the system ports as needed it’s easy to move Dkron onto a different system port if you wish. For example running Dkron on port 12345: | ||
|
||
``` | ||
docker run -d -p 12345:8080 --name dkron dkron/dkron | ||
``` | ||
|
||
### Mounting a mapped file storage volume | ||
|
||
In its default configuration Dkron uses the local filesystem to run a BoltDB embedded database to store its own application data. The end result is that your Dkron application data will be on disk inside your container and lost if you ever remove the container. | ||
|
||
To persist your data outside of the container and make it available for use between container launches we can mount a local file path inside our container. | ||
|
||
``` | ||
docker run -d -p 8080:8080 -v ~/dkron.db:/dkron.db --name dkron dkron/dkron agent --server | ||
``` | ||
|
||
Now when you launch your container we are mounting that file from our local filesystem into the container. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: "Intro" | ||
weight: 80 | ||
icon: "<b>1. </b>" | ||
--- | ||
|
||
## Dkron - Distributed, fault tolerant job scheduling system | ||
|
||
Welcome to the Dkron documentation! This is the reference guide on how to use Dkron. If you want a getting started guide refer to the [getting started guide](getting-started). | ||
|
||
## What is Dkron | ||
|
||
Dkron is a distributed system to run scheduled jobs against a server or a group of servers of any size. One of the machines is the leader and the others will be followers. If the leader fails or becomes unreachable, any other one will take over and reschedule all jobs to keep the system healthy. | ||
|
||
In case the old leader becomes alive again, it'll become a follower. | ||
|
||
Dkron is a distributed cron drop-in replacement, easy to setup and fault tolerant with focus in: | ||
|
||
- Easy: Easy to use with a great UI | ||
- Reliable: Completely fault tolerant | ||
- High scalable: Able to handle high volumes of scheduled jobs and thousands of nodes | ||
|
||
Dkron is written in Go and leverage the power of distributed key value stores and [Serf](https://www.serfdom.io/) for providing fault tolerance, reliability and scalability while keeping simple and easily installable. | ||
|
||
Dkron is inspired by the google whitepaper [Reliable Cron across the Planet](https://queue.acm.org/detail.cfm?id=2745840) | ||
|
||
Dkron runs on Linux, OSX and Windows. It can be used to run scheduled commands on a server cluster using any combination of servers for each job. It has no single points of failure due to the use of the fault tolerant distributed databases and can work at large scale thanks to the efficient and lightweight gossip protocol. | ||
|
||
Dkron uses the efficient and lightweight [gossip protocol](https://www.serfdom.io/docs/internals/gossip.html) underneath to communicate with nodes. Failure notification and task handling are run efficiently across an entire cluster of any size. | ||
|
||
## Web UI | ||
<center class="hidden-xs"> | ||
![](/img/screenshot1.png) | ||
</center> | ||
|
||
## Dkron design | ||
|
||
Dkron is designed to solve one problem well, executing commands in given intervals. Following the unix philosophy of doing one thing and doing it well (like the battle-tested cron) but with the given addition of being designed for the cloud era, removing single points of failure in environments where scheduled jobs are needed to be run in multiple servers. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Operations Guide | ||
weight: 60 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,6 @@ | ||
--- | ||
title: Dkron Pro | ||
weight: 40 | ||
--- | ||
|
||
## Getting started | ||
|
||
Dkron Pro provides a backend store out of the box, based on etcd. | ||
|
||
To configure the storage a sample `etcd.conf.yaml` file is provided in `/etc/dkron` path. Editing the file, allows to configure several options for the embedded store. | ||
|
||
The location of the store configuration can be set in the command line or in the dkron config file `/etc/dkron/dkron.yml` using `etcd-config-file-path` parameter. | ||
|
||
### Starting a single node | ||
|
||
Works out of the box, good for non HA installations. | ||
|
||
- System service: If no changes are done to the default config files, dkron will start as a service in single mode. | ||
- Command line: Running a single node with default config can be done by running: `dkron agent --server` | ||
|
||
Check your server is working: `curl localhost:8080/v1` | ||
|
||
Simple as that, now it is time to add some jobs: | ||
|
||
```bash | ||
curl localhost:8080/v1/jobs -XPOST -d '{ | ||
"name": "job1", | ||
"schedule": "@every 10s", | ||
"timezone": "Europe/Berlin", | ||
"owner": "Platform Team", | ||
"owner_email": "platform@example.com", | ||
"disabled": false, | ||
"tags": { | ||
"dkron_server": "true" | ||
}, | ||
"concurrency": "allow", | ||
"executor": "shell", | ||
"executor_config": { | ||
"command": "date" | ||
} | ||
}` | ||
``` | ||
## Configuration | ||
Dkron Pro uses the [same parameters](/basics/configuration) as Dkron OSS and add some extra parameters. | ||
### Command line options | ||
* `--etcd-config-file-path` - Etcd node config | ||
* `--username` - Authentication username | ||
* `--password` - Authentication password | ||
* `--cert-file` - Path to the client server TLS cert file | ||
* `--key-file` - Path to the client server TLS key file | ||
* `--client-crl-file` - Path to the client certificate revocation list file | ||
* `--trusted-ca-file` - Path to the client server TLS trusted CA cert file | ||
* `--client-cert-auth` - Enable client cert authentication | ||
* `--auto-tls` - Client TLS using generated certificates | ||
{{% children style="card" depth="2" description="true" %}} | ||
{{% children style="h3" description="true" %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
--- | ||
title: Configuration | ||
--- | ||
|
||
## Configuration | ||
|
||
Dkron Pro uses the [same parameters](/basics/configuration) as Dkron OSS and add some extra parameters. | ||
|
||
### Command line options | ||
|
||
* `--etcd-config-file-path` - Etcd node config | ||
* `--username` - Authentication username | ||
* `--password` - Authentication password | ||
* `--cert-file` - Path to the client server TLS cert file | ||
* `--key-file` - Path to the client server TLS key file | ||
* `--client-crl-file` - Path to the client certificate revocation list file | ||
* `--trusted-ca-file` - Path to the client server TLS trusted CA cert file | ||
* `--client-cert-auth` - Enable client cert authentication | ||
* `--auto-tls` - Client TLS using generated certificates |
Oops, something went wrong.