Questions tagged [packer]

PACKER QUESTIONS MUST BE PROGRAMMING RELATED. Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.

"Packer is a modern tool that embraces best benefits. It's completely automated, simply run a packer build, no human touches it, Packer builds it for you. " - Mitchell Hashimoto (Creator)

Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration management like Chef or Puppet. In fact, when building images, Packer is able to use tools like Chef or Puppet to install software onto the image.

A machine image is a single static unit that contains a pre-configured operating system and installed software which is used to quickly create new running machines. Machine image formats change for each platform. Some examples include AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc.

Resources

852 questions
6
votes
4 answers

Testing out the performance gain of compressing JavaScript code

I have used 5 JavaScript compressors to compress a JavaScript library (JSMin, YUI compressor, Packer, closure compiler and UglifyJS) Now I know that closure compiler is the winner in reducing the filesize. However, I also want to test out the…
6
votes
3 answers

How to download file from S3 into EC2 instance using packers to build custom AMI

I am trying to create a custom AMI using packers. I want to install some specific software on the custom AMI and my setups are present in S3 bucket. But it seems there is no direct way to download S3 file in packers just like cfn-init. So is there…
Praveen Raghav
  • 163
  • 1
  • 2
  • 7
6
votes
2 answers

How to override Attributes in packer chef solo provisioner

My packer code contains packer chef solo provisioner { "type": "chef-solo", "cookbook_paths": ["chef/cookbooks/vendor"], "run_list":…
krishna g
  • 461
  • 1
  • 5
  • 15
6
votes
1 answer

waiting for SSH to become available with packer too long

Anyone have already this issue with packer build ? Waiting for SSH to become available... [INFO] Attempting SSH connection... reconnecting to TCP connection for SSH handshaking with SSH handshake error: ssh: handshake failed: read tcp…
miltone
  • 4,416
  • 11
  • 42
  • 76
6
votes
2 answers

Local Packer Box Versioning

Is it possible to version a box created/hosted entirely on my local machine using Packer without publishing it on the HashiCorp Atlas? When I do a vagrant box list I get something like the following: vagrant box list Win8 (virtualbox,…
Joel B
  • 12,082
  • 10
  • 61
  • 69
6
votes
1 answer

Create a VM image from a Vagrant box using Packer?

I know that I can use Packer to create my own VM images in a scripted way. If I use the VirtualBox builder, I can choose from one of two flavors: Building everything from scratch, or building on top of an existing VM. Basically, what I would like to…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
6
votes
2 answers

VirtualBox port forwarding with Packer

I'm creating a VirtualBox image using Packer. Afterwards I start the VM and I'd like to use ssh to connect to it. I know how to enable port forwarding using the GUI but I prefer to automate things, so I'm looking for a way to let Packer do that for…
Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
6
votes
3 answers

Perl Install PAR:Packer Problems

My perl version is 5.16.2 on my Windows 7 64bit, I failed to install PAR:Packer. I tried active perl and strawberry perl , both got the same error. Can you please give me some suggestion. Below is my experience: I tried ppm install PAR:Packer,…
emily
  • 61
  • 1
  • 3
5
votes
1 answer

Is it possible to add a tag to AWS AMI created with Packer containing name of filtered source_ami?

I am building AWS AMI with Packer. The source image is defined by filter source_ami_filter and the source block looks like source "amazon-ebs" "test-image" { ami_name = "Some AMI Name" instance_type = "t2.micro" region =…
Andriy
  • 1,270
  • 3
  • 17
  • 35
5
votes
3 answers

Creating an AMI from AWS Lambda

I have been trying to use packer to create an AMI from Lambda for a particular use case. I am using bash custom runtime environment. I pulled the packer package and unzipped it. But when I try to run the executable, Lambda throws me out with exit…
5
votes
1 answer

Terraform with AWS and hotfix deployment strategy

In a nutshell we have a platform which comprises several applications/servers. Terraform is used to manage both the AWS Infrastructure (VPC, Subnet, IGW, Security Groups, ...) and Applications deployment (utilizing Ansible as provisioner from…
Arcobaleno
  • 484
  • 1
  • 5
  • 14
5
votes
1 answer

Using packer to copy file from host to generated image without password

I am currently using packer to generate customized images from a given configuration. The packer .json file includes provisions, which are described in this packer tutorial. Instead of typing the commands there, I used the shell option in which I…
ComputerScientist
  • 936
  • 4
  • 12
  • 20
5
votes
1 answer

Packer, Dockramp vs Dockerfile

Can someone please explain the advantages/disadvantages using the following when building container images, rather than using the dockerfile. Packer - tool for creating machine and container images for multiple platforms from a single source…
Tharanga Abeyseela
  • 3,255
  • 4
  • 33
  • 45
5
votes
3 answers

Why can't I run "source" command from within a packer build?

I'm attempting to do a packer build. My source AMI is an Ubuntu box. I would like to install and run a python virtual environment. My provisioner is shown below. The apt-get works fine and it creates a virtualenv. However, when I do source on…
Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
5
votes
3 answers

Always sleep on packer provisioning?

On my exploration of Packer I wonder the following: The docs state (as part of the getting started steps where a Ubuntu image is provisioned to AWS): Note: The sleep 30 in the example above is very important. Because Packer is able to detect and…
mkd
  • 79
  • 1
  • 6
1 2
3
56 57