26 votes
Accepted

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

This sequence of commands works for me: apt-get update DEBIAN_FRONTEND=noninteractive apt-get upgrade -yq So, DEBIAN_FRONTEND=noninteractive is correct but you also need the -q flag. Source: https:/...
user avatar
13 votes

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

Your problem is that grub file change adhere to ucf and not debconf, as per this incident on apt list you're not alone. As workaround I found this answer on askunbuntu. Removing the menu.lst from the ...
user avatar
  • 11.1k
9 votes
Accepted

Does the "cattle not pets" distinction apply as equally to machine instances as to containers?

While technologically, containers and virtual machines are very different, there is no apparent difference from the perspective of your software. It seems like the argument in your question is that ...
user avatar
  • 3,674
7 votes
Accepted

How does the creation of an AMI on AWS work and why is the creation time unpredictable?

When creating an AMI, you are making a copy of your EBS volumes. This utilizes block storage and will only need to process the diffs of your EBS snapshots. If you changed a lot of data in your EBS or ...
user avatar
4 votes

What are best practices and/or tools for updating AMIs on a regular basis?

We are planning to automate this process for our Jenkins EC2 slaves. Currently we have to manually update the AMI ID every time we build a new AMI, but by taking advantage of the config.xml file ...
user avatar
3 votes

What are best practices and/or tools for updating AMIs on a regular basis?

Using containers for such computation nodes makes a lot of sense, and it would offer other advantages, too. But it's not a silver bullet. You'd still have to work at it. To really answer your ...
user avatar
  • 1,231
3 votes

What are best practices and/or tools for updating AMIs on a regular basis?

You should take a look at packer, we've found it very helpful in automating builds of image types, including AMI's. We make use of the chef client provisioner with cookbooks to manage the changes ...
user avatar
3 votes

What are best practices and/or tools for updating AMIs on a regular basis?

I can answer on how we do it actually: We're using a private Gitlab on AWS and its CI system. We have a repository for our build environment (a docker image with packer/scripts/json describing amis) ...
user avatar
  • 11.1k
3 votes

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

To add to Philipp's answer, if you are using sudo then you need to make sure to set the DEBIAN_FRONTEND variable afterwards, like so: apt-get update sudo DEBIAN_FRONTEND=noninteractive apt-get ...
user avatar
2 votes

What are best practices and/or tools for updating AMIs on a regular basis?

Perhaps you might benefit from abstracting your platform (the AMI with base dependencies) from your software. Do you really need to re-roll the AMI every time you update your algorithms and models? ...
user avatar
  • 109
2 votes
Accepted

User data in original windows ec2 instance does not get executed in custom ami

User Data Persistance If I create an image with Packer or other tool, I'll include normally a userdata initialization script that would allow connecting via WinRM. This is required as the default AMI ...
user avatar
2 votes
Accepted

Which AMI was my EC2 instance created from?

Is there any way to tell which AMI my EC2 instance was created from? Short answer: yes. Longer answer: yes - how would you like to get it? The AMI which the EC2 instance was launched with is part ...
user avatar
  • 3,098
1 vote

How do I create a LAMP server via EC2 Image Builder?

You need to create build components and define a custom installation process. Click the 'Create Build Component' button in the 'Components' section of the 'Recipe' page. Scroll down to 'Definition' ...
user avatar
1 vote

Why does Docker fail to start on AWS ECS instances. ECS stateful instance fails initialization. ECS stateful instance doesn't join the ECS cluster

The key here is the behavior of AWS AMIs in the context of ECS. By default the AWS ECS Amazon Linux AMI optimized for ECS is in charge of VOLUME management but there's a problem if you copy that AMI ...
user avatar
  • 121
1 vote

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

I didn't notice any difference using -y or -q. Maybe because the question is about using "packer" ? (I use bare scripts) Anyway, in my case, I got rid of the dialogs for apt upgrade using the ...
user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible