Documentation ¶
Index ¶
- func RunLocalCommands(commands []string, wrappedCommand common.CommandWrapper, ...) error
- type Cleanup
- 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 StepCopyFiles
- type StepEarlyCleanup
- type StepMountExtra
- type StepPostMountCommands
- type StepPreMountCommands
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunLocalCommands ¶
func RunLocalCommands(commands []string, wrappedCommand common.CommandWrapper, ictx interpolate.Context, ui packer.Ui) error
Types ¶
type Communicator ¶
type Communicator struct { Chroot string CmdWrapper common.CommandWrapper }
Communicator is a special communicator that works by executing commands locally but within a chroot.
func (*Communicator) DownloadDir ¶
func (c *Communicator) DownloadDir(src string, dst string, exclude []string) error
type StepChrootProvision ¶
type StepChrootProvision struct { }
StepChrootProvision provisions the instance within a chroot.
func (*StepChrootProvision) Cleanup ¶
func (s *StepChrootProvision) Cleanup(state multistep.StateBag)
func (*StepChrootProvision) Run ¶
func (s *StepChrootProvision) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepCopyFiles ¶
type StepCopyFiles struct { Files []string // contains filtered or unexported fields }
StepCopyFiles copies some files from the host into the chroot environment.
Produces:
copy_files_cleanup CleanupFunc - A function to clean up the copied files early.
func (*StepCopyFiles) Cleanup ¶
func (s *StepCopyFiles) Cleanup(state multistep.StateBag)
func (*StepCopyFiles) CleanupFunc ¶
func (s *StepCopyFiles) CleanupFunc(state multistep.StateBag) error
func (*StepCopyFiles) Run ¶
func (s *StepCopyFiles) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepEarlyCleanup ¶
type StepEarlyCleanup struct{}
StepEarlyCleanup performs some of the cleanup steps early in order to prepare for snapshotting and creating an AMI.
func (*StepEarlyCleanup) Cleanup ¶
func (s *StepEarlyCleanup) Cleanup(state multistep.StateBag)
func (*StepEarlyCleanup) Run ¶
func (s *StepEarlyCleanup) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepMountExtra ¶
type StepMountExtra struct { ChrootMounts [][]string // contains filtered or unexported fields }
StepMountExtra mounts the attached device.
Produces:
mount_extra_cleanup CleanupFunc - To perform early cleanup
func (*StepMountExtra) Cleanup ¶
func (s *StepMountExtra) Cleanup(state multistep.StateBag)
func (*StepMountExtra) CleanupFunc ¶
func (s *StepMountExtra) CleanupFunc(state multistep.StateBag) error
func (*StepMountExtra) Run ¶
func (s *StepMountExtra) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepPostMountCommands ¶
type StepPostMountCommands struct {
Commands []string
}
StepPostMountCommands allows running arbitrary commands after mounting the device, but prior to the bind mount and copy steps.
func (*StepPostMountCommands) Cleanup ¶
func (s *StepPostMountCommands) Cleanup(state multistep.StateBag)
func (*StepPostMountCommands) Run ¶
func (s *StepPostMountCommands) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepPreMountCommands ¶
type StepPreMountCommands struct {
Commands []string
}
StepPreMountCommands sets up the a new block device when building from scratch
func (*StepPreMountCommands) Cleanup ¶
func (s *StepPreMountCommands) Cleanup(state multistep.StateBag)
func (*StepPreMountCommands) Run ¶
func (s *StepPreMountCommands) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Click to show internal directories.
Click to hide internal directories.