Documentation
¶
Index ¶
- Constants
- Variables
- func ExecuteManifest(data *userdata.UserData, manifest *Manifest) (err error)
- func Install(args string, data *userdata.UserData) (err error)
- func Mount() (err error)
- func Prepare(data *userdata.UserData) (err error)
- func VerifyBootDevice(data *userdata.UserData) (err error)
- func VerifyDataDevice(data *userdata.UserData) (err error)
- func VerifyDiskAvailability(label string) (err error)
- func VerifyRootDevice(data *userdata.UserData) (err error)
- func WipeDevices(manifest *Manifest) (err error)
- type Manifest
- type Target
Constants ¶
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 ¶
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 ¶
ExecuteManifest partitions and formats all disks in a manifest.
func Install ¶
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 ¶
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 ¶
VerifyBootDevice verifies the supplied boot device options.
func VerifyDataDevice ¶
VerifyDataDevice verifies the supplied data device options.
func VerifyDiskAvailability ¶
VerifyDiskAvailability verifies that no filesystems currently exist with the labels used by the OS.
func VerifyRootDevice ¶
VerifyRootDevice verifies the supplied root device options.
func WipeDevices ¶
WipeDevices writes zeros to each block device in the preparation manifest.
Types ¶
type Manifest ¶
Manifest represents the instructions for preparing all block devices for an installation.
func NewManifest ¶
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) Partition ¶
func (t *Target) Partition(bd *blockdevice.BlockDevice) (err error)
Partition creates a new partition on the specified device nolint: dupl, gocyclo