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
5
votes
3 answers

How to use packer with box file?

I have a vagrantfile using a box on top of virtualbox with a provision script. Now I am trying to use packer to output a box already after provision. However I cannot find a builder to use the ".box" file I already have. What am I doing wrong?
guy mograbi
  • 27,391
  • 16
  • 83
  • 122
5
votes
2 answers

Packer + Vagrant - create AMI from ISO

Is it possible to create an AMI from an ISO? I am implementing a build system which uses the base iso, modifies it, installs stuff and then outputs it in .ovf and AMI. .ovf works. But for AMI, all I could figure out is it needs pre existing AMI. Is…
MavWolverine
  • 846
  • 1
  • 9
  • 24
5
votes
2 answers

attach ebs volume with packer during build time

I'm not sure if this is the right way to go about it but what I'm looking to do is shorten the build time of an image by packer. One of the steps required is to copy some 10GB of data and make it part of the image. Currently I'm using a shell…
Ryan B.
  • 353
  • 4
  • 13
5
votes
2 answers

Packer and post-install scripts

I'm started using Packer and I have a question. Is there any solution to add a bash script which will be started automatically and only once after VM will be deployed from an image?
SimWhite
  • 313
  • 1
  • 10
5
votes
2 answers

packer + ansible, how to specify the inventory file

When I use vagrant, I can specify the inventory file in the Vagrantfile. Example: config.vm.provision "ansible" do |ansible| ansible.playbook = "my_folder/playbook.yml" ansible.inventory_path = "my_folder/inventory_file" end How can I…
fj123x
  • 6,904
  • 12
  • 46
  • 58
4
votes
1 answer

virtual filesystem design

Im starting a protector/packer/binder like project. the goal is when you have a full app directory with /images/ /music/ base *.ini files dlls exes you just use packer.exe on it and all these files are packed, encrypted, and stored in the…
n00b
  • 5,642
  • 2
  • 30
  • 48
4
votes
1 answer

Packer build with private ip

I am using Packer to bake an AMI. It works fine by assigning public ip and temporary security group, but I do not want to assign public ip to temporary instance is there a way to prevent it assigning public ip? data "amazon-ami" "ami_id" { filters…
mebb
  • 123
  • 10
4
votes
3 answers

Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH

I am trying to build an AWS AMI with packer. here is my packer conf: source "amazon-ebs" "base-alpine" { assume_role { role_arn = "arn:aws:iam::${var.aws_account_id}:role/admin-ci" session_name = "packer" } source_ami_filter { …
Kingindanord
  • 1,754
  • 2
  • 19
  • 48
4
votes
0 answers

Temporary SSH key pairs left behind on AWS EC2 after Packer is done

Packer version: 1.6.6 My operating system: Ubuntu I'm using Packer to create AMIs on AWS EC2. I understand that Packer uses a temporary SSH key pair to connect to a temporary EC2 instance that will become the AMI. Now I have seen in the AWS…
Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
4
votes
6 answers

Ansible jenkins_plugin module returns "HTTP Error 403: No valid crumb was included in the request"

I am using Ansible (v 2.8) as the provisioner behind a Packer template to build an AMI for a Jenkins master node. For previous versions, the playbook passed successfully. However, as of Jenkins version 2.176.3, the jenkins_plugin module has been…
4
votes
2 answers

azure-arm winrm timed out error using packer

I used my existing VNET, Resource group, Subnet to be used by packer for creating a VM and take an image from it. I have taken the Windows image from the market place. The packer launches a Vm but times out while connecting to it. I have included my…
Anbu Kugan
  • 61
  • 1
  • 5
4
votes
1 answer

packer docker builder configure docker in docker image

I'm trying to provision docker:dind image with packer which will build another docker image and run it inside docker with following build script: { "builders": [ { "type": "docker", "image": "docker:dind", "privileged":…
Mariusz Miesiak
  • 638
  • 1
  • 6
  • 19
4
votes
6 answers

Having problems with Packer: amazon-ebs: Timeout waiting for SSH

I'm new with Packer and I'm trying to create an image using a private network of the VPC and I'm continually having the error *amazon-ebs: Timeout waiting for SSH.* The version of Packer in use is 1.3.4 and, the private subnet has access to a NAT…
Alfchee
  • 345
  • 1
  • 5
  • 14
4
votes
2 answers

Use custom configuration file for ansible provisioner

I am trying to provision a machine built with packer, using its ansible provisioner; Provisioning fails to find some roles which I have set in my custom ansible.cfg file as follows: [defaults] stdout_callback = yaml retry_files_enabled =…
pkaramol
  • 16,451
  • 43
  • 149
  • 324
4
votes
2 answers

How to set the version number of a Vagrant box using a Packer build?

The version of the box that is added is always v0; how can I change this value? For example, when I do a vagrant box list, my box is always version v0. I'm creating a VirtualBox Vagrant "box" using Packer, but I can't figure out how to set the…
activedecay
  • 10,129
  • 5
  • 47
  • 71