Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do Puppet and Chef use Ruby? [closed]

We all know that Puppet and Chef are the superstars of the IT automation area, and they are developed in Ruby (though Chef 11 server was rewritten in Erlang).

In my working environment, a very large group of the operations team uses Python as the primary language to develop operation tools or basic system applications.

I want to find why both Puppet and Chef were written in Ruby? What are the advantages? Ruby supports DSLs well. Can Python do such thing?

like image 947
anguskwan Avatar asked May 24 '13 03:05

anguskwan


1 Answers

From Luke Kanies, Puppet’s author:

I was a sysadmin by trade and had mostly developed in perl, but when I tried to write the prototype I had in mind, I couldn’t get the class relationships I wanted in perl. I tried Python, because this was around 2003 and Python was the next new thing and everyone was saying how great it is, but I just can’t seem to write in Python at all. A friend had said he’d heard Ruby was cool, so I gave it a try, and in four hours I went from never having seen a line of it to having a working prototype. I haven’t looked back since then, and haven’t regretted the choice.

like image 191
Alcides Queiroz Avatar answered Sep 23 '22 02:09

Alcides Queiroz