stage0

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2015 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enter added in v0.2.0

func Enter(cdir string, imageID *types.Hash, enterPath string, cmdline []string) error

Enter enters the container by exec()ing the stage1's /enter similar to /init /enter can expect to have its CWD set to the container root. imageID and command are supplied to /enter on argv followed by any arguments. enterPath is the path of the enter binary

func MergeEnvs added in v0.4.0

func MergeEnvs(appEnv *types.Environment, inheritEnv bool, setEnv []string)

MergeEnvs amends appEnv setting variables in setEnv before setting anything new from os.Environ if inheritEnv = true setEnv is expected to be in the os.Environ() key=value format

func Prepare added in v0.4.0

func Prepare(cfg PrepareConfig, dir string, uuid *types.UUID) error

Prepare sets up a pod based on the given config.

func Run

func Run(cfg RunConfig, dir string)

Run mounts the right overlay filesystems and actually runs the prepared pod by exec()ing the stage1 init inside the pod filesystem.

Types

type CommonConfig added in v0.4.0

type CommonConfig struct {
	Store       *cas.Store   // store containing all of the configured application images
	Stage1Image types.Hash   // stage1 image containing usable /init and /enter entrypoints
	UUID        *types.UUID  // UUID of the pod
	Images      []types.Hash // application images
	PodsDir     string       // root directory for rocket pods
	Debug       bool
}

configuration shared by both Run and Prepare

type PrepareConfig added in v0.4.0

type PrepareConfig struct {
	CommonConfig
	// TODO(jonboulle): These images are partially-populated hashes, this should be clarified.
	ExecAppends [][]string     // appendages to each image's app.exec lines (empty when none, length should match length of Images)
	InheritEnv  bool           // inherit parent environment into apps
	ExplicitEnv []string       // always set these environment variables for all the apps
	Volumes     []types.Volume // list of volumes that rocket can provide to applications
}

configuration parameters required by Prepare

type RunConfig added in v0.4.0

type RunConfig struct {
	CommonConfig
	PrivateNet           bool // pod should have its own network stack
	SpawnMetadataService bool // launch metadata service
	LockFd               int  // lock file descriptor
	Interactive          bool // whether the pod is interactive or not
}

configuration parameters needed by Run

Jump to

Keyboard shortcuts

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