-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from superfly/book
Basic mdbook structure and _some_ docs
- Loading branch information
Showing
16 changed files
with
366 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Book | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # To push a branch | ||
pages: write # To push to a GitHub Pages site | ||
id-token: write # To update the deployment status | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: mdbook,mdbook-linkcheck | ||
|
||
- name: Build Book | ||
run: mdbook build | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v2 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: 'book' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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,4 +1,5 @@ | ||
/target | ||
/schema | ||
/config.toml | ||
/data | ||
/data | ||
/book |
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,10 @@ | ||
[book] | ||
authors = ["Jerome Gravel-Niquet"] | ||
language = "en" | ||
multilingual = false | ||
src = "doc" | ||
title = "Corrosion" | ||
|
||
[output.html] | ||
|
||
[output.linkcheck] |
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,26 @@ | ||
# Summary | ||
|
||
[Introduction](intro.md) | ||
|
||
# User guide | ||
- [Operations Guide]() | ||
|
||
# Reference | ||
- [Command-line Interface](cli/README.md) | ||
- [agent]() | ||
- [backup](cli/backup.md) | ||
- [consul]() | ||
- [exec]() | ||
- [query]() | ||
- [reload]() | ||
- [restore](cli/restore.md) | ||
- [sync]() | ||
- [template]() | ||
- [tls](cli/tls.md) | ||
- [Configuration](config/README.md) | ||
- [db]() | ||
- [gossip](config/gossip.md) | ||
- [api]() | ||
- [admin]() | ||
- [telemetry]() | ||
- [consul]() |
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,5 @@ | ||
# Command-line Interface | ||
|
||
See the chapters for each subcommand: | ||
- [`corrosion backup`](backup.md) | ||
- [`corrosion restore`](restore.md) |
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 @@ | ||
# The `corrosion backup` command | ||
|
||
Creates a backup of the current database by running `VACUUM INTO` and cleaning up node-specific data. This includes removing `crsql_site_id` as well as rewriting `__crsql_clock` tables to make the backup generic, ready for a `corrosion restore`. | ||
|
||
``` | ||
$ corrosion backup --help | ||
Backup the Corrosion DB | ||
Usage: corrosion backup [OPTIONS] <PATH> | ||
Arguments: | ||
<PATH> | ||
Options: | ||
-c, --config <CONFIG_PATH> Set the config file path [default: corrosion.toml] | ||
--api-addr <API_ADDR> | ||
--db-path <DB_PATH> | ||
--admin-path <ADMIN_PATH> | ||
-h, --help Print help | ||
``` |
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 @@ | ||
# The `corrosion restore` command | ||
|
||
Restores a database from a backup produced by `corrosion backup`. This is an "online restore", it acquires all the appropriate locks on the sqlite3 database so as to not disrupt database readers. It then replaces the database in-place and releases the locks. | ||
|
||
``` | ||
$ corrosion restore --help | ||
Restore the Corrosion DB from a backup | ||
Usage: corrosion restore [OPTIONS] <PATH> | ||
Arguments: | ||
<PATH> | ||
Options: | ||
-c, --config <CONFIG_PATH> Set the config file path [default: corrosion.toml] | ||
--api-addr <API_ADDR> | ||
--db-path <DB_PATH> | ||
--admin-path <ADMIN_PATH> | ||
-h, --help Print help | ||
``` |
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,62 @@ | ||
# The `corrosion tls` command | ||
|
||
In non-development environment, you'll want to configure `[gossip.tls]` to secure the transport of information within the cluster. | ||
|
||
``` | ||
$ corrosion tls --help | ||
Tls-related commands | ||
Usage: corrosion tls [OPTIONS] <COMMAND> | ||
Commands: | ||
ca TLS certificate authority commands | ||
server TLS server certificate commands | ||
client TLS client certificate commands (for mutual TLS) | ||
help Print this message or the help of the given subcommand(s) | ||
``` | ||
|
||
## `corrosion tls ca generate` | ||
|
||
A CA (Certificate Authority) is necessary to sign server certificates. It's expected for a Corrosion cluster to have a single CA key pair for signing all the nodes' server certificates. | ||
|
||
**Store the key somewhere secure!** | ||
|
||
```toml | ||
$ corrosion tls ca generate --help | ||
Generate a TLS certificate authority | ||
|
||
Usage: corrosion tls ca generate [OPTIONS] | ||
``` | ||
|
||
By default, certificates will be output as `ca_cert.pem` and `ca_key.pem` in the current directory. | ||
|
||
## `corrosion tls server generate` | ||
|
||
Generates a server certificate key pair for encrypting peer-to-peer packets. To be used in the `gossip.tls` configuration block. | ||
|
||
The command accepts a `<IP>` positional argument, it needs to be the IP address your cluster's nodes will use for connecting to the server you're generating the certificates for. | ||
|
||
You'll need to have previously generated a CA key pair as it's required to pass `--ca-key` and `--ca-cert` flags w/ paths to each PEM file respectively. | ||
|
||
``` | ||
$ corrosion tls server generate --help | ||
Generate a TLS server certificate from a CA | ||
Usage: corrosion tls server generate [OPTIONS] --ca-key <CA_KEY> --ca-cert <CA_CERT> <IP> | ||
Arguments: | ||
<IP> | ||
``` | ||
|
||
## `corrosion tls client generate` | ||
|
||
Generates a client certificate key pair to authorizing peer-to-peer clients. | ||
|
||
You'll need to have previously generated a CA key pair as it's required to pass `--ca-key` and `--ca-cert` flags w/ paths to each PEM file respectively. | ||
|
||
``` | ||
$ corrosion tls client generate | ||
Generate a TLS certificate from a CA | ||
Usage: corrosion tls client generate [OPTIONS] --ca-key <CA_KEY> --ca-cert <CA_CERT> | ||
``` |
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 @@ | ||
# Configuration |
Oops, something went wrong.