Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
13 views

How do I resolve this error when using chef-solo from packer?

I'm trying to figure out how to leverage Packer to streamline some stuff and I'm having issues integrating chef recipes in it. Here's the error log packer throws out amazon-ebs: =====================...
5
votes
2answers
94 views

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) - ...
2
votes
1answer
106 views

Error when using 'ansible-local' provisioner with Docker container

I'm getting an error when running the ansible-local provisioner with a docker builder in Hashicorps Packer. My template (template.json): { "builders": [ { "type": "docker", ...
3
votes
1answer
117 views

Ansible Remote provisioning not working in Docker container build

I have a Packer template to start with a Docker container and provision it. The shell script provisioners seem to be working, but, while the playbook runs and seems to succeed, unlike the shell ...
1
vote
1answer
72 views

Parallelising Packer with Ansible

Issue I have an Ansible role which covers Windows, macOS and Ubuntu OS. I also have a Packer template file for each OS (due to small nuances and changes in the template file to handle provisioning) ...
6
votes
6answers
223 views

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

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-> ...
7
votes
3answers
192 views

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 ...
2
votes
1answer
260 views

Deploying to VSphere with Packer and/or Terraform?

Scenario: Creating multiple VMs and deploying them to VSphere. Current development uses Packer and Ansible to provision a Fusion VM, with the aim of using Terraform to deploy to VSphere. Issue: I'...
4
votes
1answer
841 views

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
5
votes
1answer
58 views

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

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 ... ...
4
votes
3answers
406 views

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 Phyton apps on it. All OS patches should be applied to this image ...
2
votes
1answer
825 views

How does using packer and terraform in a CD pipeline compare to docker images built from git?

At work we have a Go CD pipeline for producing docker images, and scheduling docker containers with rancher. This works quite well. You can commit a change to the Docker image in Git, the pipeline ...
23
votes
5answers
4k views

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 ...
7
votes
2answers
598 views

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 ...