76 Commits

Author SHA1 Message Date
Rickard von Essen
c3a352955e amazon: Added snapshot_users and snapshot_groups 2016-12-04 16:03:01 +01:00
Matthew Hooker
832de2104b
Revert "Merge pull request #4230 from mitchellh/revert-4223-closes_3320"
This reverts commit bda89b0c42deb186f18a68931c001afbe406dffb, reversing
changes made to f9f9d8241967bfde493529ad0b9b42f3e422fd51.
2016-11-30 13:28:34 -08:00
Matthew Hooker
f5c3c25d2b Revert "Adds force_delete_snapshot flag" 2016-11-30 13:10:22 -08:00
Arthur Burkart
5b59f56cdb Adds force_delete_snapshot flag
This PR adds the ability for Packer to clean up snapshots in addition to
deregistering AMIs at build time.

To test this, I used the following `test.json` file:

```json
{
  "builders": [
    {
      "type": "amazon-ebs",
      "region": "us-east-1",
      "source_ami": "ami-fce3c696",
      "ami_name": "packer-test",
      "instance_type": "m3.medium",
      "ssh_username": "ubuntu",
      "vpc_id": "some-vpc-id",
      "subnet_id": "some-subnet-routed-through-igw",
      "security_group_id": "some-security-group-with-port-22-access",
      "force_delete_snapshot": true
    }
  ],
  "provisioners": [
    {
      "type": "shell-local",
      "command": "echo 'hello'"
    }
  ]
}

```

I appreciate any constructive feedbakc that can be given. Cheers!
2016-11-29 23:39:36 -05:00
Arthur Burkart
2e65867cba Closes #3908: Adds snapshot tag overrides
This commit adds the ability to configure unique tags on snapshots
that are separate from the tags defined on the AMI. Anything applied
to the AMI will also be applied to the snapshots, but `snapshot_tags`
will override and append tags to the tags already applied to the snapshots
2016-11-15 23:16:27 -05:00
Matthew Hooker
48bdae93d1 aws-sdk: use session.NewSession 2016-11-01 15:53:04 -07:00
Matthew Hooker
d920b3fbf4 run gofmt 2016-11-01 14:08:04 -07:00
Chris Lundquist
ab3500b45c [dynamic-source-ami] support chroot builder 2016-10-01 22:56:09 +00:00
Orivej Desh
6762965696 Add -on-error command line argument to allow preserving artifacts on builder errors
Resolves #409
2016-09-16 12:15:00 +00:00
Jeremy Asher
1c392b23f9 generate warnings for unused options with from_scratch 2016-09-03 12:32:43 -07:00
Jeremy Asher
ef0c7543e1 add amazon-chroot post mount commands
This adds an additional PostMountCommands step to the amazon-chroot
builder which executes after the volume is mounted, but before the
extra chroot mounts and copy step.
2016-09-03 12:32:41 -07:00
Jeremy Asher
5e8b697a76 add from_scratch option to amazon-chroot builder
This provides an alternate mode for the amazon-chroot builder which uses
a blank volume to build the image.  It adds StepPreMountCommands to
permit partitioning and format commands to be executed before mounting
the new volume.
2016-09-03 12:28:22 -07:00
Chris Bednarski
4490826a17 Merge pull request #3040 from kimor79/3011
Add mount_partition option to amazon-chroot builder
2016-01-25 22:08:07 -08:00
Kimo Rosenbaum
09543fc4e7 Add mount_partition to amazon-chroot builder to specify a partition other than 1 2016-01-06 11:35:01 -08:00
Yuya YAGUCHI
9c8405b2c6 Add AMI Product Codes modification for amazon-ebs & amazon-chroot 2015-11-19 18:28:04 +09:00
Luke Amdor
8682dec178 aws: build after upstream breaking change
see 1a69d06935
2015-10-30 13:58:56 -05:00
Clint Shryock
29cef0eae4 builder/amazon-chroot: add mount_options configuration option 2015-06-23 11:26:13 -05:00
Clint Shryock
5d2ea088a2 builder/amazon-chroot: add root_volume_size to resize chroot root volume 2015-06-23 10:35:59 -05:00
Mitchell Hashimoto
84189f7a28 builder/*: properly save interpolation context 2015-06-22 09:22:42 -07:00
Clint Shryock
bec59b535d builder/amazon: Add force_deregister option, to automatically deregister artifacts with name conflicts 2015-06-12 13:23:47 -05:00
Henry Huang
052b5e6699 "Name" parameter required for copying ami across regions [GH-2172] 2015-06-05 11:15:48 +00:00
Seth Vargo
33ca8b7fb5 Migrate to new AWS repo 2015-06-03 17:13:52 -04:00
Mitchell Hashimoto
44b980e659 Merge branch 'aws-sdk-go' of https://github.com/jen20/packer into jen20-aws-sdk-go 2015-05-28 08:24:41 -07:00
Mitchell Hashimoto
034e4e676c amazon/*: use new interpolation functions 2015-05-27 11:47:45 -07:00
James Nugent
e99cd56b6c Migrate from mitchellh/goamz to awslabs/aws-sdk-go
This commit moves the Amazon builders of Packer away from the Hashicorp
fork of the goamz library to the official AWS SDK for Go, in order that
third party plugins may depend on the more complete official library
more easily.
2015-04-12 21:33:09 -04:00
James Massara
be27ecc64b Add option to enable enhanced networking (SriovNetSupport) for images. 2014-06-04 14:58:11 -07:00
Mitchell Hashimoto
4a2793445f builder/amazon/chroot: mount in device-specific places 2013-12-21 09:16:09 -08:00
Mitchell Hashimoto
5d420ce1c1 Revert "Merge pull request #663 from ktruong7/public-AMI"
This reverts commit b2fc77870b825403ea068ba63f66ac28c76b3e88, reversing
changes made to 4789d3acc8937757ee7a430199bbc39671ba93c7.

This is already possible by setting groups.
2013-12-06 18:09:05 -08:00
ktruong7
3589b0ba27 Added option to make ami public automatically 2013-11-26 09:59:16 -05:00
Mitchell Hashimoto
3cd7379d1f builder/amazon/*: warnings 2013-11-02 22:56:54 -05:00
Mitchell Hashimoto
7f639d89b6 builder/amazon/*,builder/openstack: properly scrub sensitive [GH-554] 2013-11-02 11:34:54 +01:00
Matthew Hooker
5315b19822 common/config: config filter function [GH-521]
Fixes #521
2013-10-13 11:01:12 -07:00
Mitchell Hashimoto
b554a0dd86 builder/amazon/chroot: CommandWrapper
/cc @mwhooker - I changed the interface up a bit to return an error,
since things should return errors in Go (the ui.Error bit was kind of
ghetto because it had no way to bubble that error up except through the
UI).

Using this, I made it so that the communicator uses both a
CommandWrapper and ShellCommand with chroot so that the chroot commannd
is also wrapped (it wasn't before).

I think the functionality of all this is the same but I'd love if you
could look it over and make sure.
2013-09-30 09:33:57 -07:00
Mitchell Hashimoto
535888d9d8 builder/amazon/chroot: alphebatize the configs
/cc @mwhooker
2013-09-30 09:32:20 -07:00
Matthew Hooker
5f19648268 comment, formatting. 2013-09-29 08:04:57 +00:00
Matthew Hooker
831d5caa50 move wrapper definitions around. 2013-09-27 22:08:15 +00:00
Matthew Hooker
39c3051a95 building but there's an exec error. 2013-09-27 20:47:44 +00:00
Matthew Hooker
ac496a63dc replace command config with wrapper command. 2013-09-27 10:54:53 +00:00
Matthew Hooker
7fa238503b wip 2013-09-26 00:58:25 -07:00
Matthew Hooker
1befba24ed Allow user to override chroot command. 2013-09-17 05:58:16 -07:00
Mark Peek
f941718c3e builder/amazon: add clean_ami_name template function
Add a clean_ami_name template function which will translate illegal
characters in an AMI name to '-'. Example usage would be:
    "ami_name": "Ubuntu 12.04 {{isotime | clean_ami_name}}"
2013-09-07 18:42:50 -07:00
James Massara
5bca569fa4 builder/amazon: Re-ordered steps for AMI region copying so tags and
launch permissions are also applied to copied AMIs
2013-09-04 16:06:06 -07:00
Mitchell Hashimoto
80ed7eddf4 builder/amazon/chroot: new multistep API 2013-08-31 12:58:55 -07:00
Mitchell Hashimoto
251abc3496 builder/amazon: modify attributes before region copy
/cc @jmassara
2013-08-22 15:35:47 -07:00
Mitchell Hashimoto
e7a50133b6 builder/amazon: support tags in chroot and instance 2013-08-22 15:11:54 -07:00
Mitchell Hashimoto
64d87bfaf3 *: switch to packer ConfigTemplate 2013-08-15 19:17:23 -07:00
Mitchell Hashimoto
332bdf6edc builder/*, provisioner/*: set user vars 2013-08-09 15:57:08 -07:00
Mitchell Hashimoto
b4d18f9d30 builder/amazon/chroot: can modify AMI attributes 2013-08-08 22:52:39 -07:00
Mitchell Hashimoto
5f34ec0ebc builder/amazon/chroot: switch to new template stuff 2013-08-08 17:25:25 -07:00
Mitchell Hashimoto
5b7d8fbc74 rename builder/common to common since it is generally useful 2013-08-01 12:11:54 -07:00