Running chef in a chroot

hey guys,

i am looking at pre-baking some machine images to do the slow parts
ahead of time. I plan to run chef again later at deploy time to wire
together when i deploy the machine image to wire it into my
infrastructure.

Are there any special considerations I need to make to do this? I
assume I have to monkey patch services so that they don’t actually
start, stop, or restart services. Anything else? Last but not least,
is there a tool that already does this?

Depending on your platform, you can use a trivial Debian policy to
prevent the auto-start of services during package installation. See HW
cookbook 'deb_pkg_unautostart' [0] [1]

In some cases we've done 'staged' run-lists, whereby the first or
first few stages of runlist is converged, the node state is tidied and
then an image is created; putting it into a pretty good shape for
converging Chef quickly when deploying.

It's important to be vigilant about cleaning the state of your machine
post-image, you don't want any data laying around that could affect
future nodes brought up from the image. I am not aware of a tool that
does this.

Cheers,

AJ

[0] ckbk.it/deb_pkg_unautostart
[1] https://github.com/hw-cookbooks/deb_pkg_unautostart

On 1 May 2013 01:55, Bryan Berry bryan.berry@gmail.com wrote:

hey guys,

i am looking at pre-baking some machine images to do the slow parts
ahead of time. I plan to run chef again later at deploy time to wire
together when i deploy the machine image to wire it into my
infrastructure.

Are there any special considerations I need to make to do this? I
assume I have to monkey patch services so that they don't actually
start, stop, or restart services. Anything else? Last but not least,
is there a tool that already does this?