install

package
v0.1.0-alpha.20 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultSizeRootDevice is the default size of the root partition.
	// TODO(andrewrynhard): We should inspect the tarball's uncompressed size and dynamically set the root partition's size.
	DefaultSizeRootDevice = 2048 * 1000 * 1000

	// DefaultSizeDataDevice is the default size of the data partition.
	DefaultSizeDataDevice = 1024 * 1000 * 1000

	// DefaultSizeBootDevice is the default size of the boot partition.
	// TODO(andrewrynhard): We should inspect the sizes of the artifacts and dynamically set the boot partition's size.
	DefaultSizeBootDevice = 512 * 1000 * 1000
)

Variables

View Source
var (
	// DefaultURLBase is the base URL for all default artifacts.
	// TODO(andrewrynhard): We need to setup infrastructure for publishing artifacts and not depend on GitHub.
	DefaultURLBase = "https://github.com/autonomy/talos/releases/download/" + version.Tag

	// DefaultRootfsURL is the URL to the rootfs.
	DefaultRootfsURL = DefaultURLBase + "/rootfs.tar.gz"

	// DefaultKernelURL is the URL to the kernel.
	DefaultKernelURL = DefaultURLBase + "/vmlinuz"

	// DefaultInitramfsURL is the URL to the initramfs.
	DefaultInitramfsURL = DefaultURLBase + "/initramfs.xz"
)

Functions

func ExecuteManifest

func ExecuteManifest(data *userdata.UserData, manifest *Manifest) (err error)

ExecuteManifest partitions and formats all disks in a manifest.

func Install

func Install(args string, data *userdata.UserData) (err error)

Install fetches the necessary data locations and copies or extracts to the target locations nolint: gocyclo

func Mount

func Mount() (err error)

Mount discovers the appropriate partitions by label and mounts them up to the appropriate mountpoint. TODO: See if we can consolidate this with rootfs/mount

func Prepare

func Prepare(data *userdata.UserData) (err error)

Prepare handles setting/consolidating/defaulting userdata pieces specific to installation TODO: See if this would be more appropriate in userdata nolint: dupl, gocyclo

func VerifyBootDevice

func VerifyBootDevice(data *userdata.UserData) (err error)

VerifyBootDevice verifies the supplied boot device options.

func VerifyDataDevice

func VerifyDataDevice(data *userdata.UserData) (err error)

VerifyDataDevice verifies the supplied data device options.

func VerifyDiskAvailability

func VerifyDiskAvailability(label string) (err error)

VerifyDiskAvailability verifies that no filesystems currently exist with the labels used by the OS.

func VerifyRootDevice

func VerifyRootDevice(data *userdata.UserData) (err error)

VerifyRootDevice verifies the supplied root device options.

func WipeDevices

func WipeDevices(manifest *Manifest) (err error)

WipeDevices writes zeros to each block device in the preparation manifest.

Types

type Manifest

type Manifest struct {
	Targets map[string][]*Target
}

Manifest represents the instructions for preparing all block devices for an installation.

func NewManifest

func NewManifest(data *userdata.UserData) (manifest *Manifest)

NewManifest initializes and returns a Manifest.

type Target

type Target struct {
	Label          string
	MountBase      string
	Device         string
	FileSystemType string
	PartitionName  string
	Size           uint
	Force          bool
	Test           bool
	BlockDevice    *blockdevice.BlockDevice
}

Target represents an installation partition.

func (*Target) Format

func (t *Target) Format() error

Format creates a xfs filesystem on the device/partition

func (*Target) Partition

func (t *Target) Partition(bd *blockdevice.BlockDevice) (err error)

Partition creates a new partition on the specified device nolint: dupl, gocyclo

Jump to

Keyboard shortcuts

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