Documentation ¶
Index ¶
- func ShellCommand(command string) *exec.Cmd
- type Artifact
- type Builder
- type Communicator
- func (c *Communicator) Download(src string, w io.Writer) error
- func (c *Communicator) DownloadDir(src string, dst string, exclude []string) error
- func (c *Communicator) Start(ctx context.Context, cmd *packer.RemoteCmd) error
- func (c *Communicator) Upload(dst string, r io.Reader, fi *os.FileInfo) error
- func (c *Communicator) UploadDir(dst string, src string, exclude []string) error
- type StepChrootProvision
- type StepCompressArtifact
- type StepCreateBaseImage
- type StepExtractAndCopyImage
- type StepMapImage
- type StepMkfsImage
- type StepMountImage
- type StepPartitionImage
- type StepPopulateFilesystem
- type StepSetupChroot
- type StepSetupExtra
- type StepSetupQemu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShellCommand ¶
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
}
Artifact represents the image produced by packer-builder-arm
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds (or modifies) arm system images
type Communicator ¶
Communicator is a special communicator that works by executing commands locally but within a chroot.
func (*Communicator) Download ¶
func (c *Communicator) Download(src string, w io.Writer) error
Download copies file from chroot
func (*Communicator) DownloadDir ¶
func (c *Communicator) DownloadDir(src string, dst string, exclude []string) error
DownloadDir N/A
type StepChrootProvision ¶
StepChrootProvision provisions the instance within a chroot
func (*StepChrootProvision) Cleanup ¶
func (s *StepChrootProvision) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepChrootProvision) Run ¶
func (s *StepChrootProvision) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepCompressArtifact ¶
type StepCompressArtifact struct { ImageMountPointKey string // contains filtered or unexported fields }
StepCompressArtifact generates rootfs archive if required
func (*StepCompressArtifact) Cleanup ¶
func (s *StepCompressArtifact) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepCompressArtifact) Run ¶
func (s *StepCompressArtifact) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepCreateBaseImage ¶
type StepCreateBaseImage struct{}
StepCreateBaseImage creates the base image (empty file of given size via dd)
func (*StepCreateBaseImage) Cleanup ¶
func (s *StepCreateBaseImage) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepCreateBaseImage) Run ¶
func (s *StepCreateBaseImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepExtractAndCopyImage ¶
type StepExtractAndCopyImage struct {
FromKey string
}
StepExtractAndCopyImage creates filesystem on already partitioned image
func (*StepExtractAndCopyImage) Cleanup ¶
func (s *StepExtractAndCopyImage) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepExtractAndCopyImage) Run ¶
func (s *StepExtractAndCopyImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepMapImage ¶
type StepMapImage struct { ResultKey string // contains filtered or unexported fields }
StepMapImage maps system image to /dev/loopX
func (*StepMapImage) Cleanup ¶
func (s *StepMapImage) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepMapImage) Run ¶
func (s *StepMapImage) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepMkfsImage ¶
type StepMkfsImage struct {
FromKey string
}
StepMkfsImage creates filesystem on already partitioned image
func (*StepMkfsImage) Cleanup ¶
func (s *StepMkfsImage) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepMkfsImage) Run ¶
func (s *StepMkfsImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepMountImage ¶
type StepMountImage struct { FromKey string ResultKey string MouthPath string // contains filtered or unexported fields }
StepMountImage mounts partition to selected mountpoints
func (*StepMountImage) Cleanup ¶
func (s *StepMountImage) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepMountImage) Run ¶
func (s *StepMountImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepPartitionImage ¶
type StepPartitionImage struct{}
StepPartitionImage creates partitions on raw image
func (*StepPartitionImage) Cleanup ¶
func (s *StepPartitionImage) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepPartitionImage) Run ¶
func (s *StepPartitionImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepPopulateFilesystem ¶
StepPopulateFilesystem unpacks system files from previously downloaded archive onto mounted partitions
func (*StepPopulateFilesystem) Cleanup ¶
func (s *StepPopulateFilesystem) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepPopulateFilesystem) Run ¶
func (s *StepPopulateFilesystem) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepSetupChroot ¶
type StepSetupChroot struct {
ImageMountPointKey string
}
StepSetupChroot prepares chroot environment by mounting specific locations (/dev /proc etc.)
func (*StepSetupChroot) Cleanup ¶
func (s *StepSetupChroot) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepSetupChroot) Run ¶
func (s *StepSetupChroot) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepSetupExtra ¶
type StepSetupExtra struct {
FromKey string
}
StepSetupExtra creates filesystem on already partitioned image
func (*StepSetupExtra) Cleanup ¶
func (s *StepSetupExtra) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepSetupExtra) Run ¶
func (s *StepSetupExtra) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
type StepSetupQemu ¶
type StepSetupQemu struct {
ImageMountPointKey string
}
StepSetupQemu configures chroot environment to run binaries via qemu
func (*StepSetupQemu) Cleanup ¶
func (s *StepSetupQemu) Cleanup(state multistep.StateBag)
Cleanup after step execution
func (*StepSetupQemu) Run ¶
func (s *StepSetupQemu) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run the step
Source Files ¶
- artifact.go
- builder.go
- communicator.go
- step_chroot_provision.go
- step_compress_artifact.go
- step_create_base_image.go
- step_extract_and_copy_image.go
- step_map_image.go
- step_mkfs_image.go
- step_mount_image.go
- step_partition_image.go
- step_populate_filesystem.go
- step_setup_chroot.go
- step_setup_extra.go
- step_setup_qemu.go