Documentation ¶
Overview ¶
Package provisioner exports behaviors for provisioning COS systems end-to-end. These behaviors are intended to run on a COS system.
Index ¶
- Variables
- func Resume(ctx context.Context, deps Deps, stateDir string) (err error)
- func Run(ctx context.Context, deps Deps, stateDir string, c Config) error
- type BootDiskConfig
- type Config
- type Deps
- type DisableAutoUpdateStep
- type InstallGPUStep
- type InstallPackagesStep
- type RunScriptStep
- type SealOEMStep
- type StepConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRebootRequired = errors.New("reboot required to continue provisioning")
ErrRebootRequired indicates that a reboot is necessary for provisioning to continue.
Functions ¶
Types ¶
type BootDiskConfig ¶
type Config ¶
type Config struct { // BuildContexts identifies the build contexts that should be used during // provisioning. A build context means the same thing here as it does // elsewhere in cos-customizer. The keys are build context identifiers, and // the values are addresses to fetch the build contexts from. Currently, only // gs:// addresses are supported. BuildContexts map[string]string // BootDisk defines how the boot disk should be configured. BootDisk BootDiskConfig Steps []StepConfig // UseScratchDisk indicates whether a scratch disk should be used. UseScratchDisk bool }
Config defines a provisioning flow.
type Deps ¶
type Deps struct { // GCSClient is used to access Google Cloud Storage. GCSClient *storage.Client // TarCmd is used for tar. TarCmd string // SystemctlCmd is used to access systemd. SystemctlCmd string // RootdevCmd is the path to the rootdev binary. RootdevCmd string // CgptCmd is the path to the cgpt binary. CgptCmd string // Resize2fsCmd is the path to the resize2fs binary. Resize2fsCmd string // E2fsckCmd is the path to the e2fsck binary. E2fsckCmd string // RootDir is the path to the root file system. Should be "/" in all real // runtime situations. RootDir string // DockerCredentialGCR is a path to a docker-credential-gcr program to use as a Docker // credential helper. DockerCredentialGCR string // VeritySetupImage is a path to a file system tarball (which can be imported // as a Docker image) that contains the "veritysetup" tool. VeritySetupImage string // HandleDiskLayoutBin is a path to a program for reformatting a COS disk // image. HandleDiskLayoutBin string }
Deps contains provisioner service dependencies.
type DisableAutoUpdateStep ¶
type DisableAutoUpdateStep struct{}
type InstallGPUStep ¶
type InstallPackagesStep ¶
type RunScriptStep ¶
type SealOEMStep ¶
type SealOEMStep struct{}
type StepConfig ¶
type StepConfig struct { Type string Args json.RawMessage }
Click to show internal directories.
Click to hide internal directories.