Documentation
¶
Overview ¶
Package provision installs a RosPanel node on a remote server over SSH, so the operator can add a node from the panel UI without touching a terminal. The SSH credentials are used only for the duration of the install and are never stored.
The panel uploads its OWN binary to the target and runs `rospanel node install` with it, rather than having the target download a release from GitHub. That makes the node run the exact same build as the panel (no version skew, no dependency on a published release or on the main-branch install.sh), which is also the only way this works for an unreleased/dev build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
func Install(ctx context.Context, c Credentials, localBinary string, installArgs []string, onLine func(string)) (hostKeyFP string, err error)
Install connects to the target, uploads localBinary, and runs it as `rospanel node <installArgs...>` (join + systemd setup), streaming every output line to onLine. Returns the discovered host-key fingerprint and any error.
Types ¶
type Credentials ¶
type Credentials struct {
Host string // IP or hostname of the target server
Port int // SSH port (0 ⇒ 22)
User string // SSH user (must be root)
Password string // password auth (mutually exclusive with PrivateKey)
PrivateKey string // PEM private key (mutually exclusive with Password)
Passphrase string // optional passphrase for an encrypted PrivateKey
}
Credentials describe how to reach and authenticate to the target server. Exactly one of Password / PrivateKey must be set.