Commit Graph

368 Commits

Author SHA1 Message Date
Mitchell Hashimoto 23a48d6619 go fmt 2015-06-08 21:34:20 -07:00
Mitchell Hashimoto 9dff0adfb1 builder/google: don't hardcode SSH timeout [GH-1781] 2015-06-08 21:13:25 -07:00
Andrew Bayer ebdd0d991a Adds support for using the internal IP rather than NAT IP in GCE 2015-05-29 14:50:11 -07:00
jszwedko b1497b951c code.google.com/p/go.crypto/ssh -> golang.org/x/crypto/ssh
code.google.com/p/go.crypto/ssh is now at golang.org/x/crypto/ssh as of
https://code.google.com/p/go/source/detail?spec=svn.crypto.69e2a90ed92d03812364aeb947b7068dc42e561e&repo=crypto&r=8fec09c61d5d66f460d227fd1df3473d7e015bc6

Using the code.google.com import redirects properly, but runs into
issues if you try to use a subpackage of `ssh`, e.g. `agent` which
refers to golang.org/x/crypto/ssh causing conflicts if your types expect
code.google.com/p/go.crypto/ssh.

This is a precursor to a PR for #1066.
2015-05-28 08:17:49 -07:00
Mitchell Hashimoto 5aa30caa64 builder/googlecompute: new interpolation 2015-05-27 12:57:48 -07:00
duftler 6d28ee931c Delete GCE disk on SIGINT. 2015-04-21 18:02:05 +00:00
Dave Cunningham 982934dfb9 Use new Google API and OAuth libs, add UserAgent string 2015-04-17 15:12:39 -04:00
Emil Hessman 002e50f493 builder/googlecompute: fix formatting directives
Fixes the following vet reports:

builder/googlecompute/step_create_instance_test.go:42: possible formatting directive in Fatal call
builder/googlecompute/step_teardown_instance_test.go:29: possible formatting directive in Fatal call
builder/googlecompute/step_teardown_instance_test.go:39: possible formatting directive in Fatal call
2015-02-25 05:29:53 +01:00
Ross Smith II 10dee1bd68 Temporarily fix build by forking golang.org/x/oauth2 @ b3f9a68 2014-12-21 11:22:24 -08:00
Eric Johnson 24a774f0d3 Merge pull request #1737 from dcarlino/failfast_gce
Check if image already exists before doing anything else on GCE.
2014-12-09 12:10:05 -08:00
Dustin Carlino fe47f45800 Remove bucket_name from GCE config.
Fixes #1732. Forgot to do this in 23c947acf0.
2014-12-09 08:44:01 -08:00
Dustin Carlino 7c67228912 Check if image already exists before doing anything else on GCE.
This fixes #1729.
2014-12-09 08:42:34 -08:00
rhapsodhy dd547af0c4 fix googlecompute oauth dependency 2014-11-30 04:15:44 +00:00
Dustin Carlino 23c947acf0 Create GCE image from persistent disk instead of from a tarball.
The new flow:
1) Provision the instance
2) Tear down the instance, but keep the boot disk
3) Create an image from the disk
4) Tear down the disk

The step to update gcloud is no longer needed, since gceimagebundle isn't used anymore.
Fixes #1507 and addresses https://github.com/mitchellh/packer/issues/1447#issuecomment-61610235.
2014-11-25 17:07:06 -08:00
Eric Johnson 87001dba60 Merge pull request #1679 from evandbrown/gce-service-accounts
Use golang/oauth2, no longer require client_secrets.json, and use
2014-11-24 05:43:11 -08:00
Evan Brown ff149df30f Use golang/oauth2, no longer require client_secrets.json, and use
Service Account when run from a GCE Instance.
2014-11-21 12:45:27 -08:00
Misha Brukman 74e1be7469 Added the Ubuntu image project for GCE.
The documentation:
https://cloud.google.com/compute/docs/operating-systems#ubuntu
shows that `ubuntu-os-cloud` is the proper project name.
2014-11-17 23:00:52 -05:00
Mitchell Hashimoto 0db6cd3533 Merge pull request #1330 from qur/qemu-vagrant
Qemu vagrant
2014-10-28 08:42:17 -07:00
Mitchell Hashimoto e422a45449 fmt 2014-10-28 08:35:21 -07:00
Matt Page 0fe61fa1e0 fix: Respect metadata supplied for GCE builders.
Previously, any per instance metadata supplied via the GCE builder
was ignored.

Test plan:

- make test
- Manual testing via:
-- Created a packer config that contained a GCE builder with custom
   metadata set.
-- Ran `packer build`.
-- Verified the instance had the correct metadata in the GCE console.
2014-10-06 14:18:34 -07:00
Julian Phillips 90a57c411f Expand Artifact API to expose build state
In order that something consuming an artifact can have access to extra
builder specific data add the State method which allows the caller to
ask for arbitary values by name.
2014-09-22 11:15:47 +01:00
Mitchell Hashimoto b9f82ef17e fmt 2014-09-05 10:23:49 -07:00
Mitchell Hashimoto b5c0c63ebc builder/googlecompute: use new auth scheme 2014-09-05 09:47:20 -07:00
Mitchell Hashimoto 752162c234 fmt 2014-09-02 09:55:06 -07:00
Matt Page 8f237b7b94 Allow specifying project for source images in GCE
Within GCE, images may be shared across projects. Prior to this
commit, there was no way to inform the GCE builder that a source
image belonged to a specific project. This adds an optional
'source_image_project_id' key to the GCE builder config.
2014-08-20 10:20:28 -07:00
Jessica Frazelle 8bc696ce9e add disk size to google compute, so as to avoid disk size errors on exporting the image 2014-08-08 14:39:03 -04:00
Misha Brukman 4a85aefe0f Rename "Gsutil" to "Gcloud" now that we're updating "gcloud" and not "gsutil".
Also renamed files accordingly.
2014-07-25 17:23:15 -04:00
Eric Johnson 7f38936596 Merge pull request #1350 from mbrukman/googlecompute-driver-vm-images
builder/googlecompute: added support for all standard VM images
2014-07-25 06:08:06 -07:00
Misha Brukman 5b56970b09 Added CoreOS, OpenSUSE, and Windows projects for searching images. 2014-07-24 20:39:04 -04:00
Misha Brukman 01130da729 builder/googlecompute: added support for all standard VM images
Also fixed the error message to be clear that the image was not found in any of
the projects that we attempted to search, rather than keep the error message
from the last project, which may be confusing to users.
2014-07-18 15:08:08 -04:00
Carlos Sanchez 80fa018a36 [GCE] gsutil update fails in newer images, use gcloud
googlecompute: It looks like you are trying to run "/usr/local/bin/../share/google/google-cloud-sdk/bin/bootstrapping/gsutil.py update".
    googlecompute: The "update" command is no longer needed with the Cloud SDK.
    googlecompute: To update, run: gcloud components update
2014-06-26 13:50:06 +02:00
Mitchell Hashimoto 5fac6c79c4 fmt 2014-04-26 11:12:43 -07:00
Mitchell Hashimoto e84e5e4f2c Merge branch 'update-ssh-package' of github.com:higebu/packer into higebu-update-ssh-package
Conflicts:
	builder/amazon/common/ssh.go
	builder/digitalocean/ssh.go
	builder/googlecompute/ssh.go
	builder/openstack/ssh.go
	communicator/ssh/communicator_test.go
	communicator/ssh/keychain.go
	communicator/ssh/keychain_test.go
2014-04-26 11:12:06 -07:00
Mitchell Hashimoto 0da1f2d8c6 builder/googlecompute: template process instance name 2014-04-26 11:02:25 -07:00
Brett Porter e169013527 builder/googlecompute: configure instance name
Retain the current default of an instance name generated by UUID, but allow
users to choose a specific one. Useful for provisioning with Puppet when a
node name is used to select the right manifest.
2014-04-26 12:17:02 +10:00
Ross Smith II e9c84ef449 Merge pull request #1001 from zshenker/update-gce-builder-to-v1-api
Updates googlecompute build to v1 API & uses boot persistent disk
2014-04-21 08:04:35 -07:00
higebu f087ce16dc Fix the build problem by updating ssh package 2014-04-15 10:17:26 +09:00
Ross Smith II 27491f93f8 use old ssh code until higebu's branch is ready, see #1019 2014-04-11 08:23:12 -07:00
Zac Shenker 139e498962 Changing to the v1 google-api-go-client. Now creates a persistent disk as the boot disk, and sets it to auto delete 2014-04-03 15:18:58 -07:00
Mitchell Hashimoto e3c0715eab fmt 2014-02-21 15:11:56 -08:00
Mitchell Hashimoto 5f01415fb7 builder/googlecompute: tests for #867 2014-02-21 15:10:09 -08:00
Prasanna Santhanam d4c9ed43c9 Formatted googlecompute builder as per `make format` 2014-01-31 22:26:09 +05:30
Prasanna Santhanam 0e98b2a269 Fixes #867: save private key when debugging gce builder
Signed-off-by: Prasanna Santhanam <tsp@qubole.com>
2014-01-31 19:13:31 +05:30
Mitchell Hashimoto a91b8f6853 builder/googlecompute: only load secrets/private key if given 2013-12-13 19:32:01 -08:00
Mitchell Hashimoto bde4b02d2b builder/googlecompute: artifact tests 2013-12-13 19:08:27 -08:00
Mitchell Hashimoto 637968f2dd builder/googlecompute: artifact uses Driver, no more api 2013-12-13 19:07:10 -08:00
Mitchell Hashimoto 33a84c0938 builder/googlecompute: StepRegisterImage 2013-12-13 19:03:10 -08:00
Mitchell Hashimoto 587f057bf6 builder/googlecompute: StepUploadImage 2013-12-13 18:30:57 -08:00
Mitchell Hashimoto 20a074b4ee builder/googlecompute: StepCreateImage 2013-12-13 18:26:00 -08:00
Mitchell Hashimoto 37903337ea builder/googlecompute: update gsutil 2013-12-13 18:21:02 -08:00
Mitchell Hashimoto a2cf4cae25 builder/googlecompute: enable provisioning 2013-12-13 18:08:43 -08:00
Mitchell Hashimoto 1055f470e6 builder/googlecompute: enable SSH 2013-12-13 18:07:16 -08:00
Mitchell Hashimoto a72d31fb5b builder/googlecompute: get instance info 2013-12-13 13:01:28 -08:00
Mitchell Hashimoto 57f707dfcc builder/googlecompute: delete instance 2013-12-12 22:34:47 -08:00
Mitchell Hashimoto f72f7a37d1 builder/googlecompute: fix all sorts of zone issues 2013-12-12 22:23:19 -08:00
Mitchell Hashimoto b676058144 builder/googlecompute: better logging 2013-12-12 21:53:05 -08:00
Mitchell Hashimoto 54d59fc79f builder/googlecompute: get rid of all client stuff for now 2013-12-12 21:53:05 -08:00
Mitchell Hashimoto 52f51a1dcd builder/googlecompute: disable other steps for now 2013-12-12 21:53:05 -08:00
Mitchell Hashimoto 2bd6f1e2d7 builder/googlecompute: driver and create instance tests 2013-12-12 21:53:05 -08:00
Mitchell Hashimoto 3657f33a4d builder/googlecompute: StepCreateSSHKey tests 2013-12-12 21:53:05 -08:00
Mitchell Hashimoto 2091dffe40 builder/googlecompute: cancel works 2013-12-12 21:53:04 -08:00
Mitchell Hashimoto fbc07942f0 builder/googlecompute: test config basics 2013-12-12 21:53:04 -08:00
Mitchell Hashimoto 46d297c7bd builder/googlecompute: client secrets tests 2013-12-12 21:53:04 -08:00
Mitchell Hashimoto 6507afd3ad builder/googlecompute: private key tests 2013-12-12 21:53:04 -08:00
Mitchell Hashimoto ee9ea170af builder/googlecompute: move config out to seperate file 2013-12-12 21:53:04 -08:00
Mitchell Hashimoto a78b10c06d builder/googlecompute: set ID to packer namespace now thats in core 2013-12-12 21:53:04 -08:00
Kelsey Hightower cc1130962b Use the same license as Packer core 2013-12-12 21:53:04 -08:00
Kelsey Hightower 58c73727e5 builder/googlecompute: Add new googlecompute builder 2013-12-12 21:53:03 -08:00