we are creating chef nodes using xen-create-image. I am creating a
separate role, which is supposed to install chef via omnibus. There
are two approaches to that:
run chef-client to fully install the system during xen-create-image
phase (in chroot)
install chef the way that after first reboot it would run
chef-client and completely configure by itself.
I would prefer (2), because it is more “real” scenario, and would not
increase (quite long already) time of xen-create-image.
Is there a way to install chef with only chef-client recipe? Or is it
generally considered “ok” to do it the (1) way?
we are creating chef nodes using xen-create-image. I am creating a
separate role, which is supposed to install chef via omnibus. There
are two approaches to that:
run chef-client to fully install the system during xen-create-image
phase (in chroot)
install chef the way that after first reboot it would run
chef-client and completely configure by itself.
I would prefer (2), because it is more "real" scenario, and would not
increase (quite long already) time of xen-create-image.
Is there a way to install chef with only chef-client recipe? Or is it
generally considered "ok" to do it the (1) way?
we are creating chef nodes using xen-create-image. I am creating a
separate role, which is supposed to install chef via omnibus. There
are two approaches to that:
run chef-client to fully install the system during xen-create-image
phase (in chroot)
install chef the way that after first reboot it would run
chef-client and completely configure by itself.
I would prefer (2), because it is more "real" scenario, and would not
increase (quite long already) time of xen-create-image.
Is there a way to install chef with only chef-client recipe? Or is it
generally considered "ok" to do it the (1) way?
chef-client or its dependency does not stop (and xen-create-image
fails while unmounting the image). Logs are unhelpful. After some
digging I think I will be able to find and fix it.
When running chef-client for the first time, chef-client sees its
hostname same as the host hostname... Which is severe. And I could
find no way to change hostname in chroot without affecting the host.
So I will try to make sure chef-client is started on its first
reboot.. And configure itself properly.
Why do you not want to use knife bootstrap or vagrant? Installing chef
client in the template image seems like the wrong way around to me...
On Jun 2, 2012 12:07 PM, "Motiejus Jakštys" desired.mta@gmail.com wrote:
we are creating chef nodes using xen-create-image. I am creating a
separate role, which is supposed to install chef via omnibus. There
are two approaches to that:
run chef-client to fully install the system during xen-create-image
phase (in chroot)
install chef the way that after first reboot it would run
chef-client and completely configure by itself.
I would prefer (2), because it is more "real" scenario, and would not
increase (quite long already) time of xen-create-image.
Is there a way to install chef with only chef-client recipe? Or is it
generally considered "ok" to do it the (1) way?
chef-client or its dependency does not stop (and xen-create-image
fails while unmounting the image). Logs are unhelpful. After some
digging I think I will be able to find and fix it.
When running chef-client for the first time, chef-client sees its
hostname same as the host hostname... Which is severe. And I could
find no way to change hostname in chroot without affecting the host.
So I will try to make sure chef-client is started on its first
reboot.. And configure itself properly.
On Sun, Jun 3, 2012 at 5:39 PM, Jesse Campbell hikeit@gmail.com wrote:
Why do you not want to use knife bootstrap or vagrant? Installing chef
client in the template image seems like the wrong way around to me...
It's not in template, it's installed during VM bootstrapping phase.
Just like you would install openssh to connect to server, you install
chef to autoconfigure itself.
This way additional "knife bootstrap" phase is unnecessary.
Actually, I copied and adjusted puppet role from xen-utils/role.d/ to
make it work with Chef.
Anyway, I solved the problem by creating an init script which
registers to chef on first boot, and removes itself when the
registration is successful.