ssh

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Copyright (C) 2023, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostOverSSH

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

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 added in v1.5.0

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

func RunSSHBuildLoadTestDependencies added in v1.5.0

func RunSSHBuildLoadTestDependencies(host *models.Host) error

func RunSSHCheckAvalancheGoVersion

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

RunSSHCheckAvalancheGoVersion checks node avalanchego version

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 RunSSHCopyMonitoringDashboards added in v1.3.7

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

func RunSSHCopyYAMLFile added in v1.5.0

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

func RunSSHDownloadFile added in v1.5.0

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

RunSSHDownloadFile downloads specified file from the specified host

func RunSSHDownloadNodeMonitoringConfig added in v1.3.7

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

func RunSSHDownloadNodePrometheusConfig added in v1.4.0

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

func RunSSHExportSubnet

func RunSSHExportSubnet(host *models.Host, exportPath, cloudServerSubnetPath string) error

RunSSHExportSubnet exports deployed Subnet from local machine to cloud server

func RunSSHGetNewSubnetEVMRelease

func RunSSHGetNewSubnetEVMRelease(host *models.Host, subnetEVMReleaseURL, subnetEVMArchive string) error

RunSSHGetNewSubnetEVMRelease runs script to download new subnet evm

func RunSSHGetNodeID

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

RunSSHGetNodeID reads nodeID from avalanchego

func RunSSHRestartNode added in v1.3.7

func RunSSHRestartNode(host *models.Host) error

RunSSHRestartNode runs script to restart avalanchego

func RunSSHRunLoadTest added in v1.5.0

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

func RunSSHSetupAWMRelayerService added in v1.5.0

func RunSSHSetupAWMRelayerService(host *models.Host) error

RunSSHSetupAWMRelayerService runs script to set up an AWM Relayer Service

func RunSSHSetupBuildEnv

func RunSSHSetupBuildEnv(host *models.Host) error

RunSSHSetupBuildEnv installs gcc, golang, rust and etc

func RunSSHSetupCLIFromSource

func RunSSHSetupCLIFromSource(host *models.Host, cliBranch string) error

RunSSHSetupCLIFromSource installs any CLI branch from source

func RunSSHSetupDevNet

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

RunSSHSetupDevNet runs script to setup devnet

func RunSSHSetupLoki added in v1.5.0

func RunSSHSetupLoki(host *models.Host, grafanaPkg string) error

func RunSSHSetupMachineMetrics added in v1.3.7

func RunSSHSetupMachineMetrics(host *models.Host) error

func RunSSHSetupNode

func RunSSHSetupNode(host *models.Host, configPath, avalancheGoVersion string, cliVersion string, isDevNet bool) error

RunSSHSetupNode runs script to setup node

func RunSSHSetupPromtail added in v1.5.0

func RunSSHSetupPromtail(host *models.Host) error

func RunSSHSetupSeparateMonitoring added in v1.3.7

func RunSSHSetupSeparateMonitoring(host *models.Host, grafanaPkg string) error

func RunSSHStartAWMRelayerService added in v1.5.0

func RunSSHStartAWMRelayerService(host *models.Host) error

RunSSHStartAWMRelayerService runs script to start an AWM Relayer Service

func RunSSHStartNode

func RunSSHStartNode(host *models.Host) error

RunSSHStartNode runs script to start avalanchego

func RunSSHStopAWMRelayerService added in v1.5.0

func RunSSHStopAWMRelayerService(host *models.Host) error

RunSSHStopAWMRelayerService runs script to start an AWM Relayer Service

func RunSSHStopNode

func RunSSHStopNode(host *models.Host) error

RunSSHStopNode runs script to stop avalanchego

func RunSSHSubnetSyncStatus

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

SubnetSyncStatus checks if node is synced to subnet

func RunSSHTrackSubnet

func RunSSHTrackSubnet(host *models.Host, subnetName, importPath, networkFlag string) error

RunSSHTrackSubnet enables tracking of specified subnet

func RunSSHUpdateLokiConfig added in v1.5.0

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

func RunSSHUpdateMonitoringDashboards added in v1.5.0

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

func RunSSHUpdatePrometheusConfig added in v1.3.7

func RunSSHUpdatePrometheusConfig(host *models.Host, avalancheGoPorts, machinePorts, loadTestPorts []string) error

func RunSSHUpdatePromtailConfig added in v1.5.0

func RunSSHUpdatePromtailConfig(host *models.Host, ip string, port int, cloudID string, nodeID string) error

func RunSSHUpdatePromtailConfigSubnet added in v1.5.0

func RunSSHUpdatePromtailConfigSubnet(host *models.Host, ip string, port int, cloudID string, nodeID string, chainID string) error

func RunSSHUpdateSubnet

func RunSSHUpdateSubnet(host *models.Host, subnetName, importPath string) error

RunSSHUpdateSubnet runs avalanche subnet join <subnetName> in cloud server using update subnet info

func RunSSHUpgradeAvalanchego

func RunSSHUpgradeAvalanchego(host *models.Host, avalancheGoVersion string) error

RunSSHUpgradeAvalanchego runs script to upgrade avalanchego

func RunSSHUpgradeSubnetEVM

func RunSSHUpgradeSubnetEVM(host *models.Host, subnetEVMBinaryPath string) error

RunSSHUpgradeSubnetEVM runs script to upgrade subnet evm

func RunSSHUploadClustersConfig added in v1.5.0

func RunSSHUploadClustersConfig(host *models.Host, localClustersConfigPath string) error

func RunSSHUploadNodeAWMRelayerConfig added in v1.5.0

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

func RunSSHUploadNodeMonitoringConfig added in v1.3.7

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

func RunSSHUploadStakingFiles

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

RunSSHUploadStakingFiles uploads staking files to a remote host via SSH.

func RunSSHUpsizeRootDisk added in v1.5.2

func RunSSHUpsizeRootDisk(host *models.Host) error

func RunSSHWhitelistPubKey added in v1.5.0

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 added in v1.5.0

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

This section is empty.

Jump to

Keyboard shortcuts

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