[chef] Re: Bootstrapping a Chef Node using a Java


Chronological Thread 
  • From: "John E. Vincent (lusis)" < >
  • To:
  • Subject: [chef] Re: Bootstrapping a Chef Node using a Java
  • Date: Tue, 2 Aug 2011 18:49:20 -0400

Daniel,

Take a look at jclouds if you need provisioning in Java. From there, you can either bake in the client in the AMI or shellout to run knife bootstrap. Remember that knife bootstraps are nothing more than a shell script in an ssh session. Take a look at any of the bootstrap templates to get a real idea. All the client node registration is done by chef-client not knife in bootstrap scenarios.

However you aren't going to be able to really reimplement chef in Java and running the client on JRuby isn't possible.

You might be able to use jruby and pull in the chef gems for some API interaction if need be.

In the end, Chef is written in ruby. Whatever awkward requirements are going to have to accept that.

If that's a nonstarter you can also look at creating custom Whirr scripts.

On Aug 2, 2011 6:38 PM, "Daniel Cukier" < "> > wrote:
>
> Hi everybody,
>
> I'm developing a web service in Java on a system that needs to provision, create, remove nodes.
>
> I have this restriction that the web service must be developed in Java. This web service must:
>
>  1 - create nodes on different Cloud environments (EC2, rackspace, openstack, etc) 
>  2 - Bootstrap these nodes with chef and one or 2 roles
>
> How do you suggest creating this web service? I thought about doing system calls to knife, but I don't think this is a good idea. Is there any Java specific library that is similar to knife, a library that I can provision cloud nodes (like knife ec2) and bootstrap chef (life knife bootstrap)?
>
> Thank you very much for the help
>
> Daniel Cukier




Archive powered by MHonArc 2.6.16.

§