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


Chronological Thread 
  • From: Daniel Cukier < >
  • To:
  • Subject: [chef] Re: Re: Bootstrapping a Chef Node using a Java
  • Date: Wed, 3 Aug 2011 13:46:21 -0300

Thanks John and Noah.

In fact, I did some tests and it won't be possible to run chef inside the JVM. My only option is to provision the machine using jcloud and then run the bootstrap scripts via ssh.

John, where can I find the bootstrap templates you mentioned?

Thanks


On Tue, Aug 2, 2011 at 7:49 PM, John E. Vincent (lusis) <lusis.org+ "> > wrote:

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" < " target="_blank"> > 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.

§