Commit 3a3a81b0 authored by Neeki Patel's avatar Neeki Patel

Merge remote-tracking branch 'upstream/master'

parents 027b43ea 25441b67
...@@ -8,8 +8,12 @@ import ( ...@@ -8,8 +8,12 @@ import (
"code.google.com/p/google-api-go-client/compute/v1" "code.google.com/p/google-api-go-client/compute/v1"
"github.com/mitchellh/packer/packer" "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. // 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 { ...@@ -114,7 +114,14 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
ui.Say("Provisioning with Salt...") ui.Say("Provisioning with Salt...")
if !p.config.SkipBootstrap { if !p.config.SkipBootstrap {
cmd := &packer.RemoteCmd{ 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)) ui.Message(fmt.Sprintf("Installing Salt with command %s", cmd))
if err = cmd.StartWithUi(comm, ui); err != nil { if err = cmd.StartWithUi(comm, ui); err != nil {
......
...@@ -118,11 +118,11 @@ each category, the available configuration keys are alphabetized. ...@@ -118,11 +118,11 @@ each category, the available configuration keys are alphabetized.
described above. Note that if this is specified, you must omit the described above. Note that if this is specified, you must omit the
`security_group_id`. `security_group_id`.
* `spot_price` (string) - The maximum hourly price to launch a spot instance * `spot_price` (string) - The maximum hourly price to pay for a spot instance
to create the AMI. It is a type of instances that EC2 starts when the maximum to create the AMI. Spot instances are a type of instance that EC2 starts when
price that you specify exceeds the current spot price. Spot price will be the current spot price is less than the maximum price you specify. Spot price
updated based on available spot instance capacity and current spot Instance will be updated based on available spot instance capacity and current spot
requests. It may save you some costs. You can set this to "auto" for instance requests. It may save you some costs. You can set this to "auto" for
Packer to automatically discover the best spot price. Packer to automatically discover the best spot price.
* `spot_price_auto_product` (string) - Required if `spot_price` is set to * `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. ...@@ -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, five seconds and one minute 30 seconds, respectively. If this isn't specified,
the default is 10 seconds. the default is 10 seconds.
* `disk_size` (integer) - The size, in megabytes, of the hard disk to create * `disk_cache` (string) - The cache mode to use for disk. Allowed values
for the VM. By default, this is 40000 (about 40 GB). 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 * `disk_interface` (string) - The interface to use for the disk. Allowed
values include any of "ide," "scsi" or "virtio." Note also that any boot values include any of "ide," "scsi" or "virtio." Note also that any boot
commands or kickstart type scripts must have proper adjustments for commands or kickstart type scripts must have proper adjustments for
resulting device names. The Qemu builder uses "virtio" by default. resulting device names. The Qemu builder uses "virtio" by default.
* `disk_cache` (string) - The cache mode to use for disk. Allowed values * `disk_size` (integer) - The size, in megabytes, of the hard disk to create
values include any of "writethrough", "writeback", "none", "unsafe" or for the VM. By default, this is 40000 (about 40 GB).
"directsync".
* `floppy_files` (array of strings) - A list of files to place onto a floppy * `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 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. ...@@ -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 Packer will choose a randomly available port in this range to use as the
host port. 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 ## Boot Command
The `boot_command` configuration is very important: it specifies the keys The `boot_command` configuration is very important: it specifies the keys
......
...@@ -49,7 +49,9 @@ Available commands are: ...@@ -49,7 +49,9 @@ Available commands are:
build build image(s) from template build build image(s) from template
fix fixes templates from old versions of packer fix fixes templates from old versions of packer
inspect see components of a template inspect see components of a template
push push template files to a Packer build service
validate check that a template is valid 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 If you get an error that `packer` could not be found, then your PATH
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment