Examples

The examples section provides information on some examples of how Solo can be used and leveraged.

The usage of examples in Solo

Table of Contents

Example DirectoryDescription
address-bookExample of using Yahcli to pull the ledger and mirror node address book
custom-network-configDeploy a Solo network with custom configuration settings (log4j2, properties, etc.)
external-database-testDeploy a Solo network with an external PostgreSQL database
network-with-block-nodeDeploy a Solo network that includes a block node
network-with-domain-namesSetup a network using custom domain names for all components
node-create-transactionManually write a NodeCreateTransaction and use the add-prepare/prepare-upgrade/freeze-upgrade/add-execute commands.
node-delete-transactionManually write a NodeDeleteTransaction and use the add-prepare/prepare-upgrade/freeze-upgrade/add-execute commands.
node-update-transactionManually write a NodeUpdateTransaction and use the add-prepare/prepare-upgrade/freeze-upgrade/add-execute commands.
running-solo-inside-clusterExample showing how to run Solo inside a Kubernetes cluster

Prerequisites

  • install taskfile: npm install -g @go-task/cli

Running the examples with Taskfile

  • cd into the directory under examples that has the Taskfile.yml, e.g. (from solo repo root directory) cd examples/network-with-block-node/
  • make sure that your current kubeconfig context is pointing to the cluster that you want to deploy to
  • run task which will do the rest and deploy the network and take care of many of the pre-requisites

NOTES:

  • Some of these examples are for running against large clusters with a lot of resources available.
  • Edit the values of the variables as needed.

Customizing the examples

  • take a look at the Taskfile.yml sitting in the subdirectory for the deployment you want to run
  • make sure your cluster can handle the number in SOLO_NETWORK_SIZE, if not, then you will have to update that and make it match the number of nodes in the init-containers-values.yaml: hedera.nodes[]
  • take a look at the init-containers-values.yaml file and make sure the values are correct for your deployment with special attention to:
    • resources
    • nodeSelector
    • tolerations

Address Book Example

Example of how to use Yahcli to read/update ledger and mirror node address book

Custom Network Config Example

Example of how to create and manage a custom Solo deployment and configure it with custom settings

Network with an External PostgreSQL Database Example

example of how to deploy a Solo network with an external PostgreSQL database

Network with Block Node Example

Example of how to create and manage a custom Solo deployment and configure it with custom settings

Network With Domain Names Example

Example of how to deploy a Solo network with custom domain names

Node Create Transaction Example

Using Solo with a custom NodeCreateTransaction from an SDK call

Solo Inside a Cluster Example

Example of how to deploy a Solo network within a Kubernetes cluster

Node Delete Transaction Example

Using Solo with a custom NodeDeleteTransaction from an SDK call

Node Update Transaction Example

Using Solo with a custom NodeUpdateTransaction from an SDK call