Skip to content

Commit

Permalink
docs: improve documentation outline (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Oct 19, 2023
1 parent e5854f5 commit 97b9f55
Show file tree
Hide file tree
Showing 18 changed files with 111 additions and 49 deletions.
16 changes: 14 additions & 2 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@
- [From Source](./installation/from_source.md)
- [Docker](./installation/docker.md)
- [Kubernetes](./installation/kubernetes.md)
- [Usage](./usage/README.md)
- [Client Endpoint](./usage/client_endpoint.md)
- [Configuration](./configuration/README.md)
- [Upstream](./configuration/upstream.md)
- [RollDB](./configuration/rolldb.md)
- [Serve](./configuration/serve.md)
- [Byron](./configuration/byron.md)
- [Logging](./configuration/logging.md)
- [Examples](./configuration/examples.md)
- [Running](./running/README.md)
- [Sync](./running/sync.md)
- [Serve](./running/serve.md)
- [Daemon](./running/daemon.md)
- [API](./api/README.md)
- [gRPC](./api/grpc.md)
- [Ouroboros](./api/ouroboros.md)
- [Benchmarks](./benchmarks/README.md)
- [Long-running operation](./benchmarks/long_running.md)
1 change: 1 addition & 0 deletions book/src/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# API
27 changes: 2 additions & 25 deletions book/src/usage/client_endpoint.md → book/src/api/grpc.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Client Endpoint
# gRPC


## Introduction

Expand All @@ -7,30 +8,6 @@
- The current implemented module is the `Sync` module that allows clients to sync with the state of the chain stored by Dolos
- Dolos endpoint also supports gRPC-web, a variant of gRPC that can be used directly from browsers

## Starting the server

- There are 2 ways to start the server that provides access to the endpoints: the `serve` command and the `daemon` command

### `serve` mode

The `serve` command starts Dolos just with the purpose of exposing the client endpoint, no other functions are executed

To start Dolos in `serve` mode run the following command from the terminal:

```
dolos serve
```

### `daemon` mode

The `daemon` command starts Dolos with all of its main functions enabled (syncing from upstream, updating the ledger, etc) which includes the client endpoint server

To start Dolos in `daemon` mode run the following command from the terminal:

```
dolos daemon
```

## Connecting to the server

- Once started, the server exposes TCP port
Expand Down
1 change: 1 addition & 0 deletions book/src/api/ouroboros.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ouroboros
3 changes: 3 additions & 0 deletions book/src/configuration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Usage

This section provides information on how to configure Dolos.
6 changes: 6 additions & 0 deletions book/src/configuration/byron.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Byron

```toml
[byron]
path = "./byron.json"
```
22 changes: 22 additions & 0 deletions book/src/configuration/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Example Configuration

## Preview Network

```toml
[upstream]
peer_address = "preview-node.world.dev.cardano.org:30002"
network_magic = 2

[rolldb]
path = "./data"
k_param = 1000

[serve.grpc]
listen_address = "[::]:50051"

[byron]
path = "./byron.json"

[logging]
max_level = "debug"
```
6 changes: 6 additions & 0 deletions book/src/configuration/logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Logging

```toml
[logging]
max_level = "debug"
```
7 changes: 7 additions & 0 deletions book/src/configuration/rolldb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# RollDB

```toml
[rolldb]
path = "./data"
k_param = 1000
```
6 changes: 6 additions & 0 deletions book/src/configuration/serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Serve

```toml
[serve.grpc]
listen_address = "[::]:50051"
```
7 changes: 7 additions & 0 deletions book/src/configuration/upstream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Upstream

```toml
[upstream]
peer_address = "preview-node.world.dev.cardano.org:30002"
network_magic = 2
```
21 changes: 4 additions & 17 deletions book/src/installation/binary_release.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# Binary Releases

_Dolos_ can be run as a standalone executable. Follow the instructions for your particular OS / Platform to install a local copy from our Github pre-built releases.
_Dolos_ can be run as a standalone executable. The [Github release](https://github.com/txpipe/dolos/releases/latest/) page includes the binaries for different OS and architectures. It's a self-contained, single-file binary that can be downloaded directly.

## MacOS

Use the following command to download and install _Dolos'_ binary release for MacOS:
For simplicity, we also provide an install script that can be executed from your terminal to automate the installation process. This install script will only work for MacOS and Linux for either x86_64 and arm64 architecture. You can execute the install by running the following command from your terminal. You'll need curl and sudo access.

```sh
curl --silent --location https://git.io/JD2iH | \
tar xz -C /tmp && mv /tmp/dolos /usr/local/bin
curl -fsSL https://github.com/txpipe/dolos/raw/main/.github/public/install.sh -o get-dolos.sh
sudo sh ./get-dolos.sh
```

## GNU/Linux

Use the following command to download and install _Dolos'_ binary release for GNU/Linux:

```sh
curl --silent --location https://git.io/JD2ix | \
tar xz -C /tmp && mv /tmp/dolos /usr/local/bin
```

Check the [latest release](https://github.com/txpipe/dolos/releases/latest) for more binary download options.
10 changes: 8 additions & 2 deletions book/src/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ docker run -d -v $(pwd)/daemon.toml:/etc/dolos/daemon.toml \

Images are also tagged with the corresponding version number. It is highly recommended to use a fixed image version in production environments to avoid the effects of new features being included in each release (please remember dolos hasn't reached v1 stability guarantees).

To use a versioned image, replace the `latest` tag by the desired version with the `v` prefix. For example, to use version `1.0.0`, use the following image:
To use a versioned image, replace the `latest` tag by the desired version with the `v` prefix. For example, to use version `0.6.0`, use the following image:

```
ghcr.io/txpipe/dolos:v1.0.0
ghcr.io/txpipe/dolos:v0.6.0
```

## Multiple Architectures

_Dolos_ docker image is multi-arch, meaning that it can be used from different CPU architectures. We currently support `amd64` (aka `x86_64`) and `arm64`.

The Docker daemon will detect your architecture and use the correct manifest to run the image. The usage procedures are the same regardless of the architecture.
5 changes: 5 additions & 0 deletions book/src/running/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Usage

This section provides information on how to use Dolos.

- There are 2 ways to start the server that provides access to the endpoints: the `serve` command and the `daemon` command
9 changes: 9 additions & 0 deletions book/src/running/daemon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `daemon` mode

The `daemon` command starts Dolos with all of its main functions enabled (syncing from upstream, updating the ledger, etc) which includes the client endpoint server

To start Dolos in `daemon` mode run the following command from the terminal:

```
dolos daemon
```
9 changes: 9 additions & 0 deletions book/src/running/serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `serve` mode

The `serve` command starts Dolos just with the purpose of exposing the client endpoint, no other functions are executed

To start Dolos in `serve` mode run the following command from the terminal:

```
dolos serve
```
1 change: 1 addition & 0 deletions book/src/running/sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Sync
3 changes: 0 additions & 3 deletions book/src/usage/README.md

This file was deleted.

0 comments on commit 97b9f55

Please sign in to comment.