Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
21 views

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.
0
votes
0answers
11 views

Using the terraform github provider on an existing github organization

If I use the github provider in terraform on an existing github organization, do I need to write out each user and role within the .tf files or can the state be imported? What is the best approach ...
0
votes
1answer
30 views

Automated testing of machines built using Vagrant+Ansible

What are the options for validation and testing of virtual machine built using Vagrant and Ansible? I have a set of tasks that need to be complete-able using a specific machine. Testing right now is ...
0
votes
0answers
7 views

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

Understanding Vagrant virtual machine import

I'm building my Windows server 2012 vm with packer and when I'm doing a vagrant up it's failing because the folder name already exists… Here is my json file for packer { "builders": [ { "...
0
votes
1answer
42 views

DevOps Newbie - How to automate windows infrastructure deployment?

DevOps newbie here, so bear with me. I have a project where infrastructure deployment and application deployment is done using powershell and it is tied to VMWare vCenter. For every client deployment,...
0
votes
1answer
21 views

Packer and compressed ISO images

I am not using packer yet, just looking through the documentation. Some VMs it supports can be built from iso images. The examples cover use cases where the ISO is available online through the iso_url ...
0
votes
0answers
50 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
192 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
117 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
137 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
94 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
270 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
131 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
240 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
313 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
1k 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
61 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
430 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
447 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
877 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 ...
26
votes
5answers
5k 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
709 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 ...