Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for making new directory tree #204

Merged
merged 1 commit into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/setup-and-configure/debian/deb-package-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ This document provides guidance on how to install and configure a node for the c

As a part of installation `cheqd` user will be created. By default, `HOME` directory for the user is `/home/cheqd`, but it can be changed by setting `CHEQD_HOME_DIR` environment variable before running `dpkg` command, like:
```bash
sudo CHEQD_HOME_DIR=/path/to/home/directory dpkg -i cheqd-node_0.2.3_amd64.deb
sudo CHEQD_HOME_DIR=/path/to/home/directory dpkg -i cheqd-node_0.2.4_amd64.deb
```
P.S. ability to change default `$HOME` directory is supported only in version `0.2.4` and upper.

3. **Switch to the `cheqd` system user**

Expand Down
36 changes: 35 additions & 1 deletion docs/setup-and-configure/debian/deb-package-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,41 @@ An alternative method to check a node's status is via the RPC interface, if it h
* Remotely via the RPC interface: `cheqd-noded status --node <rpc-address>`
* By opening the JSONRPC over HTTP status page through a web browser: `<node-address:rpc-port>/status`

## Upgrade from `0.2.3` to `0.2.4`.
According to debian package usage on AWS instances and recovering after crashes we introduced new storage and mount points approach.
For now, `$HOME` directory excepts to be `/home/cheqd` by default or it can be changed while `.deb` package install, like:
```bash
sudo CHEQD_HOME_DIR=/path/to/home/directory dpkg -i cheqd-node_0.2.4_amd64.deb
```
In general, it's not required and up to system administrators how to ensure safe revocring after crashes.

If you have `0.2.3` version installed and you want to follow the new `$HOME` directory approach the next steps can help with it:
* Please define the mount point for `cheqd` root directory where all the configs and data will be placed. For example, let it be `/cheqd`.
* Stop `cheqd-noded` service by running:
```bash
$ sudo systemctl stop cheqd-noded
```
* Install `.deb` package for `0.2.4` version:
```bash
sudo CHEQD_HOME_DIR=/cheqd dpkg -i cheqd-node_0.2.4_amd64.deb
```
* After that the next directory tree is expected:
```bash
/cheqd/.cheqdnode/data
/cheqd/.cheqdnode/config
/cheqd/.cheqdnode/log
```
* After that you should move all the configs from previous location into the new one `/cheqd/.cheqdnode/config`, data into `/cheqd/.cheqdnode/data`. It's assumed that root directory `/cheqd` will be stored and mounted as external resource and will not be removed after potential instance crashing.
* For logs symlink can be created by using command:
```bash
ln -s /cheqd/.cheqdnode/log /var/log/cheqd-node
```
* Start `cheqd-noded` service by running:
```bash
$ sudo systemctl start cheqd-noded
```
and check the service status or just check RPC endpoint.

## Next steps

For further confirmation on whether your node is working correctly, we recommend attempting to [run commands from the cheqd CLI guide](../../cheqd-cli/readme.md); e.g., query the ledger for transactions, account balances etc.