From 0df352ebc91469ddb5bb84d1c90622f86609543b Mon Sep 17 00:00:00 2001 From: Andrew Nikitin Date: Thu, 11 Nov 2021 17:00:55 +0300 Subject: [PATCH] Add instructions for making new directory tree Signed-off-by: Andrew Nikitin --- .../debian/deb-package-install.md | 3 +- .../debian/deb-package-upgrade.md | 36 ++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/docs/setup-and-configure/debian/deb-package-install.md b/docs/setup-and-configure/debian/deb-package-install.md index 2d6311ba1..0ce72a4f0 100644 --- a/docs/setup-and-configure/debian/deb-package-install.md +++ b/docs/setup-and-configure/debian/deb-package-install.md @@ -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** diff --git a/docs/setup-and-configure/debian/deb-package-upgrade.md b/docs/setup-and-configure/debian/deb-package-upgrade.md index e59541ece..7b787b831 100644 --- a/docs/setup-and-configure/debian/deb-package-upgrade.md +++ b/docs/setup-and-configure/debian/deb-package-upgrade.md @@ -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 ` * By opening the JSONRPC over HTTP status page through a web browser: `/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. -