Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
3a3a81b01c
|
@ -8,8 +8,12 @@ import (
|
|||
|
||||
"code.google.com/p/google-api-go-client/compute/v1"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/google"
|
||||
|
||||
// oauth2 "github.com/rasa/oauth2-fork-b3f9a68"
|
||||
"github.com/rasa/oauth2-fork-b3f9a68"
|
||||
|
||||
// oauth2 "github.com/rasa/oauth2-fork-b3f9a68/google"
|
||||
"github.com/rasa/oauth2-fork-b3f9a68/google"
|
||||
)
|
||||
|
||||
// driverGCE is a Driver implementation that actually talks to GCE.
|
||||
|
|
|
@ -114,7 +114,14 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
ui.Say("Provisioning with Salt...")
|
||||
if !p.config.SkipBootstrap {
|
||||
cmd := &packer.RemoteCmd{
|
||||
Command: fmt.Sprintf("wget -O - https://bootstrap.saltstack.com | sudo sh -s %s", p.config.BootstrapArgs),
|
||||
Command: fmt.Sprintf("curl -L https://bootstrap.saltstack.com -o /tmp/install_salt.sh"),
|
||||
}
|
||||
ui.Message(fmt.Sprintf("Downloading saltstack bootstrap to /tmp/install_salt.sh"))
|
||||
if err = cmd.StartWithUi(comm, ui); err != nil {
|
||||
return fmt.Errorf("Unable to download Salt: %d", err)
|
||||
}
|
||||
cmd = &packer.RemoteCmd{
|
||||
Command: fmt.Sprintf("sudo sh /tmp/install_salt.sh %s", p.config.BootstrapArgs),
|
||||
}
|
||||
ui.Message(fmt.Sprintf("Installing Salt with command %s", cmd))
|
||||
if err = cmd.StartWithUi(comm, ui); err != nil {
|
||||
|
|
|
@ -118,11 +118,11 @@ each category, the available configuration keys are alphabetized.
|
|||
described above. Note that if this is specified, you must omit the
|
||||
`security_group_id`.
|
||||
|
||||
* `spot_price` (string) - The maximum hourly price to launch a spot instance
|
||||
to create the AMI. It is a type of instances that EC2 starts when the maximum
|
||||
price that you specify exceeds the current spot price. Spot price will be
|
||||
updated based on available spot instance capacity and current spot Instance
|
||||
requests. It may save you some costs. You can set this to "auto" for
|
||||
* `spot_price` (string) - The maximum hourly price to pay for a spot instance
|
||||
to create the AMI. Spot instances are a type of instance that EC2 starts when
|
||||
the current spot price is less than the maximum price you specify. Spot price
|
||||
will be updated based on available spot instance capacity and current spot
|
||||
instance requests. It may save you some costs. You can set this to "auto" for
|
||||
Packer to automatically discover the best spot price.
|
||||
|
||||
* `spot_price_auto_product` (string) - Required if `spot_price` is set to
|
||||
|
|
|
@ -111,17 +111,22 @@ each category, the available options are alphabetized and described.
|
|||
five seconds and one minute 30 seconds, respectively. If this isn't specified,
|
||||
the default is 10 seconds.
|
||||
|
||||
* `disk_size` (integer) - The size, in megabytes, of the hard disk to create
|
||||
for the VM. By default, this is 40000 (about 40 GB).
|
||||
* `disk_cache` (string) - The cache mode to use for disk. Allowed values
|
||||
values include any of "writethrough", "writeback", "none", "unsafe" or
|
||||
"directsync".
|
||||
|
||||
* `disk_image` (boolean) - Packer defaults to building from an ISO file,
|
||||
this parameter controls whether the ISO URL supplied is actually a bootable
|
||||
QEMU image. When this value is set to true, the machine will clone the
|
||||
source, resize it according to `disk_size` and boot the image.
|
||||
|
||||
* `disk_interface` (string) - The interface to use for the disk. Allowed
|
||||
values include any of "ide," "scsi" or "virtio." Note also that any boot
|
||||
commands or kickstart type scripts must have proper adjustments for
|
||||
resulting device names. The Qemu builder uses "virtio" by default.
|
||||
|
||||
* `disk_cache` (string) - The cache mode to use for disk. Allowed values
|
||||
values include any of "writethrough", "writeback", "none", "unsafe" or
|
||||
"directsync".
|
||||
* `disk_size` (integer) - The size, in megabytes, of the hard disk to create
|
||||
for the VM. By default, this is 40000 (about 40 GB).
|
||||
|
||||
* `floppy_files` (array of strings) - A list of files to place onto a floppy
|
||||
disk that is attached when the VM is booted. This is most useful
|
||||
|
@ -260,11 +265,6 @@ qemu-system-x86 command. The arguments are all printed for review.
|
|||
Packer will choose a randomly available port in this range to use as the
|
||||
host port.
|
||||
|
||||
* `disk_image` (boolean) - Packer defaults to building from an ISO file,
|
||||
this parameter controls whether the ISO URL supplied is actually a bootable
|
||||
QEMU image. When this value is set to true, the machine will clone the
|
||||
source, resize it according to `disk_size` and boot the image.
|
||||
|
||||
## Boot Command
|
||||
|
||||
The `boot_command` configuration is very important: it specifies the keys
|
||||
|
|
|
@ -46,10 +46,12 @@ $ packer
|
|||
usage: packer [--version] [--help] <command> [<args>]
|
||||
|
||||
Available commands are:
|
||||
build build image(s) from template
|
||||
fix fixes templates from old versions of packer
|
||||
inspect see components of a template
|
||||
validate check that a template is valid
|
||||
build build image(s) from template
|
||||
fix fixes templates from old versions of packer
|
||||
inspect see components of a template
|
||||
push push template files to a Packer build service
|
||||
validate check that a template is valid
|
||||
version Prints the Packer version
|
||||
```
|
||||
|
||||
If you get an error that `packer` could not be found, then your PATH
|
||||
|
|
Loading…
Reference in New Issue