Search code examples
javachef-infrabootstrappingknifejclouds

Is there a way to bootstrap a Chef node from pure Java implementation?


Typically one bootstraps a Chef node with boostrap like so:

knife bootstrap mynode.example.com -N mynode -x myuser --sudo --run-list "role[myrole]"

I'm wondering if there is a way to do this from Java without needing Ruby or Chef installed on your OS. For instance, JClouds seems to have a Chef implementation, but I can't tell if it first requires Ruby/Chef installed locally. Ideas?


Solution

  • As Everett pointed out, that is exactly what jclouds-chef does. Check out the guide to see how it works.

    You don't have to install Ruby/Chef or anything neither locally nor in the machines you are going to bootstrap. The only requirement is that the machine you are going to bootstrap has SSH access enabled and can connect to the Internet. jclouds-chef will connect to it and take care of installing Ruby, Chef, and all the requirements and bootstrap the node, just as knife would do.