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
4
votes
1 answer

ami_block_device_mappings not working properly with packer

I am using packer to create AMI adding 2 block devices, 1 root and another ebs attached to it. The block device mapping is not attaching the ebs block to the ami or temporary instance created. My code block looks like (only details with block device…
mrityunjay
  • 379
  • 2
  • 6
  • 13
4
votes
1 answer

Packer - sudo/su condition for builders

I just started with Packer, and want to build AMI and Docker images. Problem is - that Docker's Ubuntu image have no sudo, thus - build failed with an error: docker: /tmp/script_2085.sh: 3: /tmp/script_2085.sh: sudo: not found Is there any way to…
setevoy
  • 4,374
  • 11
  • 50
  • 87
4
votes
1 answer

SSH failed when building RancherOS with Packer

I have an issue with Packer and RancherOS. I'm trying to build a custom rancherOS image with a cloud-config file. I'm working on MacOSX. I have this build.json file { "variables": { "vm_name" : "" }, "builders": [ { …
severin.julien
  • 1,314
  • 15
  • 27
4
votes
2 answers

Packer failing after terminating source with non-zero exit status: 2

I am attempting to create a new ami using packer and ansible. I'm admittedly very new to both. (I have used fabric and puppet in the past.) I noticed that I was using an amazon linux base ami and decided to change to a centos image instead. This has…
Bert Alfred
  • 431
  • 2
  • 7
  • 20
4
votes
2 answers

how to create a vagrant box from vmware image with packer

I have a VMWARE image running CentOS.I want to create a vagrant box from it with packer. I am new to Vagrant and can anyone suggest the steps?
vaj oja
  • 1,151
  • 2
  • 16
  • 47
4
votes
1 answer

Cache file download in packer

Packer automatically caches the OS ISOs when building. Is there any way to utilize this mechanism (or something similar) to provision files inside the VM so it doesn't redownload them every time?
Karl
  • 6,035
  • 5
  • 30
  • 39
4
votes
2 answers

Vagrant provision using files included in .box from packer

I'm building a vagrant .box file using packer. I've got something like this in my packer .json config: "post-processors": [ //SNIP "include": [ "./choco.ps1", "./vagrantUp.ps1", ] ] It's building the .box, and if I manually untar the…
Jake Stevenson
  • 3,009
  • 6
  • 35
  • 40
4
votes
0 answers

.NET Changing NATIVE Entrypoint

I googled so much but I just couldn't find a real answer to my question. Im currently writing a packer which encrypts the sections of an exe or dll file and modifies the Entry Point so my decrypter stub can decrypt the file at runtime, after that I…
4
votes
1 answer

Packer log-in automation for new machine image post-boot?

I'm using Packer to automate the building of an Ubuntu-12.04.4-lts machine image (currently targeting Virtualbox as the run-time environment). I'm able to get the base machine configured - my preseed.cfg file gets read - and Ubuntu installed, but I…
Ethan
  • 9,558
  • 5
  • 27
  • 24
4
votes
1 answer

Convert Virtualbox VM to Amazon AMI

I've used www.packer.io to make a vagrant VirtualBox VM for Windows using the vagrant-windows plugin, now I want to pkg it up and run it on ec2. Is it possible to use the virtual box hard drive verbatim for the generated AMI? I ask this because the…
The Internet
  • 7,959
  • 10
  • 54
  • 89
4
votes
1 answer

Packer's Puppet provisioning stalls

I'm very new to the this whole Packer/Vagrant,Puppet world. I'm trying to build my first VM using Packer and Puppet. I can successfully build a virtualbox and I've included a shell script provisioner to install puppet. I've ssh'ed into the VM to…
kane
  • 5,465
  • 6
  • 44
  • 72
4
votes
2 answers

AWS, Packer, Vagrant and Chef how can they all work together?

This will likely be the most convoluted question I've asked on stackoverflow but I think one that all Continuous Integration newbs might really benefit from. To start, I've read thru a ton of documentation and many "Get Started" tuts to understand…
4
votes
2 answers

What tools exist that offer apk protection for android (against reversing and repackaging)?

Seems that one of my company's successful apps has been repackaged as a torjan and distributed on 3rd parties markets (outside of google play). I'm looking for a robust solution that will protect our apps from such issues in the future. So far I've…
Zvi
  • 237
  • 3
  • 8
3
votes
4 answers

Javascript minification and shrinking variables with PHP

I've been looking around SO for a JavaScript obfuscation script of some kind, note that I'm not looking for a compressor, I need an obfuscation script/code that will shrink the JavaScript files I have in PHP (not in JavaScript) for production…
MacMac
  • 34,294
  • 55
  • 151
  • 222
3
votes
1 answer

Error Elements of a set are identified only by their value and don't have any separate index or key to select with,

I'm getting this error when I do terraform apply Error: Invalid index │ │ on deployBuildAWS.tf line 57, in resource "aws_instance" "packer_instance": │ 57: subnet_id = data.aws_subnet_ids.packer_subnet.ids[0] │ │ Elements of a set…