mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 08:42:33 -04:00
commit
414dd80e61
88 changed files with 165 additions and 165 deletions
30
CHANGELOG.md
30
CHANGELOG.md
|
|
@ -411,7 +411,7 @@
|
|||
* builder/cloudstack: Properly report back errors. [GH-5103] [GH-5123]
|
||||
* builder/docker: Fix windows filepath in docker-toolbox call [GH-4887]
|
||||
* builder/docker: Fix windows filepath in docker-toolbox call. [GH-4887]
|
||||
* builder/hyperv: Use SID to verify membersip in Admin group, fixing for non-
|
||||
* builder/hyperv: Use SID to verify membership in Admin group, fixing for non-
|
||||
english users. [GH-5022]
|
||||
* builder/hyperv: Verify membership in the group Hyper-V Administrators by SID
|
||||
not name. [GH-5022]
|
||||
|
|
@ -658,7 +658,7 @@
|
|||
* builder/amazon: Crashes when new EBS vols are used. [GH-4308]
|
||||
* builder/amazon: Fix crash in amazon-instance. [GH-4372]
|
||||
* builder/amazon: fix run volume tagging [GH-4420]
|
||||
* builder/amazon: fix when using non-existant security\_group\_id. [GH-4425]
|
||||
* builder/amazon: fix when using non-existent security\_group\_id. [GH-4425]
|
||||
* builder/amazon: Properly error if we don't have the
|
||||
ec2:DescribeSecurityGroups permission. [GH-4304]
|
||||
* builder/amazon: Properly wait for security group to exist. [GH-4369]
|
||||
|
|
@ -1321,7 +1321,7 @@
|
|||
* builder/parallels: Support Parallels Desktop 11. [GH-2199]
|
||||
* builder/openstack: Add `rackconnect_wait` for Rackspace customers to wait for
|
||||
RackConnect data to appear
|
||||
* buidler/openstack: Add `ssh_interface` option for rackconnect for users that
|
||||
* builder/openstack: Add `ssh_interface` option for rackconnect for users that
|
||||
have prohibitive firewalls
|
||||
* builder/openstack: Flavor names can be used as well as refs
|
||||
* builder/openstack: Add `availability_zone` [GH-2016]
|
||||
|
|
@ -1352,7 +1352,7 @@
|
|||
* core: Fix potential panic for post-processor plugin exits. [GH-2098]
|
||||
* core: `PACKER_CONFIG` may point to a non-existent file. [GH-2226]
|
||||
* builder/amazon: Allow spaces in AMI names when using `clean_ami_name` [GH-2182]
|
||||
* builder/amazon: Remove deprecated ec2-upload-bundle paramger. [GH-1931]
|
||||
* builder/amazon: Remove deprecated ec2-upload-bundle parameter. [GH-1931]
|
||||
* builder/amazon: Use IAM Profile to upload bundle if provided. [GH-1985]
|
||||
* builder/amazon: Use correct exit code after SSH authentication failed. [GH-2004]
|
||||
* builder/amazon: Retry finding created instance for eventual
|
||||
|
|
@ -1435,7 +1435,7 @@
|
|||
|
||||
* builder/googlecompute: Support for ubuntu-os-cloud project
|
||||
* builder/googlecompute: Support for OAuth2 to avoid client secrets file
|
||||
* builder/googlecompute: GCE image from persistant disk instead of tarball
|
||||
* builder/googlecompute: GCE image from persistent disk instead of tarball
|
||||
* builder/qemu: Checksum type "none" can be used
|
||||
* provisioner/chef: Generate a node name if none available
|
||||
* provisioner/chef: Added ssl_verify_mode configuration
|
||||
|
|
@ -1569,7 +1569,7 @@
|
|||
* builder/docker: Can now specify login credentials to pull images.
|
||||
* builder/docker: Support mounting additional volumes. [GH-1430]
|
||||
* builder/parallels/all: Path to tools ISO is calculated automatically. [GH-1455]
|
||||
* builder/parallels-pvm: `reassign_mac` option to choose wehther or not
|
||||
* builder/parallels-pvm: `reassign_mac` option to choose whether or not
|
||||
to generate a new MAC address. [GH-1461]
|
||||
* builder/qemu: Can specify "none" acceleration type. [GH-1395]
|
||||
* builder/qemu: Can specify "tcg" acceleration type. [GH-1395]
|
||||
|
|
@ -1598,7 +1598,7 @@
|
|||
manager certs. [GH-1137]
|
||||
* builder/amazon/all: `delete_on_termination` set to false will work.
|
||||
* builder/amazon/all: Fix race condition on setting tags. [GH-1367]
|
||||
* builder/amazon/all: More desctriptive error messages if Amazon only
|
||||
* builder/amazon/all: More descriptive error messages if Amazon only
|
||||
sends an error code. [GH-1189]
|
||||
* builder/docker: Error if `DOCKER_HOST` is set.
|
||||
* builder/docker: Remove the container during cleanup. [GH-1206]
|
||||
|
|
@ -2012,7 +2012,7 @@
|
|||
* builder/digitalocean: scrub API keys from config debug output. [GH-516]
|
||||
* builder/virtualbox: error if VirtualBox version cant be detected. [GH-488]
|
||||
* builder/virtualbox: detect if vboxdrv isn't properly setup. [GH-488]
|
||||
* builder/virtualbox: sleep a bit before export to ensure the sesssion
|
||||
* builder/virtualbox: sleep a bit before export to ensure the session
|
||||
is unlocked. [GH-512]
|
||||
* builder/virtualbox: create SATA drives properly on VirtualBox 4.3. [GH-547]
|
||||
* builder/virtualbox: support user templates in SSH key path. [GH-539]
|
||||
|
|
@ -2169,7 +2169,7 @@
|
|||
* builder/virtualbox,vmware: Support SHA512 as a checksum type. [GH-356]
|
||||
* builder/vmware: The root hard drive type can now be specified with
|
||||
"disk_type_id" for advanced users. [GH-328]
|
||||
* provisioner/salt-masterless: Ability to specfy a minion config. [GH-264]
|
||||
* provisioner/salt-masterless: Ability to specify a minion config. [GH-264]
|
||||
* provisioner/salt-masterless: Ability to upload pillars. [GH-353]
|
||||
|
||||
### IMPROVEMENTS:
|
||||
|
|
@ -2228,7 +2228,7 @@
|
|||
* core: All HTTP downloads across Packer now support the standard
|
||||
proxy environmental variables (`HTTP_PROXY`, `NO_PROXY`, etc.) [GH-252]
|
||||
* builder/amazon: API requests will use HTTP proxy if specified by
|
||||
enviromental variables.
|
||||
environmental variables.
|
||||
* builder/digitalocean: API requests will use HTTP proxy if specified
|
||||
by environmental variables.
|
||||
|
||||
|
|
@ -2274,11 +2274,11 @@
|
|||
* builder/amazon-instance: send IAM instance profile data. [GH-294]
|
||||
* builder/digitalocean: API request parameters are properly URL
|
||||
encoded. [GH-281]
|
||||
* builder/virtualbox: dowload progress won't be shown until download
|
||||
* builder/virtualbox: download progress won't be shown until download
|
||||
actually starts. [GH-288]
|
||||
* builder/virtualbox: floppy files names of 13 characters are now properly
|
||||
written to the FAT12 filesystem. [GH-285]
|
||||
* builder/vmware: dowload progress won't be shown until download
|
||||
* builder/vmware: download progress won't be shown until download
|
||||
actually starts. [GH-288]
|
||||
* builder/vmware: interrupt works while typing commands over VNC.
|
||||
* builder/virtualbox: floppy files names of 13 characters are now properly
|
||||
|
|
@ -2400,7 +2400,7 @@
|
|||
### BUG FIXES:
|
||||
|
||||
* builder/amazon/all: Gracefully handle when AMI appears to not exist
|
||||
while AWS state is propogating. [GH-207]
|
||||
while AWS state is propagating. [GH-207]
|
||||
* builder/virtualbox: Trim carriage returns for Windows to properly
|
||||
detect VM state on Windows. [GH-218]
|
||||
* core: build names no longer cause invalid config errors. [GH-197]
|
||||
|
|
@ -2425,7 +2425,7 @@
|
|||
* Amazon EBS builder can now optionally use a pre-made security group
|
||||
instead of randomly generating one.
|
||||
* DigitalOcean API key and client IDs can now be passed in as
|
||||
environmental variables. See the documentatin for more details.
|
||||
environmental variables. See the documentation for more details.
|
||||
* VirtualBox and VMware can now have `floppy_files` specified to attach
|
||||
floppy disks when booting. This allows for unattended Windows installs.
|
||||
* `packer build` has a new `-force` flag that forces the removal of
|
||||
|
|
@ -2482,7 +2482,7 @@
|
|||
* core: Non-200 response codes on downloads now show proper errors.
|
||||
[GH-141]
|
||||
* amazon-ebs: SSH handshake is retried. [GH-130]
|
||||
* vagrant: The `BuildName` template propery works properly in
|
||||
* vagrant: The `BuildName` template property works properly in
|
||||
the output path.
|
||||
* vagrant: Properly configure the provider-specific post-processors so
|
||||
things like `vagrantfile_template` work. [GH-129]
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
steps = []multistep.Step{
|
||||
&stepPreValidate{
|
||||
AlicloudDestImageName: b.config.AlicloudImageName,
|
||||
ForceDelete: b.config.AlicloudImageForceDetele,
|
||||
ForceDelete: b.config.AlicloudImageForceDelete,
|
||||
},
|
||||
&stepCheckAlicloudSourceImage{
|
||||
SourceECSImageId: b.config.AlicloudSourceImage,
|
||||
|
|
@ -132,7 +132,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
RegionId: b.config.AlicloudRegion,
|
||||
InternetChargeType: b.config.InternetChargeType,
|
||||
InternetMaxBandwidthOut: b.config.InternetMaxBandwidthOut,
|
||||
InstnaceName: b.config.InstanceName,
|
||||
InstanceName: b.config.InstanceName,
|
||||
ZoneId: b.config.ZoneId,
|
||||
})
|
||||
if b.chooseNetworkType() == VpcNet {
|
||||
|
|
@ -165,8 +165,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
ForceStop: b.config.ForceStopInstance,
|
||||
},
|
||||
&stepDeleteAlicloudImageSnapshots{
|
||||
AlicloudImageForceDeteleSnapshots: b.config.AlicloudImageForceDeteleSnapshots,
|
||||
AlicloudImageForceDetele: b.config.AlicloudImageForceDetele,
|
||||
AlicloudImageForceDeleteSnapshots: b.config.AlicloudImageForceDeleteSnapshots,
|
||||
AlicloudImageForceDelete: b.config.AlicloudImageForceDelete,
|
||||
AlicloudImageName: b.config.AlicloudImageName,
|
||||
},
|
||||
&stepCreateAlicloudImage{},
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ type AlicloudImageConfig struct {
|
|||
AlicloudImageUNShareAccounts []string `mapstructure:"image_unshare_account"`
|
||||
AlicloudImageDestinationRegions []string `mapstructure:"image_copy_regions"`
|
||||
AlicloudImageDestinationNames []string `mapstructure:"image_copy_names"`
|
||||
AlicloudImageForceDetele bool `mapstructure:"image_force_delete"`
|
||||
AlicloudImageForceDeteleSnapshots bool `mapstructure:"image_force_delete_snapshots"`
|
||||
AlicloudImageForceDelete bool `mapstructure:"image_force_delete"`
|
||||
AlicloudImageForceDeleteSnapshots bool `mapstructure:"image_force_delete_snapshots"`
|
||||
AlicloudImageForceDeleteInstances bool `mapstructure:"image_force_delete_instances"`
|
||||
AlicloudImageSkipRegionValidation bool `mapstructure:"skip_region_validation"`
|
||||
AlicloudDiskDevices `mapstructure:",squash"`
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|||
}
|
||||
|
||||
if c.InstanceType == "" {
|
||||
errs = append(errs, errors.New("An aliclod_instance_type must be specified"))
|
||||
errs = append(errs, errors.New("An alicloud_instance_type must be specified"))
|
||||
}
|
||||
|
||||
if c.UserData != "" && c.UserDataFile != "" {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
)
|
||||
|
||||
type stepConfigAlicloudPublicIP struct {
|
||||
publicIPAdress string
|
||||
RegionId string
|
||||
publicIPAddress string
|
||||
RegionId string
|
||||
}
|
||||
|
||||
func (s *stepConfigAlicloudPublicIP) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
|
||||
|
|
@ -25,7 +25,7 @@ func (s *stepConfigAlicloudPublicIP) Run(_ context.Context, state multistep.Stat
|
|||
ui.Say(fmt.Sprintf("Error allocating public ip: %s", err))
|
||||
return multistep.ActionHalt
|
||||
}
|
||||
s.publicIPAdress = ipaddress
|
||||
s.publicIPAddress = ipaddress
|
||||
ui.Say(fmt.Sprintf("Allocated public ip address %s.", ipaddress))
|
||||
state.Put("ipaddress", ipaddress)
|
||||
return multistep.ActionContinue
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ func (s *stepConfigAlicloudVSwitch) Cleanup(state multistep.StateBag) {
|
|||
e, _ := err.(*common.Error)
|
||||
if (e.Code == "IncorrectVSwitchStatus" || e.Code == "DependencyViolation" ||
|
||||
e.Code == "DependencyViolation.HaVip" ||
|
||||
e.Code == "IncorretRouteEntryStatus") && time.Now().Before(timeoutPoint) {
|
||||
e.Code == "IncorrectRouteEntryStatus") && time.Now().Before(timeoutPoint) {
|
||||
time.Sleep(1 * time.Second)
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ type stepCreateAlicloudInstance struct {
|
|||
RegionId string
|
||||
InternetChargeType string
|
||||
InternetMaxBandwidthOut int
|
||||
InstnaceName string
|
||||
InstanceName string
|
||||
ZoneId string
|
||||
instance *ecs.InstanceAttributesType
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ func (s *stepCreateAlicloudInstance) Run(_ context.Context, state multistep.Stat
|
|||
IoOptimized: ioOptimized,
|
||||
VSwitchId: vswitchId,
|
||||
SecurityGroupId: securityGroupId,
|
||||
InstanceName: s.InstnaceName,
|
||||
InstanceName: s.InstanceName,
|
||||
Password: password,
|
||||
ZoneId: s.ZoneId,
|
||||
DataDisk: diskDeviceToDiskType(config.AlicloudImageConfig.ECSImagesDiskMappings),
|
||||
|
|
@ -89,7 +89,7 @@ func (s *stepCreateAlicloudInstance) Run(_ context.Context, state multistep.Stat
|
|||
InternetMaxBandwidthOut: s.InternetMaxBandwidthOut,
|
||||
IoOptimized: ioOptimized,
|
||||
SecurityGroupId: securityGroupId,
|
||||
InstanceName: s.InstnaceName,
|
||||
InstanceName: s.InstanceName,
|
||||
Password: password,
|
||||
ZoneId: s.ZoneId,
|
||||
DataDisk: diskDeviceToDiskType(config.AlicloudImageConfig.ECSImagesDiskMappings),
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import (
|
|||
)
|
||||
|
||||
type stepDeleteAlicloudImageSnapshots struct {
|
||||
AlicloudImageForceDetele bool
|
||||
AlicloudImageForceDeteleSnapshots bool
|
||||
AlicloudImageForceDelete bool
|
||||
AlicloudImageForceDeleteSnapshots bool
|
||||
AlicloudImageName string
|
||||
}
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ func (s *stepDeleteAlicloudImageSnapshots) Run(_ context.Context, state multiste
|
|||
config := state.Get("config").(Config)
|
||||
ui.Say("Deleting image snapshots.")
|
||||
// Check for force delete
|
||||
if s.AlicloudImageForceDetele {
|
||||
if s.AlicloudImageForceDelete {
|
||||
images, _, err := client.DescribeImages(&ecs.DescribeImagesArgs{
|
||||
RegionId: common.Region(config.AlicloudRegion),
|
||||
ImageName: s.AlicloudImageName,
|
||||
|
|
@ -43,7 +43,7 @@ func (s *stepDeleteAlicloudImageSnapshots) Run(_ context.Context, state multiste
|
|||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
}
|
||||
if s.AlicloudImageForceDeteleSnapshots {
|
||||
if s.AlicloudImageForceDeleteSnapshots {
|
||||
for _, diskDevice := range image.DiskDeviceMappings.DiskDeviceMapping {
|
||||
if err := client.DeleteSnapshot(diskDevice.SnapshotId); err != nil {
|
||||
err := fmt.Errorf("Deleting ECS snapshot failed: %s", err)
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ func (s *stepRunAlicloudInstance) Cleanup(state multistep.StateBag) {
|
|||
ui := state.Get("ui").(packer.Ui)
|
||||
client := state.Get("client").(*ecs.Client)
|
||||
instance := state.Get("instance").(*ecs.InstanceAttributesType)
|
||||
instanceAttrubite, _ := client.DescribeInstanceAttribute(instance.InstanceId)
|
||||
if instanceAttrubite.Status == ecs.Starting || instanceAttrubite.Status == ecs.Running {
|
||||
instanceAttribute, _ := client.DescribeInstanceAttribute(instance.InstanceId)
|
||||
if instanceAttribute.Status == ecs.Starting || instanceAttribute.Status == ecs.Running {
|
||||
if err := client.StopInstance(instance.InstanceId, true); err != nil {
|
||||
ui.Say(fmt.Sprintf("Error stopping instance %s, it may still be around %s", instance.InstanceId, err))
|
||||
return
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ func TestAccessConfigPrepare_Region(t *testing.T) {
|
|||
|
||||
}
|
||||
|
||||
func TestAccessConfigPrepare_RegionRestrictd(t *testing.T) {
|
||||
func TestAccessConfigPrepare_RegionRestricted(t *testing.T) {
|
||||
c := testAccessConfig()
|
||||
|
||||
// Create a Session with a custom region
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|||
// Validation
|
||||
errs := c.Comm.Prepare(ctx)
|
||||
|
||||
// Valadating ssh_interface
|
||||
// Validating ssh_interface
|
||||
if c.SSHInterface != "public_ip" &&
|
||||
c.SSHInterface != "private_ip" &&
|
||||
c.SSHInterface != "public_dns" &&
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ func TestAdditionalDiskArtifactProperties(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestArtifactOverHypenatedCaptureUri(t *testing.T) {
|
||||
func TestArtifactOverHyphenatedCaptureUri(t *testing.T) {
|
||||
template := CaptureTemplate{
|
||||
Resources: []CaptureResources{
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
// Behavior is the most important thing to assert for ServicePrincipalToken, but
|
||||
// that cannot be done in a unit test because it involves network access. Instead,
|
||||
// I assert the expected intertness of this class.
|
||||
// I assert the expected inertness of this class.
|
||||
func TestNewAuthenticate(t *testing.T) {
|
||||
testSubject := NewAuthenticate(azure.PublicCloud, "clientID", "clientString", "tenantID")
|
||||
spn, err := testSubject.getServicePrincipalToken()
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@ const AzureErrorSimple = `{"error":{"code":"ResourceNotFound","message":"The Res
|
|||
const AzureErrorNested = `{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"InvalidRequestFormat\",\r\n \"message\": \"Cannot parse the request.\",\r\n \"details\": [\r\n {\r\n \"code\": \"InvalidJson\",\r\n \"message\": \"Error converting value \\\"playground\\\" to type 'Microsoft.WindowsAzure.Networking.Nrp.Frontend.Contract.Csm.Public.IpAllocationMethod'. Path 'properties.publicIPAllocationMethod', line 1, position 130.\"\r\n }\r\n ]\r\n }\r\n}"}]}}`
|
||||
|
||||
func TestAzureErrorSimpleShouldUnmarshal(t *testing.T) {
|
||||
var azureErrorReponse azureErrorResponse
|
||||
err := json.Unmarshal([]byte(AzureErrorSimple), &azureErrorReponse)
|
||||
var azureErrorResponse azureErrorResponse
|
||||
err := json.Unmarshal([]byte(AzureErrorSimple), &azureErrorResponse)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if azureErrorReponse.ErrorDetails.Code != "ResourceNotFound" {
|
||||
if azureErrorResponse.ErrorDetails.Code != "ResourceNotFound" {
|
||||
t.Errorf("Error.Code")
|
||||
}
|
||||
if azureErrorReponse.ErrorDetails.Message != "The Resource 'Microsoft.Compute/images/PackerUbuntuImage' under resource group 'packer-test00' was not found." {
|
||||
if azureErrorResponse.ErrorDetails.Message != "The Resource 'Microsoft.Compute/images/PackerUbuntuImage' under resource group 'packer-test00' was not found." {
|
||||
t.Errorf("Error.Message")
|
||||
}
|
||||
}
|
||||
|
|
@ -51,26 +51,26 @@ func TestAzureErrorEmptyShouldFormat(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAzureErrorSimpleShouldFormat(t *testing.T) {
|
||||
var azureErrorReponse azureErrorResponse
|
||||
err := json.Unmarshal([]byte(AzureErrorSimple), &azureErrorReponse)
|
||||
var azureErrorResponse azureErrorResponse
|
||||
err := json.Unmarshal([]byte(AzureErrorSimple), &azureErrorResponse)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = approvaltests.VerifyString(t, azureErrorReponse.Error())
|
||||
err = approvaltests.VerifyString(t, azureErrorResponse.Error())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAzureErrorNestedShouldFormat(t *testing.T) {
|
||||
var azureErrorReponse azureErrorResponse
|
||||
err := json.Unmarshal([]byte(AzureErrorNested), &azureErrorReponse)
|
||||
var azureErrorResponse azureErrorResponse
|
||||
err := json.Unmarshal([]byte(AzureErrorNested), &azureErrorResponse)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = approvaltests.VerifyString(t, azureErrorReponse.Error())
|
||||
err = approvaltests.VerifyString(t, azureErrorResponse.Error())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ func setCloudEnvironment(c *Config) error {
|
|||
name := strings.ToUpper(c.CloudEnvironmentName)
|
||||
envName, ok := lookup[name]
|
||||
if !ok {
|
||||
return fmt.Errorf("There is no cloud envionment matching the name '%s'!", c.CloudEnvironmentName)
|
||||
return fmt.Errorf("There is no cloud environment matching the name '%s'!", c.CloudEnvironmentName)
|
||||
}
|
||||
|
||||
env, err := azure.EnvironmentFromName(envName)
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ func TestConfigShouldRejectMalformedCaptureNamePrefix(t *testing.T) {
|
|||
wellFormedCaptureNamePrefix := []string{
|
||||
"packer",
|
||||
"AbcdefghijklmnopqrstuvwX",
|
||||
"hypen-hypen",
|
||||
"hyphen-hyphen",
|
||||
"0leading-number",
|
||||
"v1.core.local",
|
||||
}
|
||||
|
|
@ -514,8 +514,8 @@ func TestConfigShouldRejectMalformedCaptureNamePrefix(t *testing.T) {
|
|||
}
|
||||
|
||||
malformedCaptureNamePrefix := []string{
|
||||
"-leading-hypen",
|
||||
"trailing-hypen-",
|
||||
"-leading-hyphen",
|
||||
"trailing-hyphen-",
|
||||
"trailing-period.",
|
||||
"_leading-underscore",
|
||||
"punc-!@#$%^&*()_+-=-punc",
|
||||
|
|
@ -550,7 +550,7 @@ func TestConfigShouldRejectMalformedCaptureContainerName(t *testing.T) {
|
|||
wellFormedCaptureContainerName := []string{
|
||||
"0leading",
|
||||
"aleading",
|
||||
"hype-hypen",
|
||||
"hype-hyphen",
|
||||
"abcdefghijklmnopqrstuvwxyz0123456789-abcdefghijklmnopqrstuvwxyz", // 63 characters
|
||||
}
|
||||
|
||||
|
|
@ -565,9 +565,9 @@ func TestConfigShouldRejectMalformedCaptureContainerName(t *testing.T) {
|
|||
|
||||
malformedCaptureContainerName := []string{
|
||||
"No-Capitals",
|
||||
"double--hypens",
|
||||
"-leading-hypen",
|
||||
"trailing-hypen-",
|
||||
"double--hyphens",
|
||||
"-leading-hyphen",
|
||||
"trailing-hyphen-",
|
||||
"punc-!@#$%^&*()_+-=-punc",
|
||||
"there-are-over-63-characters-in-this-string-and-that-is-a-bad-container-name",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ func GetVirtualMachineDeployment(config *Config) (*resources.Deployment, error)
|
|||
}
|
||||
|
||||
if config.VirtualNetworkName != "" && DefaultPrivateVirtualNetworkWithPublicIp != config.PrivateVirtualNetworkWithPublicIp {
|
||||
builder.SetPrivateVirtualNetworWithPublicIp(
|
||||
builder.SetPrivateVirtualNetworkWithPublicIp(
|
||||
config.VirtualNetworkResourceGroupName,
|
||||
config.VirtualNetworkName,
|
||||
config.VirtualNetworkSubnetName)
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ func (s *TemplateBuilder) SetVirtualNetwork(virtualNetworkResourceGroup, virtual
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *TemplateBuilder) SetPrivateVirtualNetworWithPublicIp(virtualNetworkResourceGroup, virtualNetworkName, subnetName string) error {
|
||||
func (s *TemplateBuilder) SetPrivateVirtualNetworkWithPublicIp(virtualNetworkResourceGroup, virtualNetworkName, subnetName string) error {
|
||||
s.setVariable("virtualNetworkResourceGroup", virtualNetworkResourceGroup)
|
||||
s.setVariable("virtualNetworkName", virtualNetworkName)
|
||||
s.setVariable("subnetName", subnetName)
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const (
|
|||
)
|
||||
|
||||
// unmarshal calls asn1.Unmarshal, but also returns an error if there is any
|
||||
// trailing data after unmarshaling.
|
||||
// trailing data after unmarshalling.
|
||||
func unmarshal(in []byte, out interface{}) error {
|
||||
trailing, err := asn1.Unmarshal(in, out)
|
||||
if err != nil {
|
||||
|
|
@ -398,7 +398,7 @@ func Encode(derBytes []byte, privateKey interface{}, password string) (pfxBytes
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Marhsal []contentInfo so we can re-constitute the byte stream that will
|
||||
// Marshal []contentInfo so we can re-constitute the byte stream that will
|
||||
// be suitable for computing the MAC
|
||||
bytes, err := asn1.Marshal(contentInfos)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ func decodePkcs8ShroudedKeyBag(asn1Data, password []byte) (privateKey interface{
|
|||
|
||||
ret := new(asn1.RawValue)
|
||||
if err = unmarshal(pkData, ret); err != nil {
|
||||
return nil, errors.New("pkcs12: error unmarshaling decrypted private key: " + err.Error())
|
||||
return nil, errors.New("pkcs12: error unmarshalling decrypted private key: " + err.Error())
|
||||
}
|
||||
|
||||
if privateKey, err = x509.ParsePKCS8PrivateKey(pkData); err != nil {
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ func (s *stepSetupNetworking) Cleanup(state multistep.StateBag) {
|
|||
// Create a new parameter struct.
|
||||
p := client.Firewall.NewDeleteFirewallRuleParams(fwRuleID)
|
||||
|
||||
ui.Message("Deleting firewal rule...")
|
||||
ui.Message("Deleting firewall rule...")
|
||||
if _, err := client.Firewall.DeleteFirewallRule(p); err != nil {
|
||||
// This is a very poor way to be told the ID does no longer exist :(
|
||||
if !strings.Contains(err.Error(), fmt.Sprintf(
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ func (s *stepCreateInstance) generateUserData(userData string, httpGETOnly bool)
|
|||
if len(ud) > maxUD {
|
||||
return "", fmt.Errorf(
|
||||
"The supplied user_data contains %d bytes after encoding, "+
|
||||
"this exeeds the limit of %d bytes", len(ud), maxUD)
|
||||
"this exceeds the limit of %d bytes", len(ud), maxUD)
|
||||
}
|
||||
|
||||
return ud, nil
|
||||
|
|
|
|||
|
|
@ -198,12 +198,12 @@ func waitForImageState(
|
|||
}
|
||||
}()
|
||||
|
||||
log.Printf("Waiting for up to %d seconds for image transter to become %s", timeout/time.Second, desiredState)
|
||||
log.Printf("Waiting for up to %d seconds for image transfer to become %s", timeout/time.Second, desiredState)
|
||||
select {
|
||||
case err := <-result:
|
||||
return err
|
||||
case <-time.After(timeout):
|
||||
err := fmt.Errorf("Timeout while waiting to for image transter to become '%s'", desiredState)
|
||||
err := fmt.Errorf("Timeout while waiting to for image transfer to become '%s'", desiredState)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package file
|
|||
|
||||
/*
|
||||
The File builder creates an artifact from a file. Because it does not require
|
||||
any virutalization or network resources, it's very fast and useful for testing.
|
||||
any virtualization or network resources, it's very fast and useful for testing.
|
||||
*/
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ type InstanceConfig struct {
|
|||
Zone string
|
||||
}
|
||||
|
||||
// WindowsPasswordConfig is the data structue that GCE needs to encrypt the created
|
||||
// WindowsPasswordConfig is the data structure that GCE needs to encrypt the created
|
||||
// windows password.
|
||||
type WindowsPasswordConfig struct {
|
||||
key *rsa.PrivateKey
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ func processPrivateKeyFile(privateKeyFile, passphrase string) ([]byte, error) {
|
|||
PEMBlock, _ := pem.Decode(rawPrivateKeyBytes)
|
||||
if PEMBlock == nil {
|
||||
return nil, fmt.Errorf(
|
||||
"%s does not contain a vaild private key", privateKeyFile)
|
||||
"%s does not contain a valid private key", privateKeyFile)
|
||||
}
|
||||
|
||||
if x509.IsEncryptedPEMBlock(PEMBlock) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ func (s *StepCreateExternalSwitch) Run(_ context.Context, state multistep.StateB
|
|||
ui := state.Get("ui").(packer.Ui)
|
||||
|
||||
vmName := state.Get("vmName").(string)
|
||||
errorMsg := "Error createing external switch: %s"
|
||||
errorMsg := "Error creating external switch: %s"
|
||||
var err error
|
||||
|
||||
ui.Say("Creating external switch...")
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
type StepCreateTempDir struct {
|
||||
// The user-supplied root directores into which we create subdirectories.
|
||||
// The user-supplied root directories into which we create subdirectories.
|
||||
TempPath string
|
||||
VhdTempPath string
|
||||
// The subdirectories with the randomly generated name.
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ import (
|
|||
|
||||
const port string = "13000"
|
||||
|
||||
type StepPollingInstalation struct {
|
||||
type StepPollingInstallation struct {
|
||||
}
|
||||
|
||||
func (s *StepPollingInstalation) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
|
||||
func (s *StepPollingInstallation) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
|
||||
ui := state.Get("ui").(packer.Ui)
|
||||
|
||||
errorMsg := "Error polling VM: %s"
|
||||
|
|
@ -75,6 +75,6 @@ func (s *StepPollingInstalation) Run(_ context.Context, state multistep.StateBag
|
|||
return multistep.ActionContinue
|
||||
}
|
||||
|
||||
func (s *StepPollingInstalation) Cleanup(state multistep.StateBag) {
|
||||
func (s *StepPollingInstallation) Cleanup(state multistep.StateBag) {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
|||
}
|
||||
|
||||
if len(b.config.AdditionalDiskSize) > 64 {
|
||||
err = errors.New("VM's currently support a maximun of 64 additional SCSI attached disks.")
|
||||
err = errors.New("VM's currently support a maximum of 64 additional SCSI attached disks.")
|
||||
errs = packer.MultiErrorAppend(errs, err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ func (c *Communicator) UploadDir(dst string, src string, exclude []string) error
|
|||
|
||||
// Don't use 'z' flag as compressing may take longer and the transfer is likely local.
|
||||
// If this isn't the case, it is possible for the user to compress in another step then transfer.
|
||||
// It wouldn't be possibe to disable compression, without exposing this option.
|
||||
// It wouldn't be possible to disable compression, without exposing this option.
|
||||
tar, err := c.CmdWrapper(fmt.Sprintf("tar -cf - -C %s .", src))
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ func (s *stepLxdLaunch) Run(_ context.Context, state multistep.StateBag) multist
|
|||
return multistep.ActionHalt
|
||||
}
|
||||
// TODO: Should we check `lxc info <container>` for "Running"?
|
||||
// We have to do this so /tmp doens't get cleared and lose our provisioner scripts.
|
||||
// We have to do this so /tmp doesn't get cleared and lose our provisioner scripts.
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
return multistep.ActionContinue
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ func TestEmptyConfig(t *testing.T) {
|
|||
_, _, err := NewConfig(raw)
|
||||
|
||||
if err == nil {
|
||||
t.Error("Expected Config to require 'access_key', 'secret_key' and some mendatory fields, but it did not")
|
||||
t.Error("Expected Config to require 'access_key', 'secret_key' and some mandatory fields, but it did not")
|
||||
}
|
||||
|
||||
if !strings.Contains(err.Error(), "access_key is required") {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/olekukonko/tablewriter"
|
||||
)
|
||||
|
||||
//StepValidateTemplate : struct for Validation a tempalte
|
||||
//StepValidateTemplate : struct for Validation a template
|
||||
type StepValidateTemplate struct {
|
||||
Conn *ncloud.Conn
|
||||
Validate func() error
|
||||
|
|
@ -25,7 +25,7 @@ type StepValidateTemplate struct {
|
|||
FeeSystemTypeCode string
|
||||
}
|
||||
|
||||
// NewStepValidateTemplate : funciton for Validation a tempalte
|
||||
// NewStepValidateTemplate : function for Validation a template
|
||||
func NewStepValidateTemplate(conn *ncloud.Conn, ui packer.Ui, config *Config) *StepValidateTemplate {
|
||||
var step = &StepValidateTemplate{
|
||||
Conn: conn,
|
||||
|
|
@ -249,7 +249,7 @@ func (s *StepValidateTemplate) validateTemplate() error {
|
|||
return s.validateServerProductCode()
|
||||
}
|
||||
|
||||
// Run : main funciton for validation a template
|
||||
// Run : main function for validation a template
|
||||
func (s *StepValidateTemplate) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
|
||||
s.Say("Validating deployment template ...")
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ func TestBerToDer(t *testing.T) {
|
|||
Writer: msg,
|
||||
}
|
||||
|
||||
// Test - a DER encoded key commes back unchanged.
|
||||
// Test - a DER encoded key comes back unchanged.
|
||||
newKey := berToDer(der_encoded_key, ui)
|
||||
if newKey != der_encoded_key {
|
||||
t.Errorf("Trying to convert a DER encoded key should return the same key.")
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ type Config struct {
|
|||
SourceImageList string `mapstructure:"source_image_list"`
|
||||
SnapshotTimeout time.Duration `mapstructure:"snapshot_timeout"`
|
||||
DestImageList string `mapstructure:"dest_image_list"`
|
||||
// Attributes and Atributes file are both optional and mutually exclusive.
|
||||
// Attributes and Attributes file are both optional and mutually exclusive.
|
||||
Attributes string `mapstructure:"attributes"`
|
||||
AttributesFile string `mapstructure:"attributes_file"`
|
||||
// Optional; if you don't enter anything, the image list description
|
||||
|
|
@ -129,7 +129,7 @@ func NewConfig(raws ...interface{}) (*Config, error) {
|
|||
err = json.Unmarshal(fidata, &data)
|
||||
c.attribs = data
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Problem parsing json from attrinutes_file: %s", err)
|
||||
err = fmt.Errorf("Problem parsing json from attributes_file: %s", err)
|
||||
packer.MultiErrorAppend(errs, err)
|
||||
}
|
||||
c.attribs = data
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func (s *stepSecurity) Run(_ context.Context, state multistep.StateBag) multiste
|
|||
application = "/oracle/public/ssh"
|
||||
} else if commType == "WINRM" {
|
||||
// Check to see whether a winRM security protocol is already defined;
|
||||
// don't need to do this for SSH becasue it is built into the Oracle API.
|
||||
// don't need to do this for SSH because it is built into the Oracle API.
|
||||
protocolClient := client.SecurityProtocols()
|
||||
winrmProtocol := fmt.Sprintf("WINRM_%s", runUUID)
|
||||
input := compute.CreateSecurityProtocolInput{
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ func (c *baseClient) Request() (*http.Request, error) {
|
|||
return req, nil
|
||||
}
|
||||
|
||||
// Recieve creates a http request from the client and executes it returning the
|
||||
// Receive creates a http request from the client and executes it returning the
|
||||
// response.
|
||||
func (c *baseClient) Receive(successV, failureV interface{}) (*http.Response, error) {
|
||||
req, err := c.Request()
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ func TestParseEncryptedPrivateKeyValidPassword(t *testing.T) {
|
|||
password,
|
||||
cipherType)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error encryting PEM block: %+v", err)
|
||||
t.Fatalf("Unexpected error encrypting PEM block: %+v", err)
|
||||
}
|
||||
|
||||
// Parse private key
|
||||
|
|
@ -195,7 +195,7 @@ func TestParseEncryptedPrivateKeyPKCS8(t *testing.T) {
|
|||
password,
|
||||
cipherType)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error encryting PEM block: %+v", err)
|
||||
t.Fatalf("Unexpected error encrypting PEM block: %+v", err)
|
||||
}
|
||||
|
||||
// Parse private key
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ type Image struct {
|
|||
TimeCreated time.Time `json:"timeCreated"`
|
||||
}
|
||||
|
||||
// GetImageParams are the paramaters available when communicating with the
|
||||
// GetImageParams are the parameters available when communicating with the
|
||||
// GetImage API endpoint.
|
||||
type GetImageParams struct {
|
||||
ID string `url:"imageId"`
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ type Instance struct {
|
|||
TimeCreated time.Time `json:"timeCreated"`
|
||||
}
|
||||
|
||||
// GetInstanceParams are the paramaters available when communicating with the
|
||||
// GetInstanceParams are the parameters available when communicating with the
|
||||
// GetInstance API endpoint.
|
||||
type GetInstanceParams struct {
|
||||
ID string `url:"instanceId,omitempty"`
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ func TestKnownGoodRequests(t *testing.T) {
|
|||
|
||||
for header, val := range tt.expectedHeaders {
|
||||
if sentReq.Header.Get(header) != val {
|
||||
t.Fatalf("%s: Header mismatch in responnse,\n\t expecting \"%s\"\n\t got \"%s\"", tt.name, val, sentReq.Header.Get(header))
|
||||
t.Fatalf("%s: Header mismatch in response,\n\t expecting \"%s\"\n\t got \"%s\"", tt.name, val, sentReq.Header.Get(header))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ type VNIC struct {
|
|||
TimeCreated time.Time `json:"timeCreated"`
|
||||
}
|
||||
|
||||
// GetVNICParams are the paramaters available when communicating with the
|
||||
// GetVNICParams are the parameters available when communicating with the
|
||||
// ListVNICs API endpoint.
|
||||
type GetVNICParams struct {
|
||||
ID string `url:"vnicId"`
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ type VNICAttachment struct {
|
|||
VNICID string `json:"vnicId"`
|
||||
}
|
||||
|
||||
// ListVnicAttachmentsParams are the paramaters available when communicating
|
||||
// ListVnicAttachmentsParams are the parameters available when communicating
|
||||
// with the ListVnicAttachments API endpoint.
|
||||
type ListVnicAttachmentsParams struct {
|
||||
AvailabilityDomain string `url:"availabilityDomain,omitempty"`
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ type Driver interface {
|
|||
// Send scancodes to the vm using the prltype python script.
|
||||
SendKeyScanCodes(string, ...string) error
|
||||
|
||||
// Apply default сonfiguration settings to the virtual machine
|
||||
// Apply default configuration settings to the virtual machine
|
||||
SetDefaultConfiguration(string) error
|
||||
|
||||
// Finds the MAC address of the NIC nic0
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ func (d *Parallels9Driver) Import(name, srcPath, dstDir string, reassignMAC bool
|
|||
|
||||
srcMAC := "auto"
|
||||
if !reassignMAC {
|
||||
srcMAC, err = getFirtsMACAddress(srcPath)
|
||||
srcMAC, err = getFirstMACAddress(srcPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ func getVMID(path string) (string, error) {
|
|||
return getConfigValueFromXpath(path, "/ParallelsVirtualMachine/Identification/VmUuid")
|
||||
}
|
||||
|
||||
func getFirtsMACAddress(path string) (string, error) {
|
||||
func getFirstMACAddress(path string) (string, error) {
|
||||
return getConfigValueFromXpath(path, "/ParallelsVirtualMachine/Hardware/NetworkAdapter[@id='0']/MAC")
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ func getAppPath(bundleID string) (string, error) {
|
|||
return pathOutput, nil
|
||||
}
|
||||
|
||||
// CompactDisk performs the compation of the specified virtual disk image.
|
||||
// CompactDisk performs the compaction of the specified virtual disk image.
|
||||
func (d *Parallels9Driver) CompactDisk(diskPath string) error {
|
||||
prlDiskToolPath, err := exec.LookPath("prl_disk_tool")
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ func TestBuilderPrepare_FloppyFiles(t *testing.T) {
|
|||
func TestBuilderPrepare_InvalidFloppies(t *testing.T) {
|
||||
var b Builder
|
||||
config := testConfig()
|
||||
config["floppy_files"] = []string{"nonexistant.bat", "nonexistant.ps1"}
|
||||
config["floppy_files"] = []string{"nonexistent.bat", "nonexistent.ps1"}
|
||||
b = Builder{}
|
||||
_, errs := b.Prepare(config)
|
||||
if errs == nil {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ func TestNewConfig_FloppyFiles(t *testing.T) {
|
|||
|
||||
func TestNewConfig_InvalidFloppies(t *testing.T) {
|
||||
c := testConfig(t)
|
||||
c["floppy_files"] = []string{"nonexistant.bat", "nonexistant.ps1"}
|
||||
c["floppy_files"] = []string{"nonexistent.bat", "nonexistent.ps1"}
|
||||
_, _, errs := NewConfig(c)
|
||||
if errs == nil {
|
||||
t.Fatalf("Nonexistent floppies should trigger multierror")
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
type ExportConfig struct {
|
||||
Format string `mapstruture:"format"`
|
||||
Format string `mapstructure:"format"`
|
||||
}
|
||||
|
||||
func (c *ExportConfig) Prepare(ctx *interpolate.Context) []error {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ func TestExportConfigPrepare_BootWait(t *testing.T) {
|
|||
|
||||
// Bad
|
||||
c = new(ExportConfig)
|
||||
c.Format = "illega"
|
||||
c.Format = "illegal"
|
||||
errs = c.Prepare(testConfigTemplate(t))
|
||||
if len(errs) == 0 {
|
||||
t.Fatalf("bad: %#v", errs)
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ func TestNewConfig_sourcePath(t *testing.T) {
|
|||
t.Fatalf("bad: %#v", warns)
|
||||
}
|
||||
if err == nil {
|
||||
t.Fatalf("Nonexistant file should throw a validation error!")
|
||||
t.Fatalf("Nonexistent file should throw a validation error!")
|
||||
}
|
||||
|
||||
// Bad
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func TestLocalOuputDir_impl(t *testing.T) {
|
||||
func TestLocalOutputDir_impl(t *testing.T) {
|
||||
var _ OutputDir = new(LocalOutputDir)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ func EncodeVMX(contents map[string]string) string {
|
|||
}
|
||||
|
||||
// a list of VMX key fragments that the value must not be quoted
|
||||
// fragments are used to cover multliples (i.e. multiple disks)
|
||||
// fragments are used to cover multiples (i.e. multiple disks)
|
||||
// keys are still lowercase at this point, use lower fragments
|
||||
noQuotes := []string{
|
||||
".virtualssd",
|
||||
}
|
||||
|
||||
// a list of VMX key fragments that are case sensitive
|
||||
// fragments are used to cover multliples (i.e. multiple disks)
|
||||
// fragments are used to cover multiples (i.e. multiple disks)
|
||||
caseSensitive := []string{
|
||||
".virtualSSD",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist
|
|||
templateData.SCSI_Present = "TRUE"
|
||||
templateData.CDROMType = "scsi"
|
||||
default:
|
||||
err := fmt.Errorf("Error procesing VMX template: %s", cdromAdapterType)
|
||||
err := fmt.Errorf("Error processing VMX template: %s", cdromAdapterType)
|
||||
state.Put("error", err)
|
||||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
|
|
@ -505,7 +505,7 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist
|
|||
} else {
|
||||
serial, err := unformat_serial(config.Serial)
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error procesing VMX template: %s", err)
|
||||
err := fmt.Errorf("Error processing VMX template: %s", err)
|
||||
state.Put("error", err)
|
||||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
|
|
@ -541,7 +541,7 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist
|
|||
break
|
||||
|
||||
default:
|
||||
err := fmt.Errorf("Error procesing VMX template: %v", serial)
|
||||
err := fmt.Errorf("Error processing VMX template: %v", serial)
|
||||
state.Put("error", err)
|
||||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
|
|
@ -554,7 +554,7 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist
|
|||
} else {
|
||||
parallel, err := unformat_parallel(config.Parallel)
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error procesing VMX template: %s", err)
|
||||
err := fmt.Errorf("Error processing VMX template: %s", err)
|
||||
state.Put("error", err)
|
||||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
|
|
@ -578,7 +578,7 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist
|
|||
break
|
||||
|
||||
default:
|
||||
err := fmt.Errorf("Error procesing VMX template: %v", parallel)
|
||||
err := fmt.Errorf("Error processing VMX template: %v", parallel)
|
||||
state.Put("error", err)
|
||||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
|
|
@ -590,7 +590,7 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist
|
|||
/// render the .vmx template
|
||||
vmxContents, err := interpolate.Render(vmxTemplate, &ctx)
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error procesing VMX template: %s", err)
|
||||
err := fmt.Errorf("Error processing VMX template: %s", err)
|
||||
state.Put("error", err)
|
||||
ui.Error(err.Error())
|
||||
return multistep.ActionHalt
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ func (c *FixCommand) Run(args []string) int {
|
|||
c.Ui.Say(result)
|
||||
|
||||
if flagValidate {
|
||||
// Attemot to parse and validate the template
|
||||
// Attempt to parse and validate the template
|
||||
tpl, err := template.Parse(strings.NewReader(result))
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf(
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ func (s *StepDownload) Run(_ context.Context, state multistep.StateBag) multiste
|
|||
ui.Say(fmt.Sprintf("Downloading or copying %s", s.Description))
|
||||
|
||||
// First try to use any already downloaded file
|
||||
// If it fails, proceed to regualar download logic
|
||||
// If it fails, proceed to regular download logic
|
||||
|
||||
var downloadConfigs = make([]*DownloadConfig, len(s.Url))
|
||||
var finalPath string
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ func (c *comm) scpUploadSession(path string, input io.Reader, fi *os.FileInfo) e
|
|||
target_file = filepath.Base((*fi).Name())
|
||||
}
|
||||
|
||||
// On windows, filepath.Dir uses backslash seperators (ie. "\tmp").
|
||||
// On windows, filepath.Dir uses backslash separators (ie. "\tmp").
|
||||
// This does not work when the target host is unix. Switch to forward slash
|
||||
// which works for unix and windows
|
||||
target_dir = filepath.ToSlash(target_dir)
|
||||
|
|
@ -748,7 +748,7 @@ func (c *comm) scpSession(scpCommand string, f func(io.Writer, *bufio.Reader) er
|
|||
err = session.Wait()
|
||||
if err != nil {
|
||||
if exitErr, ok := err.(*ssh.ExitError); ok {
|
||||
// Otherwise, we have an ExitErorr, meaning we can just read
|
||||
// Otherwise, we have an ExitError, meaning we can just read
|
||||
// the exit status
|
||||
log.Printf("non-zero exit status: %d", exitErr.ExitStatus())
|
||||
stdoutB, err := ioutil.ReadAll(stdoutR)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ func TestPasswordKeyboardInteractive_Impl(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestPasswordKeybardInteractive_Challenge(t *testing.T) {
|
||||
func TestPasswordKeyboardInteractive_Challenge(t *testing.T) {
|
||||
p := PasswordKeyboardInteractive("foo")
|
||||
result, err := p("foo", "bar", []string{"one", "two"}, nil)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ createServicePrincipal() {
|
|||
createPermissions() {
|
||||
echo "==> Creating permissions"
|
||||
az role assignment create --assignee $azure_object_id --role "Owner" --scope /subscriptions/$azure_subscription_id
|
||||
# If the user wants to use a more conserative scope, she can. She must
|
||||
# If the user wants to use a more conservative scope, she can. She must
|
||||
# configure the Azure builder to use build_resource_group_name. The
|
||||
# easiest solution is subscription wide permission.
|
||||
# az role assignment create --spn http://$meta_name -g $azure_group_name -o "API Management Service Contributor"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
#if the related deb pkg not found, please replace with it other avaiable repository url
|
||||
#if the related deb pkg not found, please replace with it other available repository url
|
||||
HOSTNAME=`ifconfig eth1|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
|
||||
if [ not $HOSTNAME ] ; then
|
||||
HOSTNAME=`ifconfig eth0|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ mv $TOMCAT_NAME /opt
|
|||
wget $JENKINS_URL
|
||||
mv jenkins.war $TOMCAT_PATH/webapps/
|
||||
|
||||
#set emvironment
|
||||
#set environment
|
||||
echo "TOMCAT_PATH=\"$TOMCAT_PATH\"">>/etc/profile
|
||||
echo "JENKINS_HOME=\"$TOMCAT_PATH/webapps/jenkins\"">>/etc/profile
|
||||
echo PATH="\"\$PATH:\$TOMCAT_PATH:\$JENKINS_HOME\"">>/etc/profile
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/mitchellh/mapstructure"
|
||||
)
|
||||
|
||||
// FixerVagrantPPOvveride is a Fixer that replaces the provider-specific
|
||||
// FixerVagrantPPOverride is a Fixer that replaces the provider-specific
|
||||
// overrides for the Vagrant post-processor with the new style introduced
|
||||
// as part of Packer 0.5.0.
|
||||
type FixerVagrantPPOverride struct{}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"sync"
|
||||
)
|
||||
|
||||
// DebugLocation is the location where the pause is occuring when debugging
|
||||
// DebugLocation is the location where the pause is occurring when debugging
|
||||
// a step sequence. "DebugLocationAfterRun" is after the run of the named
|
||||
// step. "DebugLocationBeforeCleanup" is before the cleanup of the named
|
||||
// step.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package multistep
|
|||
|
||||
import "context"
|
||||
|
||||
// A step for testing that accumuluates data into a string slice in the
|
||||
// A step for testing that accumulates data into a string slice in the
|
||||
// the state bag. It always uses the "data" key in the state bag, and will
|
||||
// initialize it.
|
||||
type TestStepAcc struct {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ func TestBuild_Prepare_Twice(t *testing.T) {
|
|||
build.Prepare()
|
||||
}
|
||||
|
||||
func TestBuildPrepare_BuilderWarniings(t *testing.T) {
|
||||
func TestBuildPrepare_BuilderWarnings(t *testing.T) {
|
||||
expected := []string{"foo"}
|
||||
|
||||
build := testBuild()
|
||||
|
|
@ -191,7 +191,7 @@ func TestBuild_Run(t *testing.T) {
|
|||
t.Fatal("should be called")
|
||||
}
|
||||
|
||||
// Verify hooks are disapatchable
|
||||
// Verify hooks are dispatchable
|
||||
dispatchHook := builder.RunHook
|
||||
dispatchHook.Run("foo", nil, nil, 42)
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ func NewCore(c *CoreConfig) (*Core, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Go through and interpolate all the build names. We shuld be able
|
||||
// Go through and interpolate all the build names. We should be able
|
||||
// to do this at this point with the variables.
|
||||
result.builds = make(map[string]*template.Builder)
|
||||
for _, b := range c.Template.Builders {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ func (h *ProvisionHook) Run(name string, ui Ui, comm Communicator, data interfac
|
|||
return nil
|
||||
}
|
||||
|
||||
// Cancels the privisioners that are still running.
|
||||
// Cancels the provisioners that are still running.
|
||||
func (h *ProvisionHook) Cancel() {
|
||||
h.lock.Lock()
|
||||
defer h.lock.Unlock()
|
||||
|
|
|
|||
|
|
@ -99,34 +99,34 @@ func TestColoredUi_noColorEnv(t *testing.T) {
|
|||
|
||||
func TestTargetedUI(t *testing.T) {
|
||||
bufferUi := testUi()
|
||||
targettedUi := &TargetedUI{
|
||||
targetedUi := &TargetedUI{
|
||||
Target: "foo",
|
||||
Ui: bufferUi,
|
||||
}
|
||||
|
||||
var actual, expected string
|
||||
targettedUi.Say("foo")
|
||||
targetedUi.Say("foo")
|
||||
actual = readWriter(bufferUi)
|
||||
expected = "==> foo: foo\n"
|
||||
if actual != expected {
|
||||
t.Fatalf("bad: %#v", actual)
|
||||
}
|
||||
|
||||
targettedUi.Message("foo")
|
||||
targetedUi.Message("foo")
|
||||
actual = readWriter(bufferUi)
|
||||
expected = " foo: foo\n"
|
||||
if actual != expected {
|
||||
t.Fatalf("bad: %#v", actual)
|
||||
}
|
||||
|
||||
targettedUi.Error("bar")
|
||||
targetedUi.Error("bar")
|
||||
actual = readErrorWriter(bufferUi)
|
||||
expected = "==> foo: bar\n"
|
||||
if actual != expected {
|
||||
t.Fatalf("bad: %#v", actual)
|
||||
}
|
||||
|
||||
targettedUi.Say("foo\nbar")
|
||||
targetedUi.Say("foo\nbar")
|
||||
actual = readWriter(bufferUi)
|
||||
expected = "==> foo: foo\n==> foo: bar\n"
|
||||
if actual != expected {
|
||||
|
|
@ -215,7 +215,7 @@ func TestBasicUi_Ask(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
// Because of the internal bufio we can't eaily reset the input, so create a new one each time
|
||||
// Because of the internal bufio we can't easily reset the input, so create a new one each time
|
||||
bufferUi := testUi()
|
||||
writeReader(bufferUi, testCase.Input)
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ type Config struct {
|
|||
Architecture string `mapstructure:"image_architecture"`
|
||||
Size string `mapstructure:"image_system_size"`
|
||||
Format string `mapstructure:"format"`
|
||||
AlicloudImageForceDetele bool `mapstructure:"image_force_delete"`
|
||||
AlicloudImageForceDelete bool `mapstructure:"image_force_delete"`
|
||||
|
||||
ctx interpolate.Context
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
getEndPonit(p.config.OSSBucket), p.config.OSSKey, err)
|
||||
}
|
||||
|
||||
if len(images) > 0 && !p.config.AlicloudImageForceDetele {
|
||||
if len(images) > 0 && !p.config.AlicloudImageForceDelete {
|
||||
return nil, false, fmt.Errorf("Duplicated image exists, please delete the existing images " +
|
||||
"or set the 'image_force_delete' value as true")
|
||||
}
|
||||
|
|
@ -185,7 +185,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
if err != nil {
|
||||
return nil, false, fmt.Errorf("Failed to upload image %s: %s", source, err)
|
||||
}
|
||||
if len(images) > 0 && p.config.AlicloudImageForceDetele {
|
||||
if len(images) > 0 && p.config.AlicloudImageForceDelete {
|
||||
if err = ecsClient.DeleteImage(packercommon.Region(p.config.AlicloudRegion),
|
||||
images[0].ImageId); err != nil {
|
||||
return nil, false, fmt.Errorf("Delete duplicated image %s failed", images[0].ImageName)
|
||||
|
|
@ -214,7 +214,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
|
||||
if err != nil {
|
||||
e, _ := err.(*packercommon.Error)
|
||||
if e.Code == "NoSetRoletoECSServiceAcount" {
|
||||
if e.Code == "NoSetRoletoECSServiceAccount" {
|
||||
ramClient := ram.NewClient(p.config.AlicloudAccessKey, p.config.AlicloudSecretKey)
|
||||
roleResponse, err := ramClient.GetRole(ram.RoleQueryRequest{
|
||||
RoleName: "AliyunECSImageImportDefaultRole",
|
||||
|
|
@ -282,7 +282,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|||
imageId, err = ecsClient.ImportImage(imageImageArgs)
|
||||
if err != nil {
|
||||
e, _ = err.(*packercommon.Error)
|
||||
if e.Code == "NoSetRoletoECSServiceAcount" {
|
||||
if e.Code == "NoSetRoletoECSServiceAccount" {
|
||||
time.Sleep(5 * time.Second)
|
||||
continue
|
||||
} else if e.Code == "ImageIsImporting" ||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func TestChecksumSHA1(t *testing.T) {
|
|||
t.Errorf("Unable to read checksum file: %s", err)
|
||||
}
|
||||
if buf, _ := ioutil.ReadAll(f); !bytes.Equal(buf, []byte("d3486ae9136e7856bc42212385ea797094475802\tpackage.txt\n")) {
|
||||
t.Errorf("Failed to compate checksum: %s\n%s", buf, "d3486ae9136e7856bc42212385ea797094475802 package.txt")
|
||||
t.Errorf("Failed to compute checksum: %s\n%s", buf, "d3486ae9136e7856bc42212385ea797094475802 package.txt")
|
||||
}
|
||||
|
||||
defer f.Close()
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ func providerForName(name string) Provider {
|
|||
}
|
||||
}
|
||||
|
||||
// OutputPathTemplate is the structure that is availalable within the
|
||||
// OutputPathTemplate is the structure that is available within the
|
||||
// OutputPath variables.
|
||||
type outputPathTemplate struct {
|
||||
ArtifactId string
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ func (p *Provisioner) retryable(f func() error) error {
|
|||
}
|
||||
}
|
||||
|
||||
// Enviroment variables required within the remote environment are uploaded within a PS script and
|
||||
// Environment variables required within the remote environment are uploaded within a PS script and
|
||||
// then enabled by 'dot sourcing' the script immediately prior to execution of the main command
|
||||
func (p *Provisioner) prepareEnvVars(elevated bool) (envVarPath string, err error) {
|
||||
// Collate all required env vars into a plain string with required formatting applied
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ func TestRetryable(t *testing.T) {
|
|||
err := p.Prepare(config)
|
||||
err = p.retryable(retryMe)
|
||||
if err != nil {
|
||||
t.Fatalf("should not have error retrying funuction")
|
||||
t.Fatalf("should not have error retrying function")
|
||||
}
|
||||
|
||||
count = 0
|
||||
|
|
@ -702,7 +702,7 @@ func TestRetryable(t *testing.T) {
|
|||
err = p.Prepare(config)
|
||||
err = p.retryable(retryMe)
|
||||
if err == nil {
|
||||
t.Fatalf("should have error retrying funuction")
|
||||
t.Fatalf("should have error retrying function")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func TestProvisionerPrepare_InvalidKey(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestProvisionerPrepare_CustomeState(t *testing.T) {
|
||||
func TestProvisionerPrepare_CustomState(t *testing.T) {
|
||||
var p Provisioner
|
||||
config := testConfig()
|
||||
|
||||
|
|
|
|||
|
|
@ -203,11 +203,11 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
defer f.Close()
|
||||
|
||||
// Create environment variables to set before executing the command
|
||||
flattendVars := p.createFlattenedEnvVars()
|
||||
flattenedVars := p.createFlattenedEnvVars()
|
||||
|
||||
// Compile the command
|
||||
p.config.ctx.Data = &ExecuteCommandTemplate{
|
||||
Vars: flattendVars,
|
||||
Vars: flattenedVars,
|
||||
Path: p.config.RemotePath,
|
||||
}
|
||||
command, err := interpolate.Render(p.config.ExecuteCommand, &p.config.ctx)
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ func TestRetryable(t *testing.T) {
|
|||
err := p.Prepare(config)
|
||||
err = p.retryable(retryMe)
|
||||
if err != nil {
|
||||
t.Fatalf("should not have error retrying funuction")
|
||||
t.Fatalf("should not have error retrying function")
|
||||
}
|
||||
|
||||
count = 0
|
||||
|
|
@ -442,7 +442,7 @@ func TestRetryable(t *testing.T) {
|
|||
err = p.Prepare(config)
|
||||
err = p.retryable(retryMe)
|
||||
if err == nil {
|
||||
t.Fatalf("should have error retrying funuction")
|
||||
t.Fatalf("should have error retrying function")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ builder.
|
|||
`_` or `-`. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `security_token` (string) - STS access token, can be set through template or by exporting
|
||||
as environment vairalbe such "export SecurityToken=value".
|
||||
as environment variable such "export SecurityToken=value".
|
||||
|
||||
- `skip_region_validation` (boolean) - The region validation can be skipped if this
|
||||
value is true, the default value is false.
|
||||
|
|
|
|||
|
|
@ -357,14 +357,14 @@ shown below:
|
|||
|
||||
This builder allows you to build Docker images *without* Dockerfiles.
|
||||
|
||||
With this builder, you can repeatably create Docker images without the use of a
|
||||
With this builder, you can repeatedly create Docker images without the use of a
|
||||
Dockerfile. You don't need to know the syntax or semantics of Dockerfiles.
|
||||
Instead, you can just provide shell scripts, Chef recipes, Puppet manifests,
|
||||
etc. to provision your Docker container just like you would a regular
|
||||
virtualized or dedicated machine.
|
||||
|
||||
While Docker has many features, Packer views Docker simply as an container
|
||||
runner. To that end, Packer is able to repeatably build these containers
|
||||
runner. To that end, Packer is able to repeatedly build these containers
|
||||
using portable provisioning scripts.
|
||||
|
||||
## Overriding the host directory
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ builder.
|
|||
If preemptible is true this can only be `TERMINATE`. If preemptible
|
||||
is false, it defaults to `MIGRATE`
|
||||
|
||||
- `preemptible` (boolean) - If true, launch a preembtible instance.
|
||||
- `preemptible` (boolean) - If true, launch a preemptible instance.
|
||||
|
||||
- `region` (string) - The region in which to launch the instance. Defaults to
|
||||
to the region hosting the specified `zone`.
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ can be configured for this builder.
|
|||
source is a vhd/vhdx. This defaults to false.
|
||||
|
||||
- `skip_export` (boolean) - If true skips VM export. If you are interested only in the vhd/vhdx files, you can enable this option. This will create
|
||||
inline disks which improves the build performance. There will not be any copying of source vhds to temp directory. This defauls to false.
|
||||
inline disks which improves the build performance. There will not be any copying of source vhds to temp directory. This defaults to false.
|
||||
|
||||
- `enable_dynamic_memory` (boolean) - If true enable dynamic memory for virtual machine.
|
||||
This defaults to false.
|
||||
|
|
@ -221,7 +221,7 @@ can be configured for this builder.
|
|||
|
||||
- `mac_address` (string) - This allows a specific MAC address to be used on the
|
||||
default virtual network card. The MAC address must be a string with no
|
||||
delimeters, for example "0000deadbeef".
|
||||
delimiters, for example "0000deadbeef".
|
||||
|
||||
- `vm_name` (string) - This is the name of the virtual machine for the new virtual
|
||||
machine, without the file extension. By default this is "packer-BUILDNAME",
|
||||
|
|
@ -656,7 +656,7 @@ Finish Setup cache proxy during installation -->
|
|||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}</CommandLine>
|
||||
<Description>Win RM MaxTimoutms</Description>
|
||||
<Description>Win RM MaxTimeoutms</Description>
|
||||
<Order>5</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ can be configured for this builder.
|
|||
|
||||
- `mac_address` (string) - This allows a specific MAC address to be used on the
|
||||
default virtual network card. The MAC address must be a string with no
|
||||
delimeters, for example "0000deadbeef".
|
||||
delimiters, for example "0000deadbeef".
|
||||
|
||||
- `vm_name` (string) - This is the name of the virtual machine for the new
|
||||
virtual machine, without the file extension. By default this is
|
||||
|
|
@ -651,7 +651,7 @@ Finish Setup cache proxy during installation -->
|
|||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}</CommandLine>
|
||||
<Description>Win RM MaxTimoutms</Description>
|
||||
<Description>Win RM MaxTimeoutms</Description>
|
||||
<Order>5</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ builder.
|
|||
cluster will be used. This may be required for some OpenStack clusters.
|
||||
|
||||
- `cacert` (string) - Custom CA certificate file path.
|
||||
If ommited the OS\_CACERT environment variable can be used.
|
||||
If omitted the OS\_CACERT environment variable can be used.
|
||||
|
||||
- `config_drive` (boolean) - Whether or not nova should use ConfigDrive for
|
||||
cloud-init metadata.
|
||||
|
|
@ -113,7 +113,7 @@ builder.
|
|||
done over an insecure connection. By default this is false.
|
||||
|
||||
- `key` (string) - Client private key file path for SSL client authentication.
|
||||
If ommited the OS\_KEY environment variable can be used.
|
||||
If omitted the OS\_KEY environment variable can be used.
|
||||
|
||||
- `metadata` (object of key/value strings) - Glance metadata that will be
|
||||
applied to the image.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ This builder currently only works with the SSH communicator.
|
|||
|
||||
- `ssh_username` (string) - The username that Packer will use to SSH into the
|
||||
instance; defaults to `opc`, the default oracle user, which has sudo
|
||||
priveliges. If you have already configured users on your machine, you may
|
||||
privileges. If you have already configured users on your machine, you may
|
||||
prompt Packer to use one of those instead. For more detail, see the
|
||||
[documentation](https://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stcsg/accessing-oracle-linux-instance-using-ssh.html).
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ builder.
|
|||
|
||||
- `image` (string) - ProfitBricks volume image. Only Linux public images are supported. To obtain full list of available images you can use [ProfitBricks CLI](https://github.com/profitbricks/profitbricks-cli#image).
|
||||
|
||||
- `password` (string) - ProfitBricks password. This can be specified via environment variable \`PROFITBRICKS\_PASSWORD', if provided. The value definded in the config has precedence over environemnt variable.
|
||||
- `password` (string) - ProfitBricks password. This can be specified via environment variable \`PROFITBRICKS\_PASSWORD', if provided. The value defined in the config has precedence over environemnt variable.
|
||||
|
||||
- `username` (string) - ProfitBricks username. This can be specified via environment variable \`PROFITBRICKS\_USERNAME', if provided. The value definded in the config has precedence over environemnt variable.
|
||||
- `username` (string) - ProfitBricks username. This can be specified via environment variable \`PROFITBRICKS\_USERNAME', if provided. The value defined in the config has precedence over environemnt variable.
|
||||
|
||||
### Optional
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ ephemeral key will be deleted at the end of the packer run during cleanup.
|
|||
For a local builder, the SSH session initiated will be visible in the detail
|
||||
provided when `PACKER_LOG=1` environment variable is set prior to a build,
|
||||
and you can connect to the local machine using the userid and password defined
|
||||
in the kickstart or preseed associated with initialzing the local VM.
|
||||
in the kickstart or preseed associated with initializing the local VM.
|
||||
|
||||
### Windows
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ An example manifest file looks like:
|
|||
|
||||
If the build is run again, the new build artifacts will be added to the manifest file rather than replacing it. It is possible to grab specific build artifacts from the manifest by using `packer_run_uuid`.
|
||||
|
||||
The above mainfest was generated with this packer.json:
|
||||
The above manifest was generated with this packer.json:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Optional parameters:
|
|||
various
|
||||
[configuration template variables](/docs/templates/engine.html) available.
|
||||
|
||||
- `prevent_sudo` (boolean) - stop Converge from running with adminstrator
|
||||
- `prevent_sudo` (boolean) - stop Converge from running with administrator
|
||||
privileges via sudo
|
||||
|
||||
- `bootstrap_command` (string) - the command used to bootstrap Converge. This
|
||||
|
|
|
|||
2
website/source/docs/templates/engine.html.md
vendored
2
website/source/docs/templates/engine.html.md
vendored
|
|
@ -67,7 +67,7 @@ Here is a full list of the available functions for reference.
|
|||
|
||||
This engine does not guarantee that the final image name will match the
|
||||
regex; it will not truncate your name if it exceeds 63 characters, and it
|
||||
will not valiate that the beginning and end of the engine's output are
|
||||
will not validate that the beginning and end of the engine's output are
|
||||
valid. For example,
|
||||
`"image_name": {{isotime | clean_image_name}}"` will cause your build to
|
||||
fail because the image name will start with a number, which is why in the
|
||||
|
|
|
|||
Loading…
Reference in a new issue