Customizing Solo with Tasks

Use the Task runner to deploy and customize Solo networks, then explore maintained GitHub example projects for common workflows.

Overview

The Task tool (task) is a task runner that enables you to deploy and customize Solo networks using infrastructure-as-code patterns. Rather than running individual Solo CLI commands, you can use predefined Taskfile targets to orchestrate complex deployment workflows with a single command.

This guide covers installing the Task tool, understanding available Taskfile targets, and using them to deploy networks with various configurations. It also points to maintained example projects that demonstrate common Solo workflows.

Note: This guide assumes you have cloned the Solo repository and have basic familiarity with command-line interfaces and Docker.

Prerequisites

Before you begin, ensure you have completed the following:

  • System Readiness: Prepare your local environment (Docker, Kind, Kubernetes, and related tooling).
  • Quickstart: You are familiar with the basic Solo workflow and the solo one-shot single deploy command.

Tip: Task-based workflows are ideal for developers who want to:

  • Run the same deployment multiple times reliably.
  • Customize network components (add mirror nodes, relays, block nodes, etc.).
  • Use version control to track deployment configurations.
  • Integrate Solo deployments into CI/CD pipelines.

Install the Task Tool

The Task tool is a dependency for using Taskfile targets in the Solo repository. Install it using one of the following methods:

brew install go-task/tap/go-task

Using npm

npm install -g @go-task/cli

Verify the installation:

task --version

Expected output:

Task version: v3.X.X

Using package managers

Visit the Task installation guide for additional installation methods for your operating system.

Understanding the Task Structure

The Solo repository uses a modular Task architecture located in the scripts/ directory:

scripts/
├── Taskfile.yml                    # Main entry point (includes other Taskfiles)
├── Taskfile.scripts.yml            # Core deployment and management tasks
├── Taskfile.examples.yml           # Example project tasks
├── Taskfile.release.yml            # Package publishing tasks
└── [other helper scripts]

How to Run Tasks

From the root directory or any example directory, run:

# Run the default task
task

# Run a specific task
task <task-name>

# Run tasks with variables
task <task-name> -- VAR_NAME=value

Deploy Network Configurations

Basic Network Deployment

Deploy a standalone Hiero Consensus Node network with a single command:

# From the repository root, navigate to scripts directory
cd scripts

# Deploy default network (2 consensus nodes)
task default

This command performs the following actions:

  • Initializes Solo and downloads required dependencies.
  • Creates a local Kubernetes cluster using Kind.
  • Deploys 2 consensus nodes.
  • Sets up gRPC and JSON-RPC endpoints for client access.

Deploy Network with Mirror Node

Deploy a network with a consensus node, mirror node, and Hiero Explorer:

cd scripts

task default-with-mirror

This configuration includes:

ComponentDescription
Consensus Node2 consensus nodes running Hiero
Mirror NodeStores and serves historical transaction data
Explorer UIWeb interface for viewing accounts

Access the Explorer at: http://localhost:8080

Deploy Network with Relay and Explorer

Deploy a network with consensus nodes, mirror node, explorer, and JSON-RPC relay for Ethereum-compatible access:

cd scripts

task default-with-relay

This configuration includes:

ComponentDescription
Consensus Node2 consensus nodes running Hiero
Mirror NodeStores and serves historical transaction data
Explorer UIWeb interface for viewing accounts
JSON-RPC RelayEthereum-compatible JSON-RPC interface

Access the services at:

  • Explorer: http://localhost:8080
  • JSON-RPC Relay: http://localhost:7546

Available Taskfile Targets

The Taskfile includes a comprehensive set of targets for deploying and managing Solo networks. Below are the most commonly used targets, organized by category.

Core Deployment Targets

These targets handle the primary deployment lifecycle:

TaskDescription
defaultComplete deployment workflow for Solo
installInitialize cluster, create deployment, and setup consensus net
destroyTear down the consensus network
cleanFull cleanup: destroy network, remove cache, logs, and files
startStart all consensus nodes
stopStop all consensus nodes

Example: Deploy, then clean up

cd scripts

# Deploy the network
task default

# ... (use the network)

# Stop the network
task stop

# Remove all traces of the deployment
task clean

Cache and Log Cleanup

When cleaning up, you can selectively remove specific components:

TaskDescription
clean:cacheRemove the Solo cache directory (~/.solo/cache)
clean:logsRemove the Solo logs directory (~/.solo/logs)
clean:tmpRemove temporary deployment files

Mirror Node Management

Add, configure, or remove mirror nodes from an existing deployment:

TaskDescription
solo:mirror-nodeAdd a mirror node to the current deployment
solo:destroyer-mirror-nodeRemove the mirror node from the deployment

Example: Add mirror node to running network

cd scripts

# Start with a basic network
task default

# Add mirror node later
task solo:mirror-node

# Remove mirror node
task solo:destroyer-mirror-node

Explorer UI Management

Deploy or remove the Hiero Explorer for transaction/account viewing:

TaskDescription
solo:explorerAdd explorer UI to the current deployment
solo:destroy-explorerRemove explorer UI from the deployment

Example: Deploy network with explorer

cd scripts

task default
task solo:explorer

# Access at http://localhost:8080

JSON-RPC Relay Management

Deploy or remove the Relay for Ethereum-compatible access:

TaskDescription
solo:relayAdd JSON-RPC relay to the current deployment
solo:destroy-relayRemove JSON-RPC relay from the deployment

Example: Add relay to running network

cd scripts

task default-with-mirror
task solo:relay

# Access JSON-RPC at http://localhost:7546

Block Node Management

Deploy or remove block nodes for streaming block data:

TaskDescription
solo:block:addAdd a block node to the current deployment
solo:block:destroyRemove the block node from the deployment

Example: Deploy network with block node

cd scripts

task default
task solo:block:add

# Block node will stream block data

Infrastructure Tasks

Low-level tasks for managing clusters and network infrastructure:

| Task | Description |\n| ————————— | ———————————————————- | | cluster:create | Create a Kind (Kubernetes in Docker) cluster | | cluster:destroy | Delete the Kind cluster | | solo:cluster:setup | Setup cluster infrastructure and prerequisites | | solo:init | Initialize Solo (download tools and templates) | | solo:deployment:create | Create a new deployment configuration | | solo:deployment:attach | Attach an existing cluster to a deployment | | solo:network:deploy | Deploy the consensus network to the cluster | | solo:network:destroy | Destroy the consensus network |

Tip: Unless you need custom cluster management, use the higher-level tasks like default, install, or destroy which orchestrate these infrastructure tasks automatically.

Utility Tasks

Helpful tasks for inspecting and managing running networks:

TaskDescription
show:ipsDisplay the external IPs of all network nodes
solo:node:logsRetrieve logs from consensus nodes
solo:freeze:restartExecute a freeze/restart upgrade workflow for testing version upgrades

Example: View network IPs and logs

cd scripts

# See which nodes are running and their IPs
task show:ips

# Retrieve node logs for debugging
task solo:node:logs

Database Tasks

Deploy external databases for specialized configurations:

TaskDescription
solo:external-databaseSetup external PostgreSQL database with Helm

Advanced Configuration with Environment Variables

You can customize Task behavior by setting environment variables before running tasks. Common variables include:

VariableDescriptionDefault
SOLO_NETWORK_SIZENumber of consensus nodes1
SOLO_NAMESPACEKubernetes namespacesolo-e2e
CONSENSUS_NODE_VERSIONConsensus node versionv0.65.1
MIRROR_NODE_VERSIONMirror node versionv0.138.0
RELAY_VERSIONJSON-RPC Relay versionv0.70.0
EXPLORER_VERSIONExplorer UI versionv25.1.1

For a comprehensive reference of all available environment variables, see Using Environment Variables.

Example: Deploy with custom versions

cd scripts

# Deploy with specific component versions
CONSENSUS_NODE_VERSION=v0.66.0 \
MIRROR_NODE_VERSION=v0.139.0 \
task default-with-mirror

Example Projects

The Solo repository includes 14+ maintained example projects that demonstrate common Solo workflows. These examples serve as templates and starting points for custom implementations.

Getting Started with Examples

Each example is located in the examples/ directory and includes:

  • Pre-configured Taskfile.yml with deployment settings.
  • init-containers-values.yaml for customization.
  • Example-specific README with detailed instructions.

To run an example:

cd examples/<example-name>

# Deploy the example
task

# Clean up when done
task clean

Available Examples

Network Setup Examples

Configuration Examples

Database Examples

State Management Examples

Node Transaction Examples

These examples demonstrate manual operations for adding, modifying, and removing nodes:

Integration Examples

Testing Examples

  • Rapid-Fire: Rapid-fire deployment and teardown commands for stress testing the deployment workflow
  • Running Solo Inside Cluster: Deploy Solo within an existing Kubernetes cluster instead of creating a new one

Practical Workflows

Workflow 1: Quick Development Network with Logging

Deploy a network for development and debugging:

cd scripts

# Set logging level
export SOLO_LOG_LEVEL=debug

# Deploy with mirror and relay
task default-with-relay

# Retrieve logs if needed
task solo:node:logs

# View network endpoints
task show:ips

# Clean up
task clean

Workflow 2: Test Configuration Changes

Iterate on network configuration:

cd examples/custom-network-config

# Edit the Taskfile or init-containers-values.yaml

# Deploy with your changes
task

# Test your configuration

# Clean up and try again
task clean

Workflow 3: Upgrade Network Components

Test upgrading Solo components:

cd examples/version-upgrade-test

# Deploy with current versions
task

# The example automatically tests the upgrade path

# Clean up
task clean

Workflow 4: Backup and Restore Network State

Test disaster recovery and state migration:

cd examples/state-save-and-restore

# Deploy initial network with state
task

# The example includes backup/restore operations

# Clean up
task clean

Troubleshooting

Common Issues

Task command not found

Ensure Task is installed and on your PATH:

which task
task --version

Taskfile not found

Run Task commands from the scripts/ directory or an examples/ subdirectory where a Taskfile.yml exists:

cd scripts
task default

Insufficient resources

Some deployments require significant resources. Verify your Docker has at least 12 GB of memory and 6 CPU cores allocated:

docker info --format 'CPU: {{.NCPU}}, Memory: {{.MemTotal | div 1000000000}}GB'

Cluster cleanup issues

If the cluster becomes unstable, perform a full cleanup:

cd scripts

# Remove all traces
task clean

# As a last resort, manually delete the Kind cluster
kind delete cluster --name solo-e2e

Next Steps

After deploying a network with Task, explore:

Additional Resources