Skip to content

Commit

Permalink
Upgrade website to latest Docusaurus (#1439)
Browse files Browse the repository at this point in the history
* Upgrade yarn
* Upgrade to Docusaurus 3
  • Loading branch information
vcastellm authored Dec 12, 2023
1 parent 322a026 commit 1670a33
Show file tree
Hide file tree
Showing 31 changed files with 15,234 additions and 9,790 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ build
# Generated files
.docusaurus
.cache-loader
.yarn

# Misc
.env.local
Expand Down
Binary file added website/.yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions website/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
2 changes: 2 additions & 0 deletions website/docs/cli/dkron_completion_bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ If it is not installed already, you can install it via your OS's package manager

To load completions in your current shell session:

```
source <(dkron completion bash)
```

To load completions for every new session, execute once:

Expand Down
4 changes: 2 additions & 2 deletions website/docs/pro/acls.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The ACL system is designed to be easy to use and fast to enforce while providing

* **ACL Policies.** Dkron's ACL policies are simple JSON documents that define patterns to allow access to resources. You can find below an example ACL policy that works with the default OPA policy. The ACL JSON structure is not rigid you can adapt it to add new features in combination with the OPA Policy rules.

{{% notice note %}}
:::info
This guide is based on the usage of the default OPA Rego Policy
{{% /notice %}}
:::

## Configuring ACLs

Expand Down
2 changes: 2 additions & 0 deletions website/docs/pro/cli/dkron_completion_bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ If it is not installed already, you can install it via your OS's package manager

To load completions in your current shell session:

```
source <(dkron completion bash)
```

To load completions for every new session, execute once:

Expand Down
2 changes: 2 additions & 0 deletions website/docs/pro/cli/dkron_completion_zsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ to enable it. You can execute the following once:

To load completions in your current shell session:

```
source <(dkron completion zsh)
```

To load completions for every new session, execute once:

Expand Down
14 changes: 8 additions & 6 deletions website/docs/usage/cron-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ You may use one of several pre-defined schedules in place of a cron expression.
You may also schedule a job to execute at fixed intervals. This is supported by
formatting the cron spec like this:

@every <duration>
```
@every <duration>
```

where "duration" is a string accepted by time.ParseDuration
(<http://golang.org/pkg/time/#ParseDuration>).
where "duration" is a string accepted by time.ParseDuration http://golang.org/pkg/time/#ParseDuration.

For example, "@every 1h30m10s" would indicate a schedule that activates every
1 hour, 30 minutes, 10 seconds.
Expand All @@ -87,10 +88,11 @@ it will have only 2 minutes of idle time between each run.
You may also want to schedule a job to be executed once. This is supported by
formatting the cron spec like this:

```
@at <datetime>
```

Where "datetime" is a string accepted by time.Parse in RFC3339 format
(<https://golang.org/pkg/time/#Parse>).
Where "datetime" is a string accepted by time.Parse in RFC3339 format https://golang.org/pkg/time/#Parse.

For example, "@at 2018-01-02T15:04:00Z" would run the job on the specified date and time
assuming UTC timezone.
Expand All @@ -103,7 +105,7 @@ job definition.
If the time zone is not specified, the following rules apply:

All interpretation and scheduling is done in the machine's local time zone (as
provided by the Go time package (<http://www.golang.org/pkg/time>).
provided by the Go time package http://www.golang.org/pkg/time.

Be aware that jobs scheduled during daylight-savings leap-ahead transitions will
not be run!
Expand Down
14 changes: 13 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ const config = {
description_extended: 'Dkron is a system service for workload automation that runs scheduled jobs, just like unix cron service but distributed in several machines in a cluster. This is the only job scheduler in the market with truly no SPOF. It is open source and available for free.'
},

plugins: ['tailwindcss-loader'],
plugins: [
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
],

markdown: {
mermaid: true,
Expand Down
18 changes: 9 additions & 9 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^2.2.0",
"@docusaurus/preset-classic": "^2.2.0",
"@docusaurus/theme-mermaid": "^2.2.0",
"@docusaurus/core": "^3.0.1",
"@docusaurus/preset-classic": "^3.0.1",
"@docusaurus/theme-mermaid": "^3.0.1",
"@heroicons/react": "^1.0.5",
"@mdx-js/react": "^1.6.21",
"autoprefixer": "^10.4.2",
Expand All @@ -27,14 +27,13 @@
"postcss": "^8.4.6",
"postcss-import": "^14.0.2",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react": "^18.2.0",
"react-countup": "^6.2.0",
"react-dom": "^17.0.1",
"redocusaurus": "^1.0.2",
"react-dom": "^18.2.0",
"redocusaurus": "^2.0.0",
"stream": "^0.0.2",
"swagger-ui-react": "^4.5.2",
"tailwindcss": "^3.0.23",
"tailwindcss-loader": "file:plugins/tailwindcss-loader"
"tailwindcss": "^3.0.23"
},
"browserslist": {
"production": [
Expand All @@ -47,5 +46,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"packageManager": "yarn@4.0.2"
}
12 changes: 0 additions & 12 deletions website/plugins/tailwindcss-loader/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion website/src/pages/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Copyright (c) Victor Castell

Dkron is an Open Source project licensed under the terms of
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
the LGPLv3 license. Please see http://www.gnu.org/licenses/lgpl-3.0.html
for license text.
12 changes: 6 additions & 6 deletions website/versioned_docs/version-v1/basics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ All the execution responses will be gathered by the scheduler and stored in the

Dkron relies on the key-value store for data storage, an instance of the distributed store can be run in the same machines as Dkron or connect it to an already existing cluster.

{{% notice note %}}
:::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 %}}
:::

It is compatible with etcd, Consul, Zookeeper, Redis, DynamoDB and BoltDB. For instructions on how to install and configure any one of these systems refer to their official sites:

Expand All @@ -53,9 +53,9 @@ By default Dkron uses the following ports:
- `8080` for HTTP for the API and Dashboard
- `6868` for RPC comunication between agents.

{{% notice note %}}
:::note
Be sure you have opened this ports (or the ones that you configured) in your firewall or AWS security groups.
{{% /notice %}}
:::

By default dkron will use the embedded BoltDB KV store. A different store can be specified setting `backend` and `backend-machines` flag in the config file, env variables or as a command line flag.

Expand All @@ -67,9 +67,9 @@ dkron agent --server

Time to add the first job:

{{% notice note %}}
:::note
This job will only run in just one `dkron_server` node due to the node count in the tag. Refer to the [target node spec](/docs/usage/target-nodes-spec) for details.
{{% /notice %}}
:::

```bash
curl localhost:8080/v1/jobs -XPOST -d '{
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v1/basics/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Run Dkron with default setting: `dkron agent --server`
Navigate to http://localhost:8080


{{% notice note %}}
:::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

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v1/intro/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ toc: false
Copyright (c) Victor Castell

Dkron is an Open Source project licensed under the terms of
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
the LGPLv3 license. Please see http://www.gnu.org/licenses/lgpl-3.0.html
for license text.
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v1/pro/encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ By default Dkron Pro runs with automatically generated SSL certificates, this is

Follow [this tutorial](https://coreos.com/os/docs/latest/generate-self-signed-certificates.html) to generate autosigned SSL certificates for your instances.

{{% notice note %}}
:::note
You don't need a client certificate for Dkron server, just add "client auth" usage to your server cert.
{{% /notice %}}
:::

```yaml
# dkron.yaml
Expand Down
4 changes: 4 additions & 0 deletions website/versioned_docs/version-v1/usage/cron-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ You may use one of several pre-defined schedules in place of a cron expression.
You may also schedule a job to execute at fixed intervals. This is supported by
formatting the cron spec like this:

```
@every <duration>
```

where "duration" is a string accepted by time.ParseDuration
(http://golang.org/pkg/time/#ParseDuration).
Expand All @@ -86,7 +88,9 @@ it will have only 2 minutes of idle time between each run.
You may also want to schedule a job to be executed once. This is supported by
formatting the cron spec like this:

```
@at <datetime>
```

Where "datetime" is a string accepted by time.Parse in RFC3339 format
(https://golang.org/pkg/time/#Parse).
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v1/usage/ecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Use with AWS ECS
---

{{% notice note %}}
:::note
[Dkron Pro](/pro) comes with a [native ECS executor](/docs/v1/pro/executors/ecs) out of the box.
{{% /notice %}}
:::

## Use with Amazon ECS

Expand Down
4 changes: 3 additions & 1 deletion website/versioned_docs/version-v1/usage/plugins/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ weight: 99

## Developing a Plugin

{{% alert theme="warning" %}}**Advanced topic!** Plugin development is a highly advanced topic, and is not required knowledge for day-to-day usage. If you don't plan on writing any plugins, we recommend not reading the following section of the documentation.{{% /alert %}}
:::warning
**Advanced topic!** Plugin development is a highly advanced topic, and is not required knowledge for day-to-day usage. If you don't plan on writing any plugins, we recommend not reading the following section of the documentation.
:::

Developing a plugin is simple. The only knowledge necessary to write a plugin is basic command-line skills and basic knowledge of the Go programming language.

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v1/usage/target-nodes-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ weight: 10

You can choose whether a job is run on a node or nodes by specifying tags and a count of target nodes having this tag do you want a job to run.

{{% notice note %}}
:::note
The target node syntax: `[tag-value]:[count]`
{{% /notice %}}
:::

### Examples:

Expand Down
8 changes: 4 additions & 4 deletions website/versioned_docs/version-v2/basics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ By default Dkron uses the following ports:
- `8080` for HTTP for the API and Dashboard
- `6868` for gRPC and raft layer comunication between agents.

{{% notice note %}}
:::note
Be sure you have opened this ports (or the ones that you configured) in your firewall or AWS security groups.
{{% /notice %}}
:::

### Starting a single node

Expand All @@ -60,9 +60,9 @@ Check your server is working: `curl localhost:8080/v1`

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

{{% notice note %}}
:::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](/docs/usage/target-nodes-spec) for details.
{{% /notice %}}
:::

```bash
curl localhost:8080/v1/jobs -XPOST -d '{
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v2/intro/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ toc: false
Copyright (c) Victor Castell

Dkron is an Open Source project licensed under the terms of
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
the LGPLv3 license. Please see http://www.gnu.org/licenses/lgpl-3.0.html
for license text.
8 changes: 4 additions & 4 deletions website/versioned_docs/version-v2/pro/acls.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: Access Control

# Access Control (Preview)

{{% notice info %}}
:::info
This feature is in preview and is subject to big changes
{{% /notice %}}
:::

Dkron provides an optional Access Control List (ACL) system which can be used to control access to data and APIs. The ACL is Capability-based, relying on policies to determine which fine grained rules can be applied. Dkron's capability based ACL system is very similar to common ACL systems you are used to.

Expand All @@ -20,9 +20,9 @@ The ACL system is designed to be easy to use and fast to enforce while providing

* **ACL Policies.** Dkron's ACL policies are simple JSON documents that define patterns to allow access to resources. You can find below an example ACL policy that works with the default OPA policy. The ACL JSON structure is not rigid you can adapt it to add new features in combination with the OPA Policy rules.

{{% notice note %}}
:::note
This guide is based on the usage of the default OPA Rego Policy
{{% /notice %}}
:::

## Configuring ACLs

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v2/pro/encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ By default Dkron Pro runs with automatically generated SSL certificates, this is

Follow [this tutorial](https://coreos.com/os/docs/latest/generate-self-signed-certificates.html) to generate autosigned SSL certificates for your instances.

{{% notice note %}}
:::note
You don't need a client certificate for Dkron server, just add "client auth" usage to your server cert.
{{% /notice %}}
:::

```yaml
# dkron.yaml
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v2/pro/failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ title: Cross region failover

Dkron Pro can run federated in failover mode, this allows to have two clusters running in different regions and configure one of the clusters in an active-passive fashion, doing a failover in case the active cluster dies.

{{% notice note %}}
:::note
This feature is experimental and should be handled with care.
{{% /notice %}}
:::
4 changes: 4 additions & 0 deletions website/versioned_docs/version-v2/usage/cron-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ You may use one of several pre-defined schedules in place of a cron expression.
You may also schedule a job to execute at fixed intervals. This is supported by
formatting the cron spec like this:

```
@every <duration>
```

where "duration" is a string accepted by time.ParseDuration
(http://golang.org/pkg/time/#ParseDuration).
Expand All @@ -87,7 +89,9 @@ it will have only 2 minutes of idle time between each run.
You may also want to schedule a job to be executed once. This is supported by
formatting the cron spec like this:

```
@at <datetime>
```

Where "datetime" is a string accepted by time.Parse in RFC3339 format
(https://golang.org/pkg/time/#Parse).
Expand Down
Loading

0 comments on commit 1670a33

Please sign in to comment.