Skip to content

Commit

Permalink
Merge pull request #323 from casper-network/add_installation
Browse files Browse the repository at this point in the history
Add installation instructions
  • Loading branch information
ipopescu authored Jun 19, 2024
2 parents e25d297 + 4eaa6a3 commit d8fabae
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 9 deletions.
18 changes: 18 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,24 @@ data:"Shutdown"
id:8
```

## Replaying the Event Stream

This command will replay the event stream from an old event onward. The server will replay all the cached events if the ID is 0 or if you specify an event ID already purged from the node's cache.

Replace the `HOST`, `PORT`, and `ID` fields with the values needed.

```sh
curl -sN http://HOST:PORT/events?start_from=ID
```

**Example:**

```sh
curl -sN http://65.21.235.219:9999/events?start_from=29267508
```

Note that certain shells like `zsh` may require an escape character before the question mark.

## The REST Server

The Sidecar provides a RESTful endpoint for useful queries about the state of the network.
Expand Down
41 changes: 32 additions & 9 deletions resources/ETC_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,39 @@ This page contains specific instructions for node operators. Before proceeding,
- [Running and testing the Sidecar](../README.md#running-and-testing-the-sidecar)
- [Troubleshooting tips](../README.md#troubleshooting-tips)

## Sidecar Configuration on the Node

## Configuring the Sidecar

The file `/etc/casper-sidecar/config.toml` holds a default configuration. This should work if installed on a Casper node.

If you install the Sidecar on an external server, you must update the `ip-address` values under `node_connections` appropriately.

For more information, including how to setup the SSE, RPC, REST, and Admin servers, read the [configuration options](../README.md#configuring-the-sidecar) in the main README.

## Storage on the Node

This directory stores the SSE cache and a database if the Sidecar was configured to use one.
## Installing the Sidecar on a Node

```toml
[storage]
storage_path = "/var/lib/casper-sidecar"
The following command will install the Debian package for the Casper Sidecar service on various flavors of Linux.

<!-- TODO Once the package is published, update the command below with the new link to the *.deb package. The link below assumes a package available locally. -->

```bash
sudo apt install ./casper-sidecar_0.1.0-0_amd64.deb
```

The DB setup is described [here](../README#database-connectivity-setup).
Check the service status:

```bash
systemctl status casper-sidecar
```

Check the logs and make sure the service is running as expected.

```bash
journalctl --no-pager -u casper-sidecar
```

If you see any errors, you may need to [update the configuration](#configuring-the-service) and restart the service with the commands below.

## Running the Sidecar on a Node

Expand All @@ -38,9 +53,17 @@ The `casper-sidecar` service starts after installation, using the systemd servic

`sudo systemctl start casper-sidecar.service`

### Logs

`journalctl --no-pager -u casper-sidecar`
## Sidecar Storage

This directory stores the SSE cache and a database if the Sidecar was configured to use one.

```toml
[storage]
storage_path = "/var/lib/casper-sidecar"
```

The DB setup is described [here](../README#database-connectivity-setup).

## Swagger Documentation

Expand Down

0 comments on commit d8fabae

Please sign in to comment.