Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
builder/amazon/scratch
.gitignore
LICENSE.txt
README.md
main.go

README.md

packer-builder-amazon-scratch

What's this?

Packer builder plugin that allows to AMI from empty volume.

{
  "type": "amazon-scratch",
  "region": "ap-northeast-1",
  "source_ami": "ami-936d9d93",
  "subnet_id": "subnet-XXX",
  "associate_public_ip_address": true,
  "instance_type": "t2.micro",
  "ssh_username": "ubuntu",
  "ami_name": "packer {{timestamp}}",
  "worker_device_name": "/dev/sdf",
  "volume_size": 4,
  "volume_type": "gp2"
}

this will starts instance with 4GB gp2 EBS, using ami-936d9d93. Then provision your stuff on /dev/sdf.

Finally /dev/sdf will be used as root block device on new AMI.

Difference with amazon-chroot

  • amazon-chroot doesn't allow do something on host machine -- it runs all commands in chrooted environment.
  • amazon-chroot requires run packer on an existing EC2 instance, but this doesn't.
  • this launches source_ami to create AMI, each time.
  • this creates empty EBS. amazon-chroot always requires source AMI as base.

Author

sorah

License

MIT License

You can’t perform that action at this time.