lxd

package
v0.0.0-...-9eb14d7 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const BuilderId = "lxd"

The unique ID for this builder

Variables

This section is empty.

Functions

func LXDCommand

func LXDCommand(args ...string) (string, error)

Yeah...LXD calls `lxc` because the command line is different between the packages. This should also avoid a naming collision between the LXC builder.

func ShellCommand

func ShellCommand(command string) *exec.Cmd

ShellCommand takes a command string and returns an *exec.Cmd to execute it within the context of a shell (/bin/sh).

Types

type Artifact

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

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (a *Artifact) Id() string

func (*Artifact) State

func (a *Artifact) State(name string) interface{}

func (*Artifact) String

func (a *Artifact) String() string

type Builder

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

func (*Builder) Cancel

func (b *Builder) Cancel()

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, error)

func (*Builder) Run

func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error)

type CommandWrapper

type CommandWrapper func(string) (string, error)

CommandWrapper is a type that given a command, will possibly modify that command in-flight. This might return an error.

type Communicator

type Communicator struct {
	ContainerName string
	CmdWrapper    CommandWrapper
}

func (*Communicator) Download

func (c *Communicator) Download(src string, w io.Writer) error

func (*Communicator) DownloadDir

func (c *Communicator) DownloadDir(src string, dst string, exclude []string) error

func (*Communicator) Execute

func (c *Communicator) Execute(commandString string) (*exec.Cmd, error)

func (*Communicator) Start

func (c *Communicator) Start(cmd *packer.RemoteCmd) error

func (*Communicator) Upload

func (c *Communicator) Upload(dst string, r io.Reader, fi *os.FileInfo) error

func (*Communicator) UploadDir

func (c *Communicator) UploadDir(dst string, src string, exclude []string) error

type Config

type Config struct {
	common.PackerConfig `mapstructure:",squash"`
	OutputImage         string            `mapstructure:"output_image"`
	ContainerName       string            `mapstructure:"container_name"`
	CommandWrapper      string            `mapstructure:"command_wrapper"`
	Image               string            `mapstructure:"image"`
	PublishProperties   map[string]string `mapstructure:"publish_properties"`
	InitTimeout         time.Duration
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(raws ...interface{}) (*Config, error)

type StepProvision

type StepProvision struct{}

StepProvision provisions the container

func (*StepProvision) Cleanup

func (s *StepProvision) Cleanup(state multistep.StateBag)

func (*StepProvision) Run

Jump to

Keyboard shortcuts

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