← Back to Blog

Introducing Spaceship - Advanced Chain Deployment via SSH

Simplifying appchain deployment on remote servers with advanced SSH control

Danny Salman 2 min read

Spaceship is an Ignite App designed to simplify appchain deployment via SSH. It provides precise control over blockchain nodes on remote servers and integrates with existing Ignite configurations to ensure efficient and reliable management.

The App automates chain binary deployment and removes the manual effort of setting up and managing nodes across different environments. Builders can use Ignite's appchain scaffolding while maintaining flexibility across various infrastructures. This makes it ideal for projects that require rapid scaling or multi-location node management, as secure SSH, password management, validation checks and error handling guarantee safe and reliable deployments. Spaceship also adapts to different architectures by verifying server requirements and adjusting commands for Linux, cloud platforms or specialized hardware.

General Deployment Process

The process begins with building the chain binary using Ignite, followed by automated transfer and execution on the target server. The command structure is both straightforward and flexible, accommodating various SSH authentication methods:

  • Key-based Authentication:
ignite spaceship deploy root@127.0.0.1 --key $HOME/.ssh/id_rsa
  • Password-based Authentication:
ignite spaceship deploy 127.0.0.1 --user root --password password
  • Advanced Key Management:
ignite spaceship deploy root@127.0.0.1 --key $HOME/.ssh/id_rsa --key-password key_password

Each command initiates a series of actions: compiling the chain binary, establishing a structured workspace on the server, and executing the chain node through a customized runner script. The workspace is organized into specific directories for binaries, chain data, and logs, ensuring the node runs in a controlled and predictable environment.

Note that the binary is not run locally using ignite chain serve. Instead, the chain is built and initialized locally with Ignite. Afterward, the files and binary are transferred to the remote machine. The chain is then run on the remote server using the command: chaind start --home <SPACESHIP_WORKSPACE>/chaind/home.

Effortless deployment from build to execution.

Node Management

Spaceship offers tools to manage the lifecycle of deployed chain nodes. Key commands include:

  • Status Check: Verifies if the chain node is running as expected and provides detailed output on its current state.
ignite spaceship status root@127.0.0.1 --key $HOME/.ssh/id_rsa
  • Log Retrieval: Logs can be retrieved as snapshots or in real time to allow builders to monitor node operations and quickly identify issues.
ignite spaceship log root@127.0.0.1 --key $HOME/.ssh/id_rsa
  • Controlled Restart and Stop: Ensures the node can be safely restarted or stopped while preserving the integrity of chain data.
ignite spaceship restart root@127.0.0.1 --key $HOME/.ssh/id_rsa

Full control over your nodes, anytime.

Advanced Configuration

Spaceship uses Ignite’s config system to let builders fine-tune deployments by adjusting validator settings, pruning strategies, and output formats. It initializes the setup locally, verifies it, and securely transfers it to the remote server.

Here's an example of an Ignite config block:

validators:
  - name: alice
    bonded: '100000000stake'
    app:
      pruning: "nothing"
    config:
      moniker: "mychain"
    client:
      output: "json"

Builders can also adjust default chain configs in the Ignite config file or deploy existing projects without altering current settings. Spaceship initializes the chain locally, transfers it to $HOME/workspace/<chain-id>/home, and maintains the original architecture. Ignite automatically resets configs when needed, using the --init-chain flag or if the chain hasn't been initialized.

Tailor every deployment to your exact needs.

Deployment Example

Consider a scenario where a builder needs to deploy a new network with specific validator configs. Using Spaceship, the process would involve:

1. Building the Binary:

ignite chain build

2. Deploying via SSH:

ignite spaceship deploy root@192.168.1.100 --key $HOME/.ssh/id_rsa --init-chain

3. Monitoring the Deployment:

ignite spaceship log root@192.168.1.100 --key $HOME/.ssh/id_rsa --real-time

Simple deployment, every time.

Try it Out Yourself

To get started with Spaceship and unlock its full potential, dive into the latest Spaceship tutorial for a step-by-step guide on deploying your chain. Start building with Spaceship today.

Oct 16, 2024 - Last edited Nov 29, 2024