Is there any way to install OS using chef


I was wondering, since chef is an automation tool, is there any way to install OS on chef nodes.

Assuming I’ve a VM created not booted with any OS, then can I make use of chef and load OS into that VM? or bootstrap a node with an OS installation script?

Take a look at Packer. This will allow you to install Just Enough Operating System to set up network, an initial user and any other bootstrap things.

It also provides an option to select which Configuration Management tool you want (Chef), and the location of the Chef Server.

1 Like

If you only need one OS, the easiest solution may be to use that OS’ unattended functionality.

For my own needs, I wrote a Ruby script that communicates with the VM host, creates the new VM, and installs CentOS using a kickstarter script that in turn includes everything needed for chef, including the validation certificate etc.

This isn’t technically using chef, though, but it works for me.

Kevin Keane
Whom the IT Pros Call
The NetTech
Our values: Privacy, Liberty, Justice

1 Like