<分区>
我们都知道 Puppet 和 Chef 是 IT 自动化领域的巨星,它们是用 Ruby 开发的(尽管 Chef 11 服务器是用 Erlang 重写的)。
在我的工作环境中,有很大一部分运维团队使用Python作为主要语言来开发运维工具或基础系统应用。
我想知道为什么 Puppet 和 Chef 都是用 Ruby 写的?有什么好处? Ruby 很好地支持 DSL。 Python 可以做这样的事情吗?
标签 ruby dsl chef-infra puppet
<分区>
我们都知道 Puppet 和 Chef 是 IT 自动化领域的巨星,它们是用 Ruby 开发的(尽管 Chef 11 服务器是用 Erlang 重写的)。
在我的工作环境中,有很大一部分运维团队使用Python作为主要语言来开发运维工具或基础系统应用。
我想知道为什么 Puppet 和 Chef 都是用 Ruby 写的?有什么好处? Ruby 很好地支持 DSL。 Python 可以做这样的事情吗?
最佳答案
来自 Puppet 的作者 Luke Kanies:
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.
关于ruby - 为什么 Puppet 和 Chef 使用 Ruby?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16727224/