#packer (2020-03)
Discuss Packer for building AMIs and Docker Images
Archive: https://archive.sweetops.com/packer/
2020-03-06
![ikar avatar](https://avatars.slack-edge.com/2019-12-12/872745210438_a9cbe68481dd0d2b9e3d_72.jpg)
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.
![ikar avatar](https://avatars.slack-edge.com/2019-12-12/872745210438_a9cbe68481dd0d2b9e3d_72.jpg)
so in other words: do you usually run terraform programmatically? based on some external events?
![David avatar](https://secure.gravatar.com/avatar/4f47da5c338b83938ce2229dbbd5460f.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0003-72.png)
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
![ikar avatar](https://avatars.slack-edge.com/2019-12-12/872745210438_a9cbe68481dd0d2b9e3d_72.jpg)
Thanks @David! This is exactly what I needed to see Helped me building my (slightly simpler) python script
2020-03-26
![Jason Walsh avatar](https://secure.gravatar.com/avatar/90a2082cd36795676d8bd2be5f01e569.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
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.
![Jason Walsh avatar](https://secure.gravatar.com/avatar/90a2082cd36795676d8bd2be5f01e569.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
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.
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
this is neat! also feel free to share in #community-projects
![Jason Walsh avatar](https://secure.gravatar.com/avatar/90a2082cd36795676d8bd2be5f01e569.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
thanks Erik!
2020-03-27
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Adding @discourse_forum bot
![discourse_forum avatar](https://avatars.slack-edge.com/2020-03-26/1029663249525_451a74d3463357c40dbf_72.png)
@discourse_forum has joined the channel