From e7b134deb7f5e299f4a66a840eef399689fc1a19 Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Mon, 25 Nov 2024 00:26:25 -0300 Subject: [PATCH] improve readme --- spaceship/README.md | 95 +++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 55 deletions(-) diff --git a/spaceship/README.md b/spaceship/README.md index 5417b8e8..2f8cfd1c 100644 --- a/spaceship/README.md +++ b/spaceship/README.md @@ -1,12 +1,11 @@ # Spaceship -Spaceship is an Ignite App designed to extend the [Ignite CLI](https://github.com/ignite/cli) by providing tools to -deploy blockchain applications via SSH. +Spaceship is an Ignite App designed to extend the [Ignite CLI](https://github.com/ignite/cli) by providing tools to deploy blockchain applications via SSH. ## Prerequisites -* Ignite CLI: Version `v28.4.0` or higher is required. -* Blockchain Scaffold: A blockchain scaffolded using Ignite +* **Ignite CLI**: Version `v28.4.0` or higher is required. +* **Blockchain Scaffold**: A blockchain scaffolded using Ignite. ## Usage @@ -19,68 +18,57 @@ ignite spaceship deploy 127.0.0.1 --user root --password password ignite spaceship deploy root@127.0.0.1 --key $HOME/.ssh/id_rsa --key-password key_password ``` -Each command initiates a build of the blockchain binary and sets up the chain's home directory based on the -configuration. The app then connects to the specified SSH server, establishes workspaces, transfers the binary, and -executes it using a runner script. The workspaces are organized under `$HOME/workspace/` and include: +Each command initiates a build of the blockchain binary and sets up the chain's home directory based on the configuration. The app then connects to the specified SSH server, establishes workspaces, transfers the binary, and executes it using a runner script. -- Binary Directory: `$HOME/workspace//bin` - Contains the chain binary. -- Home Directory: `$HOME/workspace//home` - Stores chain data. -- Log Directory: `$HOME/workspace//log` - Holds logs of the running chain. -- Runner Script: `$HOME/workspace//run.sh` - A script to start the binary in the background using nohup. -- PID File: `$HOME/workspace//spaceship.pid` - Stores the PID of the currently running chain instance. +The workspaces are organized under `$HOME/workspace/` and include: +- **Binary Directory**: `$HOME/workspace//bin` - Contains the chain binary. +- **Home Directory**: `$HOME/workspace//home` - Stores chain data. +- **Log Directory**: `$HOME/workspace//log` - Holds logs of the running chain. +- **Runner Script**: `$HOME/workspace//run.sh` - A script to start the binary in the background using `nohup`. +- **PID File**: `$HOME/workspace//spaceship.pid` - Stores the PID of the currently running chain instance. ### Managing the Chain To manage your blockchain deployment, use the following commands: -- Check status: - -```sh -ignite spaceship status root@127.0.0.1 --key $HOME/.ssh/id_rsa -``` - -- View logs: - -```sh -ignite spaceship log root@127.0.0.1 --key $HOME/.ssh/id_rsa -``` - -- Watch the logs in real time: - -```sh -ignite spaceship log root@127.0.0.1 --key $HOME/.ssh/id_rsa --real-time -``` - -- Restart the chain: - -```sh -ignite spaceship restart root@127.0.0.1 --key $HOME/.ssh/id_rsa -``` - -- Stop the Chain: - -```sh -ignite spaceship stop root@127.0.0.1 --key $HOME/.ssh/id_rsa -``` - -To redeploy the chain on the same server without overwriting the home directory, use the `--init-chain` flag to -reinitialize the chain if necessary. +- **Check status**: + ```sh + ignite spaceship status root@ --key $HOME/.ssh/id_rsa + ``` +- **View logs**: + ```sh + ignite spaceship log root@ --key $HOME/.ssh/id_rsa + ``` +- **Watch the logs in real time**: + ```sh + ignite spaceship log root@ --key $HOME/.ssh/id_rsa --real-time + ``` +- **Restart the chain**: + ```sh + ignite spaceship restart root@ --key $HOME/.ssh/id_rsa + ``` +- **Stop the chain**: + ```sh + ignite spaceship stop root@ --key $HOME/.ssh/id_rsa + ``` + +To redeploy the chain on the same server without overwriting the home directory, use the `--init-chain` flag to reinitialize the chain if necessary. ## Faucet -You can deploy your chain along with a faucet application passing the faucet flag to the deploy command +You can deploy your chain along with a faucet application by passing the faucet flag to the deploy command: ```ssh ignite spaceship deploy root@127.0.0.1 --key $HOME/.ssh/id_rsa --faucet ``` -and also specify the faucet port: +You can also specify the faucet port: ```ssh ignite spaceship deploy root@127.0.0.1 --key $HOME/.ssh/id_rsa --faucet --faucet-port 8077 ``` -To check the faucet logs, pass the parameter `faucet` to the `--app` flag into the log command: +To check the faucet logs, pass the parameter `faucet` to the `--app` flag in the log command: ```sh ignite spaceship log root@127.0.0.1 --key $HOME/.ssh/id_rsa --app faucet @@ -88,16 +76,13 @@ ignite spaceship log root@127.0.0.1 --key $HOME/.ssh/id_rsa --app faucet ### Config -You can override the default [chain configuration](https://docs.ignite.com/references/config#validators) by using the -Ignite configuration file. Validators' node configuration files are stored in the data directory. By default, Spaceship -initializes the chain locally in a temporary folder using the Ignite config file and then copies the configuration to -the remote machine at `$HOME/workspace//home`. -Configuration resets are performed by Ignite when necessary, especially when using the `--init-chain` flag or if the chain -was not previously initialized. +You can override the default [chain configuration](https://docs.ignite.com/references/config#validators) by using the Ignite configuration file. Validators' node configuration files are stored in the data directory. By default, Spaceship initializes the chain locally in a temporary folder using the Ignite config file and then copies the configuration to the remote machine at `$HOME/workspace//home`. -Example Ignite config: +Configuration resets are performed by Ignite when necessary, especially when using the `--init-chain` flag or if the chain was not previously initialized. -``` +**Example Ignite config**: + +```yaml validators: - name: alice bonded: '100000000stake'