Cluster Software Installation and Updates
Currently users are required to build the solana cluster software themselves from the git repository and manually update it, which is error prone and inconvenient.
This document proposes an easy to use software install and updater that can be used to deploy pre-built binaries for supported platforms. Users may elect to use binaries supplied by Solana or any other party provider. Deployment of updates is managed using an on-chain update manifest program.
#
Motivating Examples#
Fetch and run a pre-built installer using a bootstrap curl/shell scriptThe easiest install method for supported platforms:
This script will check github for the latest tagged release and download and run the solana-install-init
binary from there.
If additional arguments need to be specified during the installation, the following shell syntax is used:
#
Fetch and run a pre-built installer from a Github releaseWith a well-known release URL, a pre-built binary can be obtained for supported platforms:
#
Build and run the installer from sourceIf a pre-built binary is not available for a given platform, building the installer from source is always an option:
#
Deploy a new update to a clusterGiven a solana release tarball (as created by ci/publish-tarball.sh
) that has already been uploaded to a publicly accessible URL, the following commands will deploy the update:
#
Run a validator node that auto updates itself#
On-chain Update ManifestAn update manifest is used to advertise the deployment of new release tarballs on a solana cluster. The update manifest is stored using the config
program, and each update manifest account describes a logical update channel for a given target triple (eg, x86_64-apple-darwin
). The account public key is well-known between the entity deploying new updates and users consuming those updates.
The update tarball itself is hosted elsewhere, off-chain and can be fetched from the specified download_url
.
Note that the manifest
field itself contains a corresponding signature (manifest_signature
) to guard against man-in-the-middle attacks between the solana-install
tool and the solana cluster RPC API.
To guard against rollback attacks, solana-install
will refuse to install an update with an older timestamp_secs
than what is currently installed.
#
Release Archive ContentsA release archive is expected to be a tar file compressed with bzip2 with the following internal structure:
/version.yml
- a simple YAML file containing the field"target"
- thetarget tuple. Any additional fields are ignored.
/bin/
-- directory containing available programs in the release.solana-install
will symlink this directory to~/.local/share/solana-install/bin
for use by thePATH
environmentvariable.
...
-- any additional files and directories are permitted
#
solana-install ToolThe solana-install
tool is used by the user to install and update their cluster software.
It manages the following files and directories in the user's home directory:
~/.config/solana/install/config.yml
- user configuration and information about currently installed software version~/.local/share/solana/install/bin
- a symlink to the current release. eg,~/.local/share/solana-update/<update-pubkey>-<manifest_signature>/bin
~/.local/share/solana/install/releases/<download_sha256>/
- contents of a release