chef-boneyard / chef-provisioning

A library for creating machines and infrastructures idempotently in Chef.
Apache License 2.0
523 stars 163 forks source link

Idempotent machine images #420

Open Fodoj opened 9 years ago

Fodoj commented 9 years ago

As far as I can see, machine_image is not recreated only if there a data bag item inside machine_image data bag. But if I upgrade my cookbooks that are used inside this machine image, then I would love image to be rebuilt. Or if add new recipe to this image, let's say

machine_image "web" do
  recipe "my-app::deploy"
end

that builds an image. Then I decide that I want some extra metrics collection to happen:

machine_image "web" do
  recipe "my-app::deploy"
  recipe "metrics::setup"
end

What do you think - is it important that chef would understand this change and rebuild an image or it's feature that is not really required by some reason?

yoshiwaan commented 9 years ago

It would have to be an option. Something like

machine_image 'web' do
  recipe "my-app::deploy"
  ephemeral true
end