distro

package
v0.0.0-...-340a8d1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 20 Imported by: 123

Documentation

Index

Constants

View Source
const (
	DockerImageBuildTypeImport = "import"
	DockerImageBuildTypePull   = "pull"

	// Bootstrapping mechanisms
	// BootstrapMethodNone is for internal use only.
	BootstrapMethodNone      = "none"
	BootstrapMethodLegacySSH = "legacy-ssh"
	BootstrapMethodSSH       = "ssh"
	BootstrapMethodUserData  = "user-data"

	// Means of communicating with hosts
	CommunicationMethodLegacySSH = "legacy-ssh"
	CommunicationMethodSSH       = "ssh"
	CommunicationMethodRPC       = "rpc"

	CloneMethodLegacySSH = "legacy-ssh"
	CloneMethodOAuth     = "oauth"
)
View Source
const Collection = "distro"

Variables

View Source
var (
	// bson fields for the Distro struct
	IdKey                    = bsonutil.MustHaveTag(Distro{}, "Id")
	AliasesKey               = bsonutil.MustHaveTag(Distro{}, "Aliases")
	ArchKey                  = bsonutil.MustHaveTag(Distro{}, "Arch")
	ProviderKey              = bsonutil.MustHaveTag(Distro{}, "Provider")
	ProviderSettingsListKey  = bsonutil.MustHaveTag(Distro{}, "ProviderSettingsList")
	SetupAsSudoKey           = bsonutil.MustHaveTag(Distro{}, "SetupAsSudo")
	SetupKey                 = bsonutil.MustHaveTag(Distro{}, "Setup")
	UserKey                  = bsonutil.MustHaveTag(Distro{}, "User")
	SSHKeyKey                = bsonutil.MustHaveTag(Distro{}, "SSHKey")
	SSHOptionsKey            = bsonutil.MustHaveTag(Distro{}, "SSHOptions")
	BootstrapSettingsKey     = bsonutil.MustHaveTag(Distro{}, "BootstrapSettings")
	CloneMethodKey           = bsonutil.MustHaveTag(Distro{}, "CloneMethod")
	WorkDirKey               = bsonutil.MustHaveTag(Distro{}, "WorkDir")
	SpawnAllowedKey          = bsonutil.MustHaveTag(Distro{}, "SpawnAllowed")
	ExpansionsKey            = bsonutil.MustHaveTag(Distro{}, "Expansions")
	DisabledKey              = bsonutil.MustHaveTag(Distro{}, "Disabled")
	ContainerPoolKey         = bsonutil.MustHaveTag(Distro{}, "ContainerPool")
	PlannerSettingsKey       = bsonutil.MustHaveTag(Distro{}, "PlannerSettings")
	FinderSettingsKey        = bsonutil.MustHaveTag(Distro{}, "FinderSettings")
	HostAllocatorSettingsKey = bsonutil.MustHaveTag(Distro{}, "HostAllocatorSettings")
	DisableShallowCloneKey   = bsonutil.MustHaveTag(Distro{}, "DisableShallowClone")
	UseLegacyAgentKey        = bsonutil.MustHaveTag(Distro{}, "UseLegacyAgent")
	ValidProjectsKey         = bsonutil.MustHaveTag(Distro{}, "ValidProjects")
	IsVirtualWorkstationKey  = bsonutil.MustHaveTag(Distro{}, "IsVirtualWorkstation")
	IsClusterKey             = bsonutil.MustHaveTag(Distro{}, "IsCluster")
	IcecreamSettingsKey      = bsonutil.MustHaveTag(Distro{}, "IcecreamSettings")
)
View Source
var (
	// bson fields for the BootstrapSettings struct
	BootstrapSettingsMethodKey                = bsonutil.MustHaveTag(BootstrapSettings{}, "Method")
	BootstrapSettingsCommunicationKey         = bsonutil.MustHaveTag(BootstrapSettings{}, "Communication")
	BootstrapSettingsClientDirKey             = bsonutil.MustHaveTag(BootstrapSettings{}, "ClientDir")
	BootstrapSettingsJasperBinaryDirKey       = bsonutil.MustHaveTag(BootstrapSettings{}, "JasperBinaryDir")
	BootstrapSettingsJasperCredentialsPathKey = bsonutil.MustHaveTag(BootstrapSettings{}, "JasperCredentialsPath")
	BootstrapSettingsServiceUserKey           = bsonutil.MustHaveTag(BootstrapSettings{}, "ServiceUser")
	BootstrapSettingsShellPathKey             = bsonutil.MustHaveTag(BootstrapSettings{}, "ShellPath")
	BootstrapSettingsRootDirKey               = bsonutil.MustHaveTag(BootstrapSettings{}, "RootDir")
	BootstrapSettingsEnvKey                   = bsonutil.MustHaveTag(BootstrapSettings{}, "Env")
	BootstrapSettingsResourceLimitsKey        = bsonutil.MustHaveTag(BootstrapSettings{}, "ResourceLimits")

	ResourceLimitsNumFilesKey        = bsonutil.MustHaveTag(ResourceLimits{}, "NumFiles")
	ResourceLimitsNumProcessesKey    = bsonutil.MustHaveTag(ResourceLimits{}, "NumProcesses")
	ResourceLimitsVirtualMemoryKBKey = bsonutil.MustHaveTag(ResourceLimits{}, "VirtualMemoryKB")
	ResourceLimitsLockedMemoryKBKey  = bsonutil.MustHaveTag(ResourceLimits{}, "LockedMemoryKB")
)
View Source
var (
	IcecreamSettingsSchedulerHostKey = bsonutil.MustHaveTag(IcecreamSettings{}, "SchedulerHost")
	IcecreamSettingsConfigPathKey    = bsonutil.MustHaveTag(IcecreamSettings{}, "ConfigPath")
)
View Source
var All = db.Query(nil).Sort([]string{IdKey})

All is a query that returns all distros.

View Source
var (
	// bson fields for the HostAllocatorSettings struct
	// HostAllocatorSettingsVersionKey                = bsonutil.MustHaveTag(HostAllocatorSettings{}, "Version")
	// HostAllocatorSettingsMinimumHostsKey           = bsonutil.MustHaveTag(HostAllocatorSettings{}, "MinimumHosts")
	HostAllocatorSettingsMaximumHostsKey = bsonutil.MustHaveTag(HostAllocatorSettings{}, "MaximumHosts")
)

Functions

func ById

func ById(id string) db.Q

ById returns a query that contains an Id selector on the string, id.

func ByIds

func ByIds(ids []string) db.Q

ByIds creates a query that finds all distros for the given ids and implicitly returns them ordered by {"_id": 1}

func ByIsDisabled

func ByIsDisabled(containerPools []evergreen.ContainerPool) db.Q

ByIsDisabled returns a query that selects distros that are disabled

func ByNeedsHostsPlanning

func ByNeedsHostsPlanning(containerPools []evergreen.ContainerPool) db.Q

ByNeedsHostsPlanning returns a query that selects distros that don't run containers

func ByNeedsPlanning

func ByNeedsPlanning(containerPools []evergreen.ContainerPool) db.Q

ByNeedsPlanning returns a query that selects only active or static distros that don't run containers

func ByProvider

func ByProvider(p string) db.Q

ByProvider returns a query that contains a Provider selector on the string, p.

func BySpawnAllowed

func BySpawnAllowed() db.Q

BySpawnAllowed returns a query that contains the SpawnAllowed selector.

func FindApplicableDistroIDs

func FindApplicableDistroIDs(id string) ([]string, error)

func Remove

func Remove(id string) error

Remove removes one distro.

func ValidateArch

func ValidateArch(arch string) error

ValidateArch checks that the architecture is one of the supported architectures.

func ValidateCloneMethod

func ValidateCloneMethod(method string) error

ValidateCloneMethod checks that the clone mechanism is one of the supported methods.

func ValidateContainerPoolDistros

func ValidateContainerPoolDistros(s *evergreen.Settings) error

ValidateContainerPoolDistros ensures that container pools have valid distros

Types

type AliasLookupTable

type AliasLookupTable map[string][]string

func NewDistroAliasesLookupTable

func NewDistroAliasesLookupTable() (AliasLookupTable, error)

func (AliasLookupTable) Expand

func (da AliasLookupTable) Expand(in []string) []string

type BootstrapSettings

type BootstrapSettings struct {
	// Required
	Method        string `bson:"method" json:"method" mapstructure:"method"`
	Communication string `bson:"communication,omitempty" json:"communication,omitempty" mapstructure:"communication,omitempty"`

	// Optional
	Env                 []EnvVar             `bson:"env,omitempty" json:"env,omitempty" mapstructure:"env,omitempty"`
	ResourceLimits      ResourceLimits       `bson:"resource_limits,omitempty" json:"resource_limits,omitempty" mapstructure:"resource_limits,omitempty"`
	PreconditionScripts []PreconditionScript `bson:"precondition_scripts,omitempty" json:"precondition_scripts,omitempty" mapstructure:"precondition_scripts,omitempty"`

	// Required for new provisioning
	ClientDir             string `bson:"client_dir,omitempty" json:"client_dir,omitempty" mapstructure:"client_dir,omitempty"`
	JasperBinaryDir       string `bson:"jasper_binary_dir,omitempty" json:"jasper_binary_dir,omitempty" mapstructure:"jasper_binary_dir,omitempty"`
	JasperCredentialsPath string `` /* 130-byte string literal not displayed */

	// Windows-specific
	ServiceUser string `bson:"service_user,omitempty" json:"service_user,omitempty" mapstructure:"service_user,omitempty"`
	ShellPath   string `bson:"shell_path,omitempty" json:"shell_path,omitempty" mapstructure:"shell_path,omitempty"`
	RootDir     string `bson:"root_dir,omitempty" json:"root_dir,omitempty" mapstructure:"root_dir,omitempty"`
}

BootstrapSettings encapsulates all settings related to bootstrapping hosts.

type DispatcherSettings

type DispatcherSettings struct {
	Version string `bson:"version" json:"version" mapstructure:"version"`
}

type Distro

type Distro struct {
	Id                    string                `bson:"_id" json:"_id,omitempty" mapstructure:"_id,omitempty"`
	Aliases               []string              `bson:"aliases,omitempty" json:"aliases,omitempty" mapstructure:"aliases,omitempty"`
	Arch                  string                `bson:"arch" json:"arch,omitempty" mapstructure:"arch,omitempty"`
	WorkDir               string                `bson:"work_dir" json:"work_dir,omitempty" mapstructure:"work_dir,omitempty"`
	Provider              string                `bson:"provider" json:"provider,omitempty" mapstructure:"provider,omitempty"`
	ProviderSettingsList  []*birch.Document     `bson:"provider_settings,omitempty" json:"provider_settings,omitempty" mapstructure:"provider_settings,omitempty"`
	SetupAsSudo           bool                  `bson:"setup_as_sudo,omitempty" json:"setup_as_sudo,omitempty" mapstructure:"setup_as_sudo,omitempty"`
	Setup                 string                `bson:"setup,omitempty" json:"setup,omitempty" mapstructure:"setup,omitempty"`
	User                  string                `bson:"user,omitempty" json:"user,omitempty" mapstructure:"user,omitempty"`
	BootstrapSettings     BootstrapSettings     `bson:"bootstrap_settings" json:"bootstrap_settings" mapstructure:"bootstrap_settings"`
	CloneMethod           string                `bson:"clone_method" json:"clone_method,omitempty" mapstructure:"clone_method,omitempty"`
	SSHKey                string                `bson:"ssh_key,omitempty" json:"ssh_key,omitempty" mapstructure:"ssh_key,omitempty"`
	SSHOptions            []string              `bson:"ssh_options,omitempty" json:"ssh_options,omitempty" mapstructure:"ssh_options,omitempty"`
	AuthorizedKeysFile    string                `bson:"authorized_keys_file,omitempty" json:"authorized_keys_file,omitempty" mapstructure:"authorized_keys_file,omitempty"`
	SpawnAllowed          bool                  `bson:"spawn_allowed" json:"spawn_allowed,omitempty" mapstructure:"spawn_allowed,omitempty"`
	Expansions            []Expansion           `bson:"expansions,omitempty" json:"expansions,omitempty" mapstructure:"expansions,omitempty"`
	Disabled              bool                  `bson:"disabled,omitempty" json:"disabled,omitempty" mapstructure:"disabled,omitempty"`
	ContainerPool         string                `bson:"container_pool,omitempty" json:"container_pool,omitempty" mapstructure:"container_pool,omitempty"`
	FinderSettings        FinderSettings        `bson:"finder_settings" json:"finder_settings" mapstructure:"finder_settings"`
	PlannerSettings       PlannerSettings       `bson:"planner_settings" json:"planner_settings" mapstructure:"planner_settings"`
	DispatcherSettings    DispatcherSettings    `bson:"dispatcher_settings" json:"dispatcher_settings" mapstructure:"dispatcher_settings"`
	HostAllocatorSettings HostAllocatorSettings `bson:"host_allocator_settings" json:"host_allocator_settings" mapstructure:"host_allocator_settings"`
	DisableShallowClone   bool                  `bson:"disable_shallow_clone" json:"disable_shallow_clone" mapstructure:"disable_shallow_clone"`
	UseLegacyAgent        bool                  `bson:"use_legacy_agent" json:"use_legacy_agent" mapstructure:"use_legacy_agent"`
	Note                  string                `bson:"note" json:"note" mapstructure:"note"`
	ValidProjects         []string              `bson:"valid_projects,omitempty" json:"valid_projects,omitempty" mapstructure:"valid_projects,omitempty"`
	IsVirtualWorkstation  bool                  `bson:"is_virtual_workstation" json:"is_virtual_workstation" mapstructure:"is_virtual_workstation"`
	IsCluster             bool                  `bson:"is_cluster" json:"is_cluster" mapstructure:"is_cluster"`
	HomeVolumeSettings    HomeVolumeSettings    `bson:"home_volume_settings" json:"home_volume_settings" mapstructure:"home_volume_settings"`
	IcecreamSettings      IcecreamSettings      `bson:"icecream_settings,omitempty" json:"icecream_settings,omitempty" mapstructure:"icecream_settings,omitempty"`
}

func Find

func Find(query db.Q) ([]Distro, error)

Find gets every Distro matching the given query.

func FindAll

func FindAll() ([]Distro, error)

func FindByID

func FindByID(id string) (*Distro, error)

func FindByIdWithDefaultSettings

func FindByIdWithDefaultSettings(id string) (*Distro, error)

func FindOne

func FindOne(query db.Q) (Distro, error)

FindOne gets one Distro for the given query.

func (*Distro) AbsPathCygwinCompatible

func (d *Distro) AbsPathCygwinCompatible(path ...string) string

AbsPathCygwinCompatible creates an absolute path from the given path that is compatible with the host's provisioning settings.

For example, in the context of an SSH session with Cygwin, if you invoke the "/usr/bin/echo" binary, Cygwin uses the binary located relative to Cygwin's filesystem root directory, so it will use the binary at "$ROOT_DIR/usr/bin/echo". Similarly, Cygwin binaries like "ls" will resolve filepaths as paths relative to the Cygwin root directory, so "ls /usr/bin", will correctly list the directory contents of "$ROOT_DIR/usr/bin".

However, in almost all other cases, Windows binaries expect native Windows paths for everything. For example, if the evergreen binary accepts a filepath given in the command line flags, the Golang standard library uses native paths. Therefore, giving a path like "/home/Administrator/my_file" will fail, because the library has no awareness of the Cygwin filesystem context. The correct path would be to give an absolute native path, "$ROOT_DIR/home/Administrator/evergreen".

Documentation for Cygwin paths: https://www.cygwin.com/cygwin-ug-net/using-effectively.html

func (*Distro) AbsPathNotCygwinCompatible

func (d *Distro) AbsPathNotCygwinCompatible(path ...string) string

AbsPathNotCygwinCompatible creates a Cygwin-incompatible absolute path using RootDir to get around the fact that Cygwin binaries use POSIX paths relative to the Cygwin filesystem root directory, but most other paths require absolute filepaths using native Windows absolute paths. See (*Distro).AbsPathCygwinCompatible for more details.

func (*Distro) Add

func (d *Distro) Add(creator *user.DBUser) error

func (*Distro) AddPermissions

func (d *Distro) AddPermissions(creator *user.DBUser) error

func (*Distro) BinaryName

func (d *Distro) BinaryName() string

func (*Distro) ClientURL

func (d *Distro) ClientURL(settings *evergreen.Settings) string

ClientURL returns the URL used to get the latest Evergreen client version directly from the Evergreen server.

func (*Distro) ExecutableSubPath

func (d *Distro) ExecutableSubPath() string

ExecutableSubPath returns the directory containing the compiled agents.

func (*Distro) GenerateName

func (d *Distro) GenerateName() string

GenerateName generates a unique instance name for a distro.

func (*Distro) GetCommitQueueFactor

func (d *Distro) GetCommitQueueFactor() int64

func (*Distro) GetExpectedRuntimeFactor

func (d *Distro) GetExpectedRuntimeFactor() int64

func (*Distro) GetGenerateTaskFactor

func (d *Distro) GetGenerateTaskFactor() int64

func (*Distro) GetImageID

func (d *Distro) GetImageID() (string, error)

func (*Distro) GetMainlineTimeInQueueFactor

func (d *Distro) GetMainlineTimeInQueueFactor() int64

func (*Distro) GetPatchFactor

func (d *Distro) GetPatchFactor() int64

func (*Distro) GetPatchTimeInQueueFactor

func (d *Distro) GetPatchTimeInQueueFactor() int64

func (*Distro) GetPoolSize

func (d *Distro) GetPoolSize() int

func (*Distro) GetProviderSettingByRegion

func (d *Distro) GetProviderSettingByRegion(region string) (*birch.Document, error)

func (*Distro) GetRegionsList

func (d *Distro) GetRegionsList(allowedRegions []string) []string

func (*Distro) GetResolvedFinderSettings

func (d *Distro) GetResolvedFinderSettings(s *evergreen.Settings) (FinderSettings, error)

GetResolvedFinderSettings combines the distro's FinderSettings fields with the SchedulerConfig defaults to resolve and validate a canonical set of FinderSettings' field values.

func (*Distro) GetResolvedHostAllocatorSettings

func (d *Distro) GetResolvedHostAllocatorSettings(s *evergreen.Settings) (HostAllocatorSettings, error)

GetResolvedHostAllocatorSettings combines the distro's HostAllocatorSettings fields with the SchedulerConfig defaults to resolve and validate a canonical set of HostAllocatorSettings' field values.

func (*Distro) GetResolvedPlannerSettings

func (d *Distro) GetResolvedPlannerSettings(s *evergreen.Settings) (PlannerSettings, error)

GetResolvedPlannerSettings combines the distro's PlannerSettings fields with the SchedulerConfig defaults to resolve and validate a canonical set of PlannerSettings' field values.

func (*Distro) GetTargetTime

func (d *Distro) GetTargetTime() time.Duration

func (*Distro) HomeDir

func (d *Distro) HomeDir() string

HomeDir gets the absolute path to the home directory for this distro's user. This is compatible with Cygwin (see (*Distro).AbsPathCygwinCompatible for details).

func (*Distro) Insert

func (d *Distro) Insert() error

Insert writes the distro to the database.

func (*Distro) IsEphemeral

func (d *Distro) IsEphemeral() bool

func (*Distro) IsLinux

func (d *Distro) IsLinux() bool

func (*Distro) IsParent

func (d *Distro) IsParent(s *evergreen.Settings) bool

IsParent returns whether the distro is the parent distro for any container pool

func (*Distro) IsPowerShellSetup

func (d *Distro) IsPowerShellSetup() bool

IsPowerShellSetup returns whether or not the setup script is a powershell script based on the header shebang line.

func (*Distro) IsWindows

func (d *Distro) IsWindows() bool

func (*Distro) JasperCommunication

func (d *Distro) JasperCommunication() bool

JasperCommunication returns whether or not the app server is communicating with hosts of this distro's Jasper service.

func (*Distro) LegacyBootstrap

func (d *Distro) LegacyBootstrap() bool

LegacyBootstrap returns whether hosts of this distro are bootstrapped using the legacy method.

func (*Distro) LegacyCommunication

func (d *Distro) LegacyCommunication() bool

LegacyCommunication returns whether the app server is communicating with hosts of this distro using the legacy method.

func (*Distro) MaxDurationPerHost

func (d *Distro) MaxDurationPerHost() time.Duration

func (*Distro) NewDistroData

func (d *Distro) NewDistroData() DistroData

func (*Distro) Platform

func (d *Distro) Platform() (string, string)

func (*Distro) S3ClientURL

func (d *Distro) S3ClientURL(settings *evergreen.Settings) string

S3ClientURL returns the URL in S3 where the Evergreen client version can be retrieved for this server's particular Evergreen build version.

func (*Distro) SetBSON

func (d *Distro) SetBSON(raw mgobson.Raw) error

func (*Distro) SetUserdata

func (d *Distro) SetUserdata(userdata, region string) error

func (*Distro) ShellBinary

func (d *Distro) ShellBinary() string

ShellPath returns the native path to the shell binary.

func (*Distro) ShouldGroupVersions

func (d *Distro) ShouldGroupVersions() bool

func (*Distro) Update

func (d *Distro) Update() error

Update updates one distro.

func (*Distro) ValidateBootstrapSettings

func (d *Distro) ValidateBootstrapSettings() error

ValidateBootstrapSettings checks if all of the bootstrap settings are valid for legacy or non-legacy bootstrapping.

type DistroData

type DistroData struct {
	Distro              Distro                   `bson:",inline"`
	ProviderSettingsMap []map[string]interface{} `bson:"provider_settings_list" json:"provider_settings_list"`
}

type DistroGroup

type DistroGroup []Distro

func (DistroGroup) GetDistroIds

func (distros DistroGroup) GetDistroIds() []string

GetDistroIds returns a slice of distro IDs for the given group of distros

type EnvVar

type EnvVar struct {
	Key   string `bson:"key" json:"key" mapstructure:"key,omitempty"`
	Value string `bson:"value" json:"value" mapstructure:"value,omitempty"`
}

type Expansion

type Expansion struct {
	Key   string `bson:"key,omitempty" json:"key,omitempty"`
	Value string `bson:"value,omitempty" json:"value,omitempty"`
}

type FinderSettings

type FinderSettings struct {
	Version string `bson:"version" json:"version" mapstructure:"version"`
}

type HomeVolumeSettings

type HomeVolumeSettings struct {
	FormatCommand string `bson:"format_command" json:"format_command" mapstructure:"format_command"`
}

type HostAllocatorSettings

type HostAllocatorSettings struct {
	Version                string        `bson:"version" json:"version" mapstructure:"version"`
	MinimumHosts           int           `bson:"minimum_hosts" json:"minimum_hosts" mapstructure:"minimum_hosts"`
	MaximumHosts           int           `bson:"maximum_hosts" json:"maximum_hosts" mapstructure:"maximum_hosts"`
	RoundingRule           string        `bson:"rounding_rule" json:"rounding_rule" mapstructure:"rounding_rule"`
	FeedbackRule           string        `bson:"feedback_rule" json:"feedback_rule" mapstructure:"feedback_rule"`
	AcceptableHostIdleTime time.Duration `bson:"acceptable_host_idle_time" json:"acceptable_host_idle_time" mapstructure:"acceptable_host_idle_time"`
	FutureHostFraction     float64       `bson:"future_host_fraction" json:"future_host_fraction" mapstructure:"future_host_fraction"`
}

type IcecreamSettings

type IcecreamSettings struct {
	SchedulerHost string `bson:"scheduler_host,omitempty" json:"scheduler_host,omitempty" mapstructure:"scheduler_host,omitempty"`
	ConfigPath    string `bson:"config_path,omitempty" json:"config_path,omitempty" mapstructure:"config_path,omitempty"`
}

func (IcecreamSettings) GetUpdateConfigScript

func (s IcecreamSettings) GetUpdateConfigScript() string

WriteConfigScript returns the shell script to update the icecream config file.

func (IcecreamSettings) Populated

func (s IcecreamSettings) Populated() bool

type PlannerSettings

type PlannerSettings struct {
	Version                   string        `bson:"version" json:"version" mapstructure:"version"`
	TargetTime                time.Duration `bson:"target_time" json:"target_time" mapstructure:"target_time,omitempty"`
	GroupVersions             *bool         `bson:"group_versions" json:"group_versions" mapstructure:"group_versions,omitempty"`
	PatchFactor               int64         `bson:"patch_zipper_factor" json:"patch_factor" mapstructure:"patch_factor"`
	PatchTimeInQueueFactor    int64         `bson:"patch_time_in_queue_factor" json:"patch_time_in_queue_factor" mapstructure:"patch_time_in_queue_factor"`
	CommitQueueFactor         int64         `bson:"commit_queue_factor" json:"commit_queue_factor" mapstructure:"commit_queue_factor"`
	MainlineTimeInQueueFactor int64         `bson:"mainline_time_in_queue_factor" json:"mainline_time_in_queue_factor" mapstructure:"mainline_time_in_queue_factor"`
	ExpectedRuntimeFactor     int64         `bson:"expected_runtime_factor" json:"expected_runtime_factor" mapstructure:"expected_runtime_factor"`
	GenerateTaskFactor        int64         `bson:"generate_task_factor" json:"generate_task_factor" mapstructure:"generate_task_factor"`
	// contains filtered or unexported fields
}

type PreconditionScript

type PreconditionScript struct {
	Path   string `bson:"path,omitempty" json:"path,omitempty" mapstructure:"path,omitempty"`
	Script string `bson:"script,omitempty" json:"script,omitempty" mapstructure:"script,omitempty"`
}

PreconditionScript represents a script that must run and succeed before the Jasper service can start on a provisioning host.

type ResourceLimits

type ResourceLimits struct {
	NumFiles        int `bson:"num_files,omitempty" json:"num_files,omitempty" mapstructure:"num_files,omitempty"`
	NumProcesses    int `bson:"num_processes,omitempty" json:"num_processes,omitempty" mapstructure:"num_processes,omitempty"`
	LockedMemoryKB  int `bson:"locked_memory,omitempty" json:"locked_memory,omitempty" mapstructure:"locked_memory,omitempty"`
	VirtualMemoryKB int `bson:"virtual_memory,omitempty" json:"virtual_memory,omitempty" mapstructure:"virtual_memory,omitempty"`
}

ResourceLimits represents resource limits in Linux.

Jump to

Keyboard shortcuts

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