Chef Server to Rest API

230 views
Skip to first unread message

Jonathan Fontanez

unread,
Oct 14, 2012, 3:23:58 PM10/14/12
to sereng...@googlegroups.com
I could not tell from the current documentation but if I understand the architecture from the source am I correct in assuming that once the Serengeti server receives a REST a rest, for example to build a new hadoop cluster, then a new task is configured, a chef JSON configuration is created with the appropriate references to recipes and configuration data, then scheduled for delivery across an AMQP channel for execution by the CHEF server?

Also briefly saw some threading code in the source, didn't see any code though to manage the thread lifecycle via any webcontextlisteners or hooks to spring container events. Given that the server portion is running in web container it seems like this could potentially lead to memory leaks if the application is reloaded (wasn't sure currently if that could occur outside the entire Serengeti vm being restarted).  


- Jonathan Fontanez

Jesse Hu

unread,
Oct 14, 2012, 9:13:20 PM10/14/12
to sereng...@googlegroups.com
Hi Jonathan,

You're exactly correct : "once the Serengeti server receives a REST a rest, for example to build a new hadoop cluster, then a new task is configured, a chef JSON configuration is created with the appropriate references to recipes and configuration data".  And it will spawn a process to call the Ironfan CLI API (written in Ruby) with the cluster definition in the JSON file, and Serengeti WebService and the spawned Ironfan Ruby Process will use RabbitMQ to exchange cluster data (e.g. the creating progress, created VM's name/ip/actions, or failure).

在 2012年10月15日星期一UTC+8上午3时23分58秒,Jonathan Fontanez写道:

Jonathan

unread,
Oct 15, 2012, 10:59:02 AM10/15/12
to sereng...@googlegroups.com, sereng...@googlegroups.com
Thanks makes sense now. Task received in listener which structures an ironfan call (the base string of the command being defined in the serengeti.properties). New task is submitted to executorservice defined in taskmanager.

Ironfan defines the Recipes for big data related operations and still uses knife for the underlying command. Knife commands are wrapped in the ironfan proxy defined in distribute/sbin.

Sent from my iPhone
--
 
 
 

Jesse Hu

unread,
Oct 15, 2012, 9:55:44 PM10/15/12
to sereng...@googlegroups.com
exactly!

在 2012年10月15日星期一UTC+8下午10时59分07秒,Jonathan Fontanez写道:
Reply all
Reply to author
Forward
0 new messages