#packer (2020-03)
Discuss Packer for building AMIs and Docker Images
Archive: https://archive.sweetops.com/packer/
2020-03-06

Hey there! I’m about to build (AWS) AMIs via crontab on one of our service machine. Afterwards I’ll update Lanch conf + autoscaled group with python and boto3. How do you “rotate” the machines in the autoscaled group? I know terraform can be used fot this, but I feel like i don’t want to run terraform automatically. Not quite sure why. The only concern is it should also commit TF state changes - I know, this is not recommended way how to store state, shame on me.

so in other words: do you usually run terraform programmatically? based on some external events?

If you want to do it in a script, here’s a ts-node script I wrote yesterday that runs a command on each instance to gracefully kill its process, then shuts down the instance, then waits for a new healthy instance to come up, then repeats with all other nodes until all nodes have been cycled.
The commands in python would likely be very similar
2020-03-12

Thanks @David! This is exactly what I needed to see Helped me building my (slightly simpler) python script
2020-03-26

Hi all. Last weekend I started a small project that is a web user interface for generating Packer templates. The project is still in its infancy and has a lot of room for improvement, but I’d love to get some feedback. The source code is here: https://github.com/jasonwalsh/punk.
Punk is a GUI for generating Packer templates. Contribute to jasonwalsh/punk development by creating an account on GitHub.

There’s also a Heroku app if you want to quickly see what Punk is: https://murmuring-forest-55290.herokuapp.com/
Punk is a GUI for generating Packer templates. Contribute to jasonwalsh/punk development by creating an account on GitHub.

this is neat! also feel free to share in #community-projects

thanks Erik!
2020-03-27

Adding @discourse_forum bot

@discourse_forum has joined the channel