hostinit

package
v0.0.0-...-ee3d319 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunnerName = "hostinit"
)
View Source
const (
	SCPTimeout = time.Minute
)

Variables

This section is empty.

Functions

func LocateCLIBinary

func LocateCLIBinary(settings *evergreen.Settings, architecture string) (string, error)

LocateCLIBinary returns the (absolute) path to the CLI binary for the given architecture, based on the system settings. Returns an error if the file does not exist.

Types

type HostInit

type HostInit struct {
	Settings *evergreen.Settings
	GUID     string
}

HostInit is responsible for running setup scripts on Evergreen hosts.

func (*HostInit) IsHostReady

func (init *HostInit) IsHostReady(ctx context.Context, host *host.Host) (bool, error)

IsHostReady returns whether or not the specified host is ready for its setup script to be run.

func (*HostInit) LoadClient

func (init *HostInit) LoadClient(ctx context.Context, target *host.Host) (*LoadClientResult, error)

LoadClient places the evergreen command line client on the host, places a copy of the user's settings onto the host, and makes the binary appear in the $PATH when the user logs in. If successful, returns an instance of LoadClientResult which contains the paths where the binary and config file were written to.

func (*HostInit) ProvisionHost

func (init *HostInit) ProvisionHost(ctx context.Context, h *host.Host) error

Provision the host, and update the database accordingly.

type LoadClientResult

type LoadClientResult struct {
	BinaryPath string
	ConfigPath string
}

LoadClientResult indicates the locations on a target host where the CLI binary and it's config file have been written to.

type Runner

type Runner struct{}

Runner executes the hostinit process.

func (*Runner) Name

func (r *Runner) Name() string

host init "starts and initializes new Evergreen hosts"

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, config *evergreen.Settings) error

Jump to

Keyboard shortcuts

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