Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Jul 10, 2019
1 parent c474d13 commit 8f44062
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 51 deletions.
42 changes: 12 additions & 30 deletions website/content/basics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,38 +50,15 @@ Be sure you have opened this ports (or the ones that you configured) in your fir
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": {
"server": "true"
},
"concurrency": "allow",
"executor": "shell",
"executor_config": {
"command": "date"
}
}'
```

To start a Dkron server instance:
- Command line: Running a single node with default config can be done by running: `dkron agent --server --bootstrap-expect=1`

```
dkron agent --server
dkron agent --server --bootstrap-expect=1
```

Time to add the first job:
Check your server is working: `curl localhost:8080/v1`

Simple as that, now it is time to add a job:

{{% notice note %}}
This job will only run in just one `server` node due to the node count in the tag. Refer to the [target node spec](/usage/target-nodes-spec) for details.
Expand All @@ -96,16 +73,21 @@ curl localhost:8080/v1/jobs -XPOST -d '{
"owner_email": "platform@example.com",
"disabled": false,
"tags": {
"server": "true:1"
"server": "true"
},
"metadata": {
"user": "12345"
}
"concurrency": "allow",
"executor": "shell",
"executor_config": {
"command": "date"
}
}`
}'
```

For full Job params description refer to the Job model in the [API guide](/api)

That's it!

#### To start configuring an HA installation of Dkron follow the [clustering guide](/usage/clustering)
5 changes: 3 additions & 2 deletions website/content/cli/dkron.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: 2019-03-22
date: 2019-07-10
title: "dkron"
slug: dkron
url: /cli/dkron/
Expand Down Expand Up @@ -27,6 +27,7 @@ If a machine fails (the leader), a follower will take over and keep running the
* [dkron doc](/cli/dkron_doc/) - Generate Markdown documentation for the Dkron CLI.
* [dkron keygen](/cli/dkron_keygen/) - Generates a new encryption key
* [dkron leave](/cli/dkron_leave/) - Force an agent to leave the cluster
* [dkron raft](/cli/dkron_raft/) - Command to perform some raft operations
* [dkron version](/cli/dkron_version/) - Show version

###### Auto generated by spf13/cobra on 22-Mar-2019
###### Auto generated by spf13/cobra on 10-Jul-2019
14 changes: 7 additions & 7 deletions website/content/cli/dkron_agent.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: 2019-03-22
date: 2019-07-10
title: "dkron agent"
slug: dkron_agent
url: /cli/dkron_agent/
Expand All @@ -10,7 +10,7 @@ Start a dkron agent

### Synopsis

Start a dkron agent that schedule jobs, listen for executions and run executors.
Start a dkron agent that schedules jobs, listens for executions and runs executors.
It also runs a web UI.

```
Expand All @@ -22,17 +22,16 @@ dkron agent [flags]
```
--advertise-addr string Address used to advertise to other nodes in the cluster. By default, the bind address is advertised
--advertise-rpc-port int Use the value of rpc-port by default
--backend string Store backend (etcd|etcdv3|consul|zk|redis|boltdb|dynamodb) (default "boltdb")
--backend-machine strings Store backend machines addresses (default [./dkron.db])
--backend-password string Store backend machines password or token, only REDIS/CONSUL
--bind-addr string Address to bind network listeners to (default "0.0.0.0:8946")
--bootstrap-expect int Expected cluster size
--data-dir string Specifies the directory to use - for server-specific data, including the replicated log. By default, this is - the top-level data_dir suffixed with [server], like [/var/lib/dkron] (default "dkron.data")
--datacenter string Specifies the data center of the local agent. All members of a datacenter should share a local LAN connection. (default "dc1")
--dog-statsd-addr string DataDog Agent address
--dog-statsd-tags strings Datadog tags, specified as key:value
--encrypt string Key for encrypting network traffic. Must be a base64-encoded 16-byte key
-h, --help help for agent
--http-addr string Address to bind the UI web server to. Only used when server (default ":8080")
--join strings An initial agent to join with. This flag can be specified multiple times
--keyspace string The keyspace to use. A prefix under all data is stored for this instance (default "dkron")
--log-level string Log level (debug|info|warn|error|fatal|panic) (default "info")
--mail-from string From email address to use
--mail-host string Mail server host address to use for notifications
Expand All @@ -43,6 +42,7 @@ dkron agent [flags]
--mail-username string Mail server username used for authentication
--node-name string Name of this node. Must be unique in the cluster (default "pris.local")
--profile string Profile is used to control the timing profiles used (default "lan")
--region string Specifies the region the Dkron agent is a member of. A region typically maps to a geographic region, for example us, with potentially multiple zones, which map to datacenters such as us-west and us-east (default "global")
--rpc-port int RPC Port used to communicate with clients. Only used when server. The RPC IP Address will be the same as the bind address (default 6868)
--server This node is running in server mode
--statsd-addr string Statsd address
Expand All @@ -62,4 +62,4 @@ dkron agent [flags]

* [dkron](/cli/dkron/) - Open source distributed job scheduling system

###### Auto generated by spf13/cobra on 22-Mar-2019
###### Auto generated by spf13/cobra on 10-Jul-2019
4 changes: 2 additions & 2 deletions website/content/cli/dkron_doc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: 2019-03-22
date: 2019-07-10
title: "dkron doc"
slug: dkron_doc
url: /cli/dkron_doc/
Expand Down Expand Up @@ -37,4 +37,4 @@ dkron doc [flags]

* [dkron](/cli/dkron/) - Open source distributed job scheduling system

###### Auto generated by spf13/cobra on 22-Mar-2019
###### Auto generated by spf13/cobra on 10-Jul-2019
4 changes: 2 additions & 2 deletions website/content/cli/dkron_keygen.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: 2019-03-22
date: 2019-07-10
title: "dkron keygen"
slug: dkron_keygen
url: /cli/dkron_keygen/
Expand Down Expand Up @@ -34,4 +34,4 @@ dkron keygen [flags]

* [dkron](/cli/dkron/) - Open source distributed job scheduling system

###### Auto generated by spf13/cobra on 22-Mar-2019
###### Auto generated by spf13/cobra on 10-Jul-2019
7 changes: 2 additions & 5 deletions website/content/cli/dkron_leave.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: 2019-03-22
date: 2019-07-10
title: "dkron leave"
slug: dkron_leave
url: /cli/dkron_leave/
Expand All @@ -13,9 +13,6 @@ Force an agent to leave the cluster
Stop stops an agent, if the agent is a server and is running for election
stop running for election, if this server was the leader
this will force the cluster to elect a new leader and start a new scheduler.
If this is a server and has the scheduler started stop it, ignoring if this server
was participating in leader election or not (local storage).
Then actually leave the cluster.

```
dkron leave [flags]
Expand All @@ -38,4 +35,4 @@ dkron leave [flags]

* [dkron](/cli/dkron/) - Open source distributed job scheduling system

###### Auto generated by spf13/cobra on 22-Mar-2019
###### Auto generated by spf13/cobra on 10-Jul-2019
34 changes: 34 additions & 0 deletions website/content/cli/dkron_raft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
date: 2019-07-10
title: "dkron raft"
slug: dkron_raft
url: /cli/dkron_raft/
---
## dkron raft

Command to perform some raft operations

### Synopsis

Command to perform some raft operations

### Options

```
-h, --help help for raft
--rpc-addr string gRPC address of the agent (default "127.0.0.1:6868")
```

### Options inherited from parent commands

```
--config string config file path
```

### SEE ALSO

* [dkron](/cli/dkron/) - Open source distributed job scheduling system
* [dkron raft list-peers](/cli/dkron_raft_list-peers/) - Command to list raft peers
* [dkron raft remove-peer](/cli/dkron_raft_remove-peer/) - Command to list raft peers

###### Auto generated by spf13/cobra on 10-Jul-2019
36 changes: 36 additions & 0 deletions website/content/cli/dkron_raft_list-peers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
date: 2019-07-10
title: "dkron raft list-peers"
slug: dkron_raft_list-peers
url: /cli/dkron_raft_list-peers/
---
## dkron raft list-peers

Command to list raft peers

### Synopsis

Command to list raft peers

```
dkron raft list-peers [flags]
```

### Options

```
-h, --help help for list-peers
```

### Options inherited from parent commands

```
--config string config file path
--rpc-addr string gRPC address of the agent (default "127.0.0.1:6868")
```

### SEE ALSO

* [dkron raft](/cli/dkron_raft/) - Command to perform some raft operations

###### Auto generated by spf13/cobra on 10-Jul-2019
37 changes: 37 additions & 0 deletions website/content/cli/dkron_raft_remove-peer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
date: 2019-07-10
title: "dkron raft remove-peer"
slug: dkron_raft_remove-peer
url: /cli/dkron_raft_remove-peer/
---
## dkron raft remove-peer

Command to list raft peers

### Synopsis

Command to list raft peers

```
dkron raft remove-peer [flags]
```

### Options

```
-h, --help help for remove-peer
--peer-id string Remove a Dkron server with the given ID from the Raft configuration.
```

### Options inherited from parent commands

```
--config string config file path
--rpc-addr string gRPC address of the agent (default "127.0.0.1:6868")
```

### SEE ALSO

* [dkron raft](/cli/dkron_raft/) - Command to perform some raft operations

###### Auto generated by spf13/cobra on 10-Jul-2019
4 changes: 2 additions & 2 deletions website/content/cli/dkron_version.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: 2019-03-22
date: 2019-07-10
title: "dkron version"
slug: dkron_version
url: /cli/dkron_version/
Expand Down Expand Up @@ -32,4 +32,4 @@ dkron version [flags]

* [dkron](/cli/dkron/) - Open source distributed job scheduling system

###### Auto generated by spf13/cobra on 22-Mar-2019
###### Auto generated by spf13/cobra on 10-Jul-2019
2 changes: 1 addition & 1 deletion website/content/pro/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ title: Dkron Pro
weight: 40
---

{{% children style="h3" description="true" %}}
{{% children style="li" depth="999" %}}
2 changes: 2 additions & 0 deletions website/content/pro/executors/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
title: Executors
---

{{% children style="h3" description="true" %}}

0 comments on commit 8f44062

Please sign in to comment.