#packer (2020-03)

packer

Discuss Packer for building AMIs and Docker Images

Archive: https://archive.sweetops.com/packer/

2020-03-06

ikar avatar

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

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

David avatar

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

1

2020-03-12

ikar avatar

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

2

2020-03-26

Jason Walsh avatar
Jason Walsh

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.

jasonwalsh/punk

Punk is a GUI for generating Packer templates. Contribute to jasonwalsh/punk development by creating an account on GitHub.

1
Jason Walsh avatar
Jason Walsh

There’s also a Heroku app if you want to quickly see what Punk is: https://murmuring-forest-55290.herokuapp.com/

jasonwalsh/punk

Punk is a GUI for generating Packer templates. Contribute to jasonwalsh/punk development by creating an account on GitHub.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

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

Jason Walsh avatar
Jason Walsh

thanks Erik!

2020-03-27

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Adding @discourse_forum bot

discourse_forum avatar
discourse_forum
10:05:18 PM

@discourse_forum has joined the channel

    keyboard_arrow_up