hostinit

package
v0.0.0-...-eeee692 Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunnerName  = "hostinit"
	Description = "initialize new Evergreen hosts"
)
View Source
const (
	SCPTimeout = time.Minute
)

Variables

View Source
var (
	ErrHostAlreadyInitializing = errors.New("Host already initializing")
)

Error indicating another hostinit got to the setup first.

View Source
var (
	SSHTimeoutSeconds = int64(300) // 5 minutes
)

Longest duration allowed for running setup script.

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
}

HostInit is responsible for running setup scripts on Evergreen hosts.

func (*HostInit) IsHostReady

func (init *HostInit) IsHostReady(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(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(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) Description

func (r *Runner) Description() string

func (*Runner) Name

func (r *Runner) Name() string

func (*Runner) Run

func (r *Runner) Run(config *evergreen.Settings) error

Jump to

Keyboard shortcuts

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