ssh

package
v1.22.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2026 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Overview

Package ssh provides SSH client utilities for remote node management.

Package ssh provides SSH operations for remote host management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeSSHSetupWarpRelayer

func ComposeSSHSetupWarpRelayer(host *models.Host, relayerVersion string) error

ComposeSSHSetupWarpRelayer used docker compose to setup AWM Relayer

func PostOverSSH

func PostOverSSH(host *models.Host, path string, requestBody string) ([]byte, error)

PostOverSSH sends a POST request over SSH to the specified path.

func RunOverSSH

func RunOverSSH(
	scriptDesc string,
	host *models.Host,
	timeout time.Duration,
	scriptPath string,
	templateVars scriptInputs,
) error

RunOverSSH runs provided script path over ssh. This script can be template as it will be rendered using scriptInputs vars

func RunSSHBuildLoadTestCode

func RunSSHBuildLoadTestCode(host *models.Host, loadTestRepo, loadTestPath, loadTestGitCommit, repoDirName, loadTestBranch string, checkoutCommit bool) error

RunSSHBuildLoadTestCode builds load test code on the remote host.

func RunSSHBuildLoadTestDependencies

func RunSSHBuildLoadTestDependencies(host *models.Host) error

RunSSHBuildLoadTestDependencies builds load test dependencies on the remote host.

func RunSSHCheckBootstrapped

func RunSSHCheckBootstrapped(host *models.Host) ([]byte, error)

RunSSHCheckBootstrapped checks if node is bootstrapped to primary network

func RunSSHCheckHealthy

func RunSSHCheckHealthy(host *models.Host) ([]byte, error)

RunSSHCheckHealthy checks if node is healthy

func RunSSHCheckLuxdVersion

func RunSSHCheckLuxdVersion(host *models.Host) ([]byte, error)

RunSSHCheckLuxdVersion checks node luxd version

func RunSSHCopyMonitoringDashboards

func RunSSHCopyMonitoringDashboards(host *models.Host, monitoringDashboardPath string) error

RunSSHCopyMonitoringDashboards copies monitoring dashboards to the remote host.

func RunSSHCopyYAMLFile

func RunSSHCopyYAMLFile(host *models.Host, yamlFilePath string) error

RunSSHCopyYAMLFile copies a YAML file to the remote host.

func RunSSHCreatePlugin

func RunSSHCreatePlugin(host *models.Host, sc models.Sidecar) error

RunSSHCreatePlugin runs script to create plugin

func RunSSHDownloadFile

func RunSSHDownloadFile(host *models.Host, filePath string, localFilePath string) error

RunSSHDownloadFile downloads specified file from the specified host

func RunSSHDownloadNodePrometheusConfig

func RunSSHDownloadNodePrometheusConfig(host *models.Host, nodeInstanceDirPath string) error

RunSSHDownloadNodePrometheusConfig downloads Prometheus config from the remote host.

func RunSSHGetNewEVMRelease added in v1.21.40

func RunSSHGetNewEVMRelease(host *models.Host, evmReleaseURL, evmArchive string) error

RunSSHGetNewEVMRelease runs script to download new subnet evm

func RunSSHGetNodeID

func RunSSHGetNodeID(host *models.Host) ([]byte, error)

RunSSHGetNodeID reads nodeID from luxd

func RunSSHRenderLuxNodeConfig

func RunSSHRenderLuxNodeConfig(
	app *application.Lux,
	host *models.Host,
	network models.Network,
	trackSubnets []string,
	isAPIHost bool,
) error

RunSSHRenderLuxNodeConfig renders lux node config to a remote host via SSH.

func RunSSHRenderLuxdAliasConfigFile

func RunSSHRenderLuxdAliasConfigFile(
	host *models.Host,
	blockchainID string,
	subnetAliases []string,
) error

RunSSHRenderLuxdAliasConfigFile renders lux alias config to a remote host via SSH.

func RunSSHRestartNode

func RunSSHRestartNode(host *models.Host) error

RunSSHRestartNode runs script to restart luxd

func RunSSHRunLoadTest

func RunSSHRunLoadTest(host *models.Host, loadTestCommand, loadTestName string) error

RunSSHRunLoadTest runs a load test on the remote host.

func RunSSHSetupDevNet

func RunSSHSetupDevNet(host *models.Host, nodeInstanceDirPath string) error

RunSSHSetupDevNet runs script to setup devnet

func RunSSHSetupDockerService

func RunSSHSetupDockerService(host *models.Host) error

RunSSHSetupDockerService runs script to setup docker compose service for CLI

func RunSSHSetupLokiConfig

func RunSSHSetupLokiConfig(host *models.Host, port int) error

RunSSHSetupLokiConfig sets up Loki configuration on the remote host.

func RunSSHSetupMonitoringFolders

func RunSSHSetupMonitoringFolders(host *models.Host) error

RunSSHSetupMonitoringFolders creates monitoring folders on the remote host.

func RunSSHSetupNode

func RunSSHSetupNode(host *models.Host, configPath string) error

RunSSHSetupNode runs script to setup node

func RunSSHSetupPrometheusConfig

func RunSSHSetupPrometheusConfig(host *models.Host, luxdPorts, machinePorts, loadTestPorts []string) error

RunSSHSetupPrometheusConfig sets up Prometheus configuration on the remote host.

func RunSSHSetupPromtailConfig

func RunSSHSetupPromtailConfig(host *models.Host, lokiIP string, lokiPort int, cloudID string, nodeID string, chainID string) error

RunSSHSetupPromtailConfig sets up Promtail configuration on the remote host.

func RunSSHStartNode

func RunSSHStartNode(host *models.Host) error

RunSSHStartNode runs script to start luxd

func RunSSHStartWarpRelayerService

func RunSSHStartWarpRelayerService(host *models.Host) error

RunSSHStartWarpRelayerService runs script to start an AWM Relayer Service

func RunSSHStopNode

func RunSSHStopNode(host *models.Host) error

RunSSHStopNode runs script to stop luxd

func RunSSHStopWarpRelayerService

func RunSSHStopWarpRelayerService(host *models.Host) error

RunSSHStopWarpRelayerService runs script to start an AWM Relayer Service

func RunSSHSubnetSyncStatus

func RunSSHSubnetSyncStatus(host *models.Host, blockchainID string) ([]byte, error)

RunSSHSubnetSyncStatus checks if node is synced to subnet.

func RunSSHSyncSubnetData

func RunSSHSyncSubnetData(app *application.Lux, host *models.Host, network models.Network, subnetName string) error

RunSSHSyncSubnetData syncs subnet data required

func RunSSHUpdateMonitoringDashboards

func RunSSHUpdateMonitoringDashboards(host *models.Host, monitoringDashboardPath, customGrafanaDashboardPath, chainID string) error

RunSSHUpdateMonitoringDashboards updates monitoring dashboards on the remote host.

func RunSSHUpgradeLuxgo

func RunSSHUpgradeLuxgo(host *models.Host, luxdVersion string) error

RunSSHUpgradeLuxgo runs script to upgrade luxd

func RunSSHUploadNodeWarpRelayerConfig

func RunSSHUploadNodeWarpRelayerConfig(host *models.Host, nodeInstanceDirPath string) error

RunSSHUploadNodeWarpRelayerConfig uploads warp relayer config to the remote host.

func RunSSHUploadStakingFiles

func RunSSHUploadStakingFiles(host *models.Host, nodeInstanceDirPath string) error

RunSSHUploadStakingFiles uploads staking files to a remote host via SSH.

func RunSSHUpsizeRootDisk

func RunSSHUpsizeRootDisk(host *models.Host) error

RunSSHUpsizeRootDisk resizes the root disk on the remote host.

func RunSSHWhitelistPubKey

func RunSSHWhitelistPubKey(host *models.Host, sshPubKey string) error

RunSSHWhitelistPubKey downloads the authorized_keys file from the specified host, appends the provided sshPubKey to it, and uploads the file back to the host.

func StreamOverSSH

func StreamOverSSH(
	scriptDesc string,
	host *models.Host,
	timeout time.Duration,
	scriptPath string,
	templateVars scriptInputs,
) error

StreamOverSSH runs provided script path over ssh. This script can be template as it will be rendered using scriptInputs vars

Types

type HostInstaller

type HostInstaller struct {
	Host *models.Host
}

HostInstaller handles installation operations on remote hosts.

func NewHostInstaller

func NewHostInstaller(host *models.Host) *HostInstaller

NewHostInstaller creates a new host installer.

func (*HostInstaller) GetArch

func (h *HostInstaller) GetArch() (string, string)

GetArch returns the architecture and OS of the remote host.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL