Questions tagged [packer]

Packer automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images.

Packer automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images.

32 questions
37
votes
5 answers

How to avoid interactive dialogs when running "apt-get upgrade -y" in Ubuntu 16.04 when packaging with Packer?

I'm using Packer to create an AWS AMI based on an Ubuntu 16.04 image. In the beginning, I'm doing an upgrade: sudo apt-get update sudo apt-get upgrade -y Here is the relevant part of my provisioners section: "provisioners": [ { "type":…
Philipp Claßen
  • 1,675
  • 3
  • 18
  • 30
14
votes
4 answers

Is there an idiomatic way to create reusable Packer templates?

I'm creating about 10-12 Packer templates which almost all work the same way. Same builder (Amazon EBS), with some small variations in AMI names, and almost the same provisioner (Ansible Remote) - sometimes with additional variables and sometimes…
Tim Malone
  • 1,265
  • 1
  • 13
  • 26
10
votes
3 answers

How should we automatically rebuild immutable infrastructure when new packages are available?

We're going to be using Terraform to automate our infrastructure deployment and Packer to create the machine images deployed by Terraform. By following immutable infrastructure design principles, we will implement patching by creating a new image…
8
votes
2 answers

Is it possible to locate the temp keypair generated by Packer?

I`m creating a new image and everything is working. I would like to debug via ssh during the instance creation. A temp keypair is created and attached to the temp instance. My question is, can I get this keypair somewhere in order to debug it? ==>…
armandomiani
  • 181
  • 1
  • 5
8
votes
3 answers

How to remotely update AMI id in Jenkins EC2 plugin?

I have been looking for a way to update AMI id in Jenkins EC2 plugin configuration after a packer build is run. After some digging, I found a promising way to do it IF the packer run is done by Jenkins itself, via postbuild groovy plugin (mind you,…
Michael Bravo
  • 376
  • 3
  • 10
8
votes
1 answer

What are reasons for using HashiCorp's packer to build docker images instead of using docker build?

I have read https://www.packer.io/docs/builders/docker.html, but I do not see the advantage of using Packer over docker build or docker-compose up --build for building docker images
030
  • 13,383
  • 17
  • 76
  • 178
6
votes
6 answers

In the HashiCorp stack, where's the appropriate place to add users?

I'm in the process of building some custom Linux images using HashiCorp's Packer, which will later be deployed to Azure using HashiCorp's Terraform. The VMs created from these images will need to have a set of users created; in this particular case…
cori
  • 161
  • 4
6
votes
3 answers

Baking Immutable Images

I am working on a project and we are trying to bake immutable images on containers as IaC. These images can have J2EE, .NET or Python apps on it. All OS patches should be applied to this image frequently and app updates should be also updated on…
5
votes
1 answer

Bridged network adapter for Packer + VirtualBox?

So, I load an .ova image with packer of a minimal ubuntu linux installation. I realized after everything went through (Provisioners etc) and it successfully exported the output file. However, when loading the output image with VirtualBox I can't…
Kyu96
  • 145
  • 3
  • 17
5
votes
1 answer

Storing Meta Data for Apps/tools

Have created a number of images via packer and soon coming to the conclusion that binaries/images soon rack up in qty and need to find away to store config data. We are going to use ansible to hold config data for apps and was wondering about how…
Nick Gleed
  • 105
  • 2
5
votes
1 answer

Force script to fail if "npm install" has network issues

With the current Github outage, I noticed a problem with my packer setup. In a nutshell, I have a packer setup where I call a shell script that looks like this: #!/bin/bash set -e ... npm install ... I expected that if there is any error during npm…
Philipp Claßen
  • 1,675
  • 3
  • 18
  • 30
4
votes
1 answer

How to download a VM image from GCP?

I do not see a download button. I would like to download a VM image that was created on GCP using Packer and I would like to run it locally in Virtualbox.
030
  • 13,383
  • 17
  • 76
  • 178
4
votes
1 answer

difference between packer and matchbox

I have this setup to standup a baremetal machine: Terraform-> Matchbox \-> Chef-> Docker My colleague has a setup to standup VMs in AWS: Terraform-> Packer-> Chef-> Docker Is Packer to AWS as Matchbox is to Baremetal, in terms of image…
scott
  • 466
  • 4
  • 11
4
votes
1 answer

How can I chain Packer builds within a single template

I would like to define a single Packer template that consists of 3 builds; each one building upon the previous: source "amazon-ebs" "base" { source_ami_filter { filters { ... } } build { name = "build_1" source "amazon-ebs.base"…
4
votes
0 answers

Build Windows image for openstack with packer

I am trying to build Windows image for Openstack with packer, but i don't know how to add the autounattend.xml file or floppy files. I build the image with success from qemu but I cannot find the same for openstack. For Qemu i have the floppy_files…
pioupiou
  • 171
  • 1
  • 6
1
2 3