📜  Ansible与Chef-JavaPoint

📅  最后修改于: 2020-12-26 12:42:20             🧑  作者: Mango

Ansible vs厨师

Ansible和Chef都是最受欢迎的配置管理工具。两种工具都可以完成许多相同的任务,每种工具都有不同的优势,并且它们以不同的方式执行任务。

本教程将探讨这些工具的优缺点。在继续之前,请看一下Ansible and Chef。

Ansible

Ansible是一个开源IT引擎,可自动执行应用程序部署,云供应,内部服务编排和其他IT工具。

Ansible易于部署,因为它在客户端不使用任何代理程序自定义安全性基础结构,而无需通过将模块推送到客户端。这些模块在客户端本地执行,并将输出推回Ansible服务器。

它可以使用SSH密钥轻松连接到客户端,从而简化了整个过程。客户端详细信息(例如主机名IP地址SSH端口)存储在文件中,这些文件称为清单文件。如果您创建并填充了清单文件,则Ansible可以使用它。

Ansible使用剧本来描述自动化作业,使用剧本来使用简单的语言,即YAML 。 YAML是一种人类可读的数据序列化语言,通常用于配置文件,但可以在存储数据的许多应用程序中使用。

一个显着的优势是,即使是IT基础结构支持人员也可以阅读和理解该手册,并在需要时进行调试。

Ansible专为多层部署而设计。 Ansible不会一次管理一个系统,而是通过描述所有系统相互关联来对IT基础架构进行建模。 Ansible完全没有代理,这意味着Ansible通过SSH (默认情况下)连接节点来工作。如果需要其他连接方法(例如Kerberos), Ansible将为您提供选择。

厨师

Chef是一个功能强大的自动化平台,可以将基础结构转换为代码。无论您是在本地,云还是混合环境中进行操作。

Chef可以自动在整个网络中部署,配置管理基础架构。厨师是一种开放源代码的云配置,它将系统管理任务转换为可重用的定义,也称为配方和食谱。

Chef在Windows,AIX,Enterprise Linux发行版,Solaris,FreeBSD,Cisco IO和Nexus等不同平台上运行。

它还支持云平台,例如Amazon Web Services(AWS),Google Cloud Platform,OpenStack,IBM Bluemix,HPE Cloud,Microsoft Azure,VMware vRealize Automation和Rackspace。

以下是Ansible和Chef之间的一些主要区别:

Parameters Ansible Chef
Availability Ansible runs with a single active node, called the Primary instance. If the primary goes down, there is a Secondary instance to take its place. When there is a failure on the primary server, which is a chef server, it has a backup server to take the place of the primary server.
Easy to setup Ansible has only a master running on the server machine, but no agents running on the client machine. It uses an SSH connection to log in to client systems or the nodes you want to configure. Client machine VM requires no unique setup. That’s why it is faster to setup! Chef has a master-agent architecture. Chef server runs on the master machine, and Chef client runs as an agent on each client machine. And also, there is an extra component called workstation, which contains all the tested configurations and then pushed to the central chef server. That’s why it is not that easy.
Management Easy to manage the configurations as it uses YAML (Yet Another Markup Language). The server pushes configurations to all the nodes. Suitable for real-time application, and there is immediate remote execution. You need to be a programmer to manage the configurations as it offers configurations in Ruby DSL. The client pulls the configurations from the Server.
Configuration language Ansible uses YAML (Python). It is quite easy to learn and its administrator oriented. Python is inbuilt into most Unix and Linux deployments, so setting the tool up and running is quicker. Chef uses Ruby Domain Specific Language (Ruby DSL). It has a Steep Learning Curve and its developer-oriented.
Interoperability The Ansible server has to be on Linux/Unix machine. As well as Ansible supports windows machines. Chef Server works only on Linux/Unix, but Chef Client and Workstation can be on windows as well.
Pricing The pricing for Ansible Tower for standard IT operations up to 100 nodes is $10,000 per year. This includes 8*5 support, whereas premium offers 24*7 support for $14000 per year. Chef Automate gives you everything you need to build, deploy in $137 node per year.
Authoritative configuration Ansible’s authoritative configuration comes from its deployed playbooks, which are perfect as source control systems. Or the Ansible method is more accessible and makes more sense. The chef relies on its server as the authoritative configuration, and those servers require uploaded cookbooks, which means making sure the latter are consistent and identical.