设为首页 收藏本站
查看: 920|回复: 0

[经验分享] Ansible vs Chef

[复制链接]

尚未签到

发表于 2015-11-26 07:45:08 | 显示全部楼层 |阅读模式
  Postedby ScriptRock  Jul 17, 2014 8:00:00 AM
  This is a tale of a newcomer vsa relative oldie in the Configuration Management (CM) arena. Both are tools tohelp the sysadmin or devops professional to better manage large numbers ofservers. They excel at stuff like repetitive task automation, simultaneousdeploymentof apps and packages to a group of servers, or configuration andprovisioning of new servers from scratch.
What They Are, How They Work
  Chefwas originally released in 2009 - in the world of CM tools, that’s an eternityago. It is supported by parent sponsor Opscode, and is frequently compared andcontrasted to that other old-timer CM tool Puppet. Like Puppet, Chef is alsowritten in Ruby, andits CLI also uses a Ruby-based DSL. Chef utilizes amaster-agent model, and in addition to a master server, a Chef installationalso requires a workstation to control the master. The agents can be installedfrom the workstation using the ‘knife’ tool that usesSSH for deployment,easing the installation burden. From there managed nodes authenticate with themaster through certificates. Chef doesn't yet have a well-formed push feature,though beta code is available to do this. But in the meantime the implicationis thatagents must be configured to check in with the master periodically andinstantaneous master-to-agent rollout of changes isn't really possible.Continuing with the kitchen metaphor (see ‘knife’ above), Chef configs arepackaged into JSON files called ‘recipes’.Also, the software can run in eithera client-server or in a standalone mode called ‘Chef-solo’.
  Ansibleis quite different from Chef. It is similar to another upstart, Salt, than tothe old boys Chef and Puppet. It was developed and first released in early 2012by the parent company AnsibleWorks, and is starting to gain a dedicatedfollowing despite itsyouth and untested-ness. It is written in Python and onlyrequires the Python libraries to be present on the servers to be configured,which anyway is the default on almost all Linux distros today. Ansible’s USP’sare its light weight, relative ease of use andspeed of deployment compared toother CM tools. For example you don’t need to learn Ruby - Ansible packages allcommands into YAML modules called playbooks - as long as your preferredlanguage can output JSON modules, you’re good to go. Ansible also does awaywiththe need for agents; all master-agent communication is handled either viastandard SSH commands, or the Paramiko module which provides a Python interfaceto SSH2. An added bonus is the SSH’s excellent inbuilt security.
Support, Performance, Ease of Use
  Chefis an older product, so its documentation is better than Ansible’s. That said,there are complaints by many new to Chef that it is quite confusing to learncompared to the blissfully simple Ansible. Chef offers support for Linux, *nix,and Windows. Thebrowser-based GUI is quite good (again, no surpriseconsidering it’s been around for a few years), although it’s not as complete asPuppet’s, lacking features like reporting and advanced config options. All inall, Chef’s relative maturity means it may appealto corporations, who place apremium on stability, more than individuals.
  ITguys are famous for avoiding documenting anything, so it’s no surprise thatAnsible’s documentation is still a weak point. This, however, is somewhatmitigated by how easy it is to learn. Ansible is currently only available forLinux and Unix, and its GUIis terrible compared to Chef’s – it’s not evensynced to the CLI, so you may occasionally find that the GUI and CLI givedifferent results of a query. Ansible’s agent-less push-mode using the ZeroMqimplementation at the transport layer means quick deploymentand very lowperformance overhead; the caveat is that it’s just not as flexible and powerfulas using agents.
Conclusion
  Firstoff, any admin or devops will be mighty glad to have such tools in theircorner; just a few years ago there was much less choice in this field. Choosingeither of them is a win, and your life will be richer and easier for it.
  Thatsaid, if you must choose between them, consider your own needs carefully firstand weigh them against what each solution offers. You can use the comparisontable below to compare Chef and Ansible.
  
  Pros
  Cons
  Chef
  More mature solution.
  Better documentation (slightly).
  Larger community, with a large collection of modules and configuration recipes.
  Support for Linux, Unix, Windows
  Ties users to Ruby.
  Doesn’t support push.
  Relies on JSON which is not as friendly as YAML.
  Not as easy to learn and deploy.
  Ansible
  Fast, agent-less deployment and communication.
  CLI supports almost any programming language.
  Uses Python, which is omnipresent in Linux distros.
  Excellent security using SSH / SSH2.
  Still very new; not yet tried and tested.
  GUI still underdeveloped.
  No support for Windows/ Mac OS.
  References
  http://probably.co.uk/puppet-vs-chef-vs-ansible.html
  http://benscofield.com/on-ansible/
  http://www.infoworld.com/d/data-center/review-puppet-vs-chef-vs-ansible-vs-salt-231308?page=0,1
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-143591-1-1.html 上篇帖子: 【codechef】Chef and Polygons(灵活题,坑题) 下篇帖子: 【codechef】Chef and the Number Sequence(构成最长公共子序列为L的可能性)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表