Documentation ¶
Overview ¶
vagrant implements the packer.PostProcessor interface and adds a post-processor that turns artifacts of known builders into Vagrant boxes.
Index ¶
- Constants
- Variables
- func CopyContents(dst, src string) error
- func DecompressOva(dir, src string) error
- func DirToBox(dst, dir string, ui packer.Ui, level int) error
- func WriteMetadata(dir string, contents interface{}) error
- type AWSProvider
- type Artifact
- type Config
- type DigitalOceanProvider
- type ParallelsProvider
- type PostProcessor
- type Provider
- type VBoxProvider
- type VMwareProvider
Constants ¶
const BuilderId = "mitchellh.post-processor.vagrant"
Variables ¶
var UnnecessaryFilesPatterns = []string{"\\.log$", "\\.backup$", "\\.Backup$", "\\.app/"}
These are the extensions of files and directories that are unnecessary for the function of a Parallels virtual machine.
Functions ¶
func CopyContents ¶ added in v0.1.5
Copies a file by copying the contents of the file to another place.
func DecompressOva ¶ added in v0.3.5
DecompressOva takes an ova file and decompresses it into the target directory.
func DirToBox ¶
DirToBox takes the directory and compresses it into a Vagrant-compatible box. This function does not perform checks to verify that dir is actually a proper box. This is an expected precondition.
func WriteMetadata ¶
WriteMetadata writes the "metadata.json" file for a Vagrant box.
Types ¶
type AWSProvider ¶ added in v0.5.0
type AWSProvider struct{}
func (*AWSProvider) KeepInputArtifact ¶ added in v0.5.2
func (p *AWSProvider) KeepInputArtifact() bool
type Artifact ¶
func NewArtifact ¶
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` CompressionLevel int `mapstructure:"compression_level"` Include []string `mapstructure:"include"` OutputPath string `mapstructure:"output"` Override map[string]interface{} VagrantfileTemplate string `mapstructure:"vagrantfile_template"` // contains filtered or unexported fields }
type DigitalOceanProvider ¶ added in v0.5.0
type DigitalOceanProvider struct{}
func (*DigitalOceanProvider) KeepInputArtifact ¶ added in v0.5.2
func (p *DigitalOceanProvider) KeepInputArtifact() bool
type ParallelsProvider ¶ added in v0.6.0
type ParallelsProvider struct{}
func (*ParallelsProvider) KeepInputArtifact ¶ added in v0.6.0
func (p *ParallelsProvider) KeepInputArtifact() bool
type PostProcessor ¶
type PostProcessor struct {
// contains filtered or unexported fields
}
func (*PostProcessor) Configure ¶
func (p *PostProcessor) Configure(raws ...interface{}) error
type Provider ¶ added in v0.5.0
type Provider interface { // KeepInputArtifact should return true/false whether this provider // requires the input artifact to be kept by default. KeepInputArtifact() bool // Process is called to process an artifact into a Vagrant box. The // artifact is given as well as the temporary directory path to // put things. // // The Provider should return the contents for the Vagrantfile, // any metadata (including the provider type in that), and an error // if any. Process(packer.Ui, packer.Artifact, string) (vagrantfile string, metadata map[string]interface{}, err error) }
Provider is the interface that each provider must implement in order to package the artifacts into a Vagrant-compatible box.
type VBoxProvider ¶ added in v0.5.0
type VBoxProvider struct{}
func (*VBoxProvider) KeepInputArtifact ¶ added in v0.5.2
func (p *VBoxProvider) KeepInputArtifact() bool
type VMwareProvider ¶ added in v0.5.0
type VMwareProvider struct{}
func (*VMwareProvider) KeepInputArtifact ¶ added in v0.5.2
func (p *VMwareProvider) KeepInputArtifact() bool