- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: RE: Re: docker cookbook and idempotency
- Date: Tue, 1 Sep 2015 07:29:51 -0700
On Tuesday, September 1, 2015 at 7:25 AM, Kevin Keane Subscription wrote:
>
RE: [chef] Re: docker cookbook and idempotency
>
Yeah, I kinda thought that it would be difficult to implement idempotency.
>
>
I'm not sure the build_if_missing would work, because of resource ordering.
>
If I understand you correctly, you are suggesting something like this:
>
>
>
>
>
docker_image "myimage do
>
>
>
action :build_if_missing
>
end
>
>
remote_directory "/tmp/mydockercontext" do
>
>
notifies :build, "docker_image[myimage]"
>
end
>
But with this order, the docker image would be built before the context is
>
set up.
>
Reversing the order of the resources would break the notification, because
>
you cannot notify resources that come later in the recipe. Or am I mistaken
>
about that?
That used to be the case a really long time ago, but it’s supported on any
version of Chef that you’re likely to be using.
>
Kevin Keane
>
The NetTech
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.