firecracker

package
v0.5.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MPL-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Package firecracker implements Provisioner via Firecracker VMs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Launch

func Launch() error

Launch a control process around firecracker VM manager.

This function is invoked from 'talosctl firecracker-launch' hidden command and wraps starting, controlling and restarting 'firecracker' VM process.

Launch restarts VM forever until control process is stopped itself with a signal.

Process is expected to receive configuration on stdin. Current working directory should be cluster state directory, process output should be redirected to the logfile in state directory.

When signals SIGINT, SIGTERM are received, control process stops firecracker and exits.

nolint: gocyclo

func NewProvisioner

func NewProvisioner(ctx context.Context) (provision.Provisioner, error)

NewProvisioner initializes docker provisioner.

Types

type BootAssets

type BootAssets struct {
	KernelPath string
	InitrdPath string
}

BootAssets is what BootLoader extracts from the disk image.

type BootLoader

type BootLoader struct {
	// contains filtered or unexported fields
}

BootLoader extracts kernel (vmlinux) and initrd (initramfs.xz) from Talos disk image.

func NewBootLoader

func NewBootLoader(diskImage string) (*BootLoader, error)

NewBootLoader creates boot loader for the disk image.

func (*BootLoader) Close

func (b *BootLoader) Close() error

Close the bootloader.

func (*BootLoader) ExtractAssets

func (b *BootLoader) ExtractAssets() (assets BootAssets, err error)

ExtractAssets from disk image.

nolint: gocyclo

type LaunchConfig

type LaunchConfig struct {
	GatewayAddr         string
	Config              string
	BootloaderEmulation bool
	FirecrackerConfig   firecracker.Config
}

LaunchConfig is passed in to the Launch function over stdin.

Directories

Path Synopsis
Package inmemhttp implements temporary HTTP server which is based off memory fs.
Package inmemhttp implements temporary HTTP server which is based off memory fs.

Jump to

Keyboard shortcuts

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