用户:Alexanderonepills/沙盒
原作者 | Michael DeHaan |
---|---|
开发者 | Ansible Community / Ansible Inc. / 红帽公司 |
首次发布 | 2012年2月20日 |
当前版本 | 2.7.4(2018年11月30日[1]) |
预览版本 | 2.7.0rc4(2018年9月28日[1]) |
编程语言 | Python, PowerShell, Shell, Ruby |
操作系统 | Linux, 类Unix系统, MacOS, Windows |
语言 | English |
类型 | 组态管理, Infrastructure as Code, Orchestration engine |
许可协议 | 专有软件 / GNU通用公共许可证 |
在计算 (计算机科学)领域, Ansible 是一个提供配置管理和应用程序部署工具的开源软件。[2]. 它运行在许多类Unix系统系统上,可以配置类Unix系统系统和Microsoft Windows。 它使用自己的声明式编程来描述系统配置。
它由Michael DeHaan编写并于2015年被Red Hat收购。与竞争产品不同,Ansible是无代理的 - 通过SSH或远程PowerShell临时连接以执行其任务。
历史
编辑Ansible was developed by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Func framework for remote administration.[3]
The name "Ansible" refers to a fictional instantaneous hyperspace communication system (as featured in Ursula K. Le Guin's Rocannon's World,[4] and Orson Scott Card's Ender's Game).[5][6]
Ansible, Inc. (originally AnsibleWorks, Inc.) was the company set up to commercially support and sponsor Ansible.[7][8] Red Hat acquired Ansible in October 2015.[9][10]
Ansible is included as part of the Fedora distribution of Linux, owned by Red Hat Inc., and is also available for Red Hat Enterprise Linux, CentOS, Scientific Linux and Oracle Linux via Extra Packages for Enterprise Linux (EPEL) as well as for other operating systems.[11]
Architecture
编辑As with most configuration management software, Ansible has a single controlling machine which is where orchestration begins. Nodes are managed by this controlling machine - typically over SSH. The controlling machine describes the location of nodes through its inventory.[12]
In contrast with other popular configuration management software — such as Chef, Puppet, and CFEngine — Ansible uses an agentless architecture,[13] with controlled node not requiring a background daemon.[13]
To orchestrate nodes, Ansible deploys modules to nodes over SSH which are temporarily stored in the nodes and communicate with the controlling machine through a JSON protocol over the standard output.[14] When Ansible is not managing nodes, it does not consume resources on them because no daemons or programs are executing.[13]
设计目标
编辑The design goals of Ansible include:[14]
- Minimal in nature. Management systems should not impose additional dependencies on the environment.[13]
- Consistent. With Ansible one should be able to create consistent environments.
- Secure. Ansible does not deploy agents to nodes. Only OpenSSH and Python are required on the managed nodes.[13][15]
- Highly reliable. When carefully written, an Ansible playbook can be idempotent, to prevent unexpected side-effects on the managed systems.[16] It should be noted, however, that it is entirely possible to have a poorly written playbook that is not idempotent.
- Minimal learning required. Playbooks use an easy and descriptive language based on YAML and Jinja templates.
模块
编辑Modules are mostly standalone and can be written in a standard scripting language (such as Python, Perl, Ruby, Bash, etc.). One of the guiding properties of modules is idempotency, which means that even if an operation is repeated multiple times (e.g., upon recovery from an outage), it will always place the system into the same state.[14]
Inventory configuration
编辑The Inventory is a description of the nodes that can be accessed by Ansible. By default, the Inventory is described by a configuration file, in INI or YAML format,[17] whose default location is in /etc/ansible/hosts
. The configuration file lists either the IP address or hostname of each node that is accessible by Ansible. In addition, nodes can be assigned to groups.[12]
An example inventory:
192.168.6.1
[webservers]
foo.example.com
bar.example.com
This configuration file specifies three nodes: the first node is specified by an IP address and the latter two nodes are specified by hostnames. Additionally, the latter two nodes are grouped under the webservers
group.
Ansible can also use a custom Dynamic Inventory script, which can dynamically pull data from a different system.[18]
Playbooks
编辑Playbooks are YAML files that express configurations, deployment, and orchestration in Ansible,[19] and allows Ansible to perform operations on managed nodes. Each Playbook maps a group of hosts to a set of roles. Each role is represented by calls to Ansible tasks.[20]
Ansible Tower
编辑Ansible Tower is a REST API, web service, and web-based console designed to make Ansible more usable for IT teams with members of different technical proficiencies and skill sets. It is a hub for automation tasks. Tower is a commercial product supported by Red Hat, Inc. but derived form AWX which is open source since September 2017.[21][22][23][24]
There is also another open source alternative to Tower, Semaphore, written in Go.[25][26]
Platform support
编辑Control machines have to be a Linux/Unix host (for example, Red Hat Enterprise Linux, Debian, CentOS, macOS, BSD, Ubuntu[11]), and Python 2.7 or 3.5 is required.[27]
Managed nodes, if they are Unix-like, must have Python 2.4 or later. For managed nodes with Python 2.5 or earlier, the python-simplejson
package is also required.[28] Since version 1.7, Ansible can also manage Windows[29] nodes.[28] In this case, native PowerShell remoting supported by the WS-Management protocol is used, instead of SSH.
Cloud integration
编辑Ansible can deploy to bare metal hosts, virtualized systems and cloud environments, including Amazon Web Services, Atomic, CenturyLink, Cloudscale, CloudStack, DigitalOcean, Dimension Data, Docker, Google Cloud Platform, KVM, Linode, LXC, LXD, Microsoft Azure, OpenStack, OVH, oVirt, Packet, Profitbricks, PubNub, Rackspace, Scaleway, SmartOS, SoftLayer, Univention, VMware, Webfaction, and XenServer.[14][30]
AnsibleFest
编辑AnsibleFest is an annual conference of the Ansible community of users, contributors, etc.[31]
Year | Location |
---|---|
2016 | London |
2016 | San Francisco |
2016 | Brooklyn |
2017 | London |
2017 | San Francisco |
2018 | Austin, Texas |
See also
编辑References
编辑- ^ 1.0 1.1 Releases - ansible/ansible. [30 November 2018] –通过GitHub.
- ^ Staff writer. Overview - How Ansible Works. ansible.com. Red Hat, Inc.: 1. [December 7, 2016].
- ^ Maughan, Mike. An Interview with Ansible Author Michael DeHaan. coloandcloud.com. Maughansem LLC: 1. April 17, 2012 [November 5, 2012]. [失效链接]
- ^ Bernardo, Susan; Murphy, Graham J. Ursula K. Le Guin : a critical companion. Westport, Conn: Greenwood Press. 2006: 18 [2017-09-27]. ISBN 9780313027307. OCLC 230345464.
- ^ Ansible Community. Frequently Asked Questions. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [April 30, 2013].
- ^ DeHaan, Michael. Google Groups Post - Ansible Project. groups.google.com: 1. January 29, 2014 [April 26, 2017].
- ^ About Ansible. Ansible, Inc.: 1. [July 8, 2016]. (原始内容存档于September 5, 2015).
- ^ Bloomberg Research. Ansible, Inc.: Private Company Information. Internet Software and Services. Bloomberg L.P.: 1. [July 8, 2016].
- ^ Novet, Jordan. Source: Red Hat is buying Ansible for more than $100M. venturebeat.com. VentureBeat, Inc.: 1. October 15, 2015 [October 16, 2015].
- ^ Staff writer. Red Hat to Acquire IT Automation and DevOps Leader Ansible. redhat.com. Red Hat, Inc. October 16, 2015 [October 16, 2015].
- ^ 11.0 11.1 Ulianytskyi, Mykola. ansible Download (DEB, RPM, TGZ, TXZ, XZ). pkgs.org. Linux Packages Search: 1. [November 5, 2012].
- ^ 12.0 12.1 Ansible Community. Inventory. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [April 26, 2014].
- ^ 13.0 13.1 13.2 13.3 13.4 The Benefits of Agentless Architecture (PDF). Red Hat, Inc.: 5.
- ^ 14.0 14.1 14.2 14.3 Ansible in Depth (PDF). Red Hat, Inc.: 5.
- ^ Installation Guide — Ansible Documentation. docs.ansible.com. [2018-11-30] (英语).
- ^ Achieving Rolling Updates and Continuous Deployment with Zero Downtime (PDF). Red Hat, Inc.: 7.
- ^ Working with Inventory — Ansible Documentation. docs.ansible.com. [2018-11-30] (英语).
- ^ Ansible Community. Dynamic Inventory. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [November 25, 2016].
- ^ Ansible Community. Playbooks. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [April 26, 2014].
- ^ Ansible Community. Task And Handler Organization For A Role. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [November 25, 2016].
- ^ Redditors. Ansible announces Tower to be Open Source in the near future on AnsibleFest!. reddit.com. Reddit: 1. February 19, 2016 [July 20, 2017].
- ^ Staff writer. The Open Tower Project. ansible.com/open-tower. Red Hat, Inc.: 1. [January 21, 2017].
- ^ AWX project FAQ
- ^ AWX on GitHub
- ^ Semaphore community. Semaphore API. ansible-semaphore.github.io: 1. [July 20, 2017].
- ^ Semaphore community. ansible-semaphore. github.com/ansible-semaphore. Castaway Consulting LLC. [January 21, 2017].
- ^ Ansible Community. Python 3 Support. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [July 6, 2017].
- ^ 28.0 28.1 Ansible Community. Getting started. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [February 6, 2014].
- ^ DeHaan, Michael. Ansible 1.7 is released - Windows beta and more!. ansible.com/blog. The Inside Playbook. Ansible, Inc.: 1. August 6, 2014 [August 7, 2014].
- ^ Ansible Community. List of cloud modules. docs.ansible.com. Ansible Documentation. Red Hat, Inc.: 1. [April 28, 2017].
- ^ AnsibleFest. Ansible. Red Hat, Inc. [October 4, 2018].
External links
编辑- 找不到URL。请在此处指定URL或在维基数据上添加。
Coinage by Ursula Le Guin
编辑Ursula K. Le Guin coined the word "ansible" in her 1966 novel Rocannon's World.[1][2] The word was a contraction of "answerable", as the device would allow its users to receive answers to their messages in a reasonable amount of time, even over interstellar distances.[3]
Although Le Guin invented the name "ansible" for this type of device, fleshed out with specific details in her fictional works, the broader concept of instantaneous or faster-than-light communication had previously existed in science fiction. For example, similar communication functions were included in a device called an interocitor in the 1952 novel This Island Earth by Raymond F. Jones, and the 1955 film based on that novel, and in the "Dirac Communicator", which first appeared in James Blish's short story "Beep" (1954), which was later expanded into the novel The Quincunx of Time (1973).[4]
In Le Guin's works
编辑In her subsequent works, Le Guin continued to develop the concept of the ansible:
- The Dispossessed, Le Guin's award-winning 1974 novel in the Hainish Cycle, tells of the invention of the ansible.[5]
- In The Word for World Is Forest, Le Guin explains that in order for communication to work with any pair of ansibles, at least one "must be on a large-mass body, the other can be anywhere in the cosmos."
- In The Left Hand of Darkness, it is stated that the ansible "doesn't involve radio waves, or any form of energy. The principle it works on, the constant of simultaneity, is analogous in some ways to gravity ... One point has to be fixed, on a planet of certain mass, but the other end is portable."
Any ansible may be used to communicate through any other, by setting its coordinates to those of the receiving ansible. They have a limited bandwidth which only allows for at most a few hundred characters of text to be communicated in any transaction of a dialog session, and are attached to a keyboard and small display to perform text messaging.
Use by later authors
编辑Since Le Guin's conception of the ansible, the name of the device has been borrowed by numerous authors. While Le Guin's ansible was said to communicate "instantaneously",[5] the name has also been adopted for devices capable of communication at finite speeds that are faster than light.
Orson Scott Card's works
编辑Orson Scott Card, in his 1977 novelette and 1985 novel Ender's Game and its sequels, used the term "ansible" for his own fictitious communication device.[6] In Ender's Game, a character stated that "somebody dredged the name ansible out of an old book somewhere."[6]
In the universe of the Ender's Game series, the ansible's functions involved a fictional subatomic particle, the philote.[7] The two quarks inside a pi meson can be separated by an arbitrary distance, while remaining connected by "philotic rays".[7] This concept is similar to quantum teleportation due to entanglement; however, in reality, quark confinement prevents quarks from being separated by any observable distance.
Card's version of the ansible was also featured in the video game Advent Rising, for which Card helped write the story, and in the movie Ender's Game, which was based on the book.[8]
Other writers
编辑Numerous other writers have included ansibles in their fictional works, using that word to refer to a faster-than-light communication device. Notable examples include:
- Vernor Vinge, in the 1988 short story "The Blabber"[9]
- Elizabeth Moon, in the 1995 novel Winning Colors[10]
- Jason Jones, in the 1995 computer game Marathon 2: Durandal[11]
- L.A. Graf, in the 1996 Star Trek: Deep Space Nine novel Time's Enemy[12]
- Dan Simmons, in the 2003 novel Ilium[13]
- Kim Stanley Robinson, in the 2012 novel 2312[14]
- Becky Chambers, in the 2014 novel The Long Way to a Small, Angry Planet
- Joe M. McDermott, in the 2017 novel The Fortress at the End of Time[15]
参见
编辑参考文献
编辑Notes
- ^ Sheidlower, Jesse (编). ansible n.. Science Fiction Citations for the OED. July 6, 2008 [2014-03-15].
- ^ Bernardo, Susan M.; Murphy, Graham J. Ursula K. Le Guin: A Critical Companion 1st. Westport, CT: Greenwood Press. 2006: 18. ISBN 0-313-33225-8.
- ^ Quinion, Michael. Ansible. World Wide Words.
- ^ Nicholls, Peter "Dirac Communicator" in Clute, John and Nicholls, Peter eds. (1995) The Encyclopedia of Science Fiction. New York: St. Martin's Griffin p.337. ISBN 0-312-13486-X
- ^ 5.0 5.1 Le Guin, Ursula K. The Dispossessed mass ppb. New York: Eos/HarperCollins. 2001: 276 [June 1974]. ISBN 0-06-105488-7.
They print Reumere's plans for the ansible. 'What is the ansible?' 'It's what he's calling an instantaneous communication device.'
- ^ 6.0 6.1 Card, Orson Scott. Ender's Game mass ppb. New York: Tor Books. 1994: 249 [August 1977]. ISBN 0-8125-5070-6.
What matters is we built the ansible. The official name is Philotic Parallax Instantaneous Communicator, but somebody dredged the name ansible out of an old book somewhere and it caught on.
- ^ 7.0 7.1 Card, Orson Scott. Xenocide. Orbit. 1991: 40–46. ISBN 978-1-85723-858-7.
- ^ Ender's Game (2013) Movie Script. Springfield! Springfield!. (原始内容存档于2018-04-19).
- ^ Vinge, Vernor. The Blabber. Threats & Other Promises. Riverdale, NY: Baen. 1988: 254. ISBN 0-671-69790-0.
'It's an ansible.' 'Surely they don't call it that!' 'No. But that's what it is.'
- ^ Moon, Elizabeth. Winning Colors mass ppb. Riverdale, NY: Baen. 1995: 89. ISBN 0-671-87677-5.
...when I was commissioned, we didn't have FTL communications except from planetary platforms. I was on Boarhound when they mounted the first shipboard ansible, and at first it was only one-way, from the planet to us.
- ^ Jones, Jason; Kirkpatrick, Greg. Marathon 2: Durandal. Bungie. November 24, 1995.
A connection [?ansible] was left; awaiting the next quiet [?peace]; and though destroyed by the threes, it will scream over the void one time.
- ^ Graf, L.A. [Cercone, Karen Rose; Ecklar, Julia]. Time's Enemy. Star Trek: Deep Space Nine. Invasion, Book 3. Simon and Schuster. 1996: 203. ISBN 978-0-6715-4150-7.
The two Dax symbionts can communicate with each other across space, instantaneously, because they're composed of identical quantum particles. I've become a living ansible, Benjamin.
- ^ Simmons, Dan. Ilium hbk. New York: Eos/HarperCollins. 2003: 98. ISBN 0-380-97893-8.
I can see Nightenhelser madly taking notes on his recorder ansible.
- ^ Robinson, Kim Stanley. 2312. Orbit. 2012: 227. ISBN 978-0-316-19280-4.
- ^ McDermott, Joe M. The Fortress at the End of Time. Tom Doherty Associates. 2017: 1. ISBN 978-0-7653-9280-0.
We are born as memories and meat. The meat was spontaneously created in the ansible's quantum re-creation mechanism, built up from water vapor, hydrogen, carbon dioxide, and various other gases out of storage. The memory is what we carry across from one side of the ansible to the other, into the new flesh.
延伸阅读
- Bloom, Harold (编). Ursula K. Le Guin 1st. New York, NY: Chelsea House. 1986. ISBN 0-87754-659-2.