Home  >  Article  >  What language is puppet written in?

What language is puppet written in?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2020-01-06 11:22:092424browse

What language is puppet written in?

1. Basic principles of Puppet

Puppet is an open source management and configuration tool authorized using the GPLV2X protocol. puppet It is written in ruby, so the syntax of puppet is similar to ruby, both are very simple high-level object-oriented languages. It can run either through a client-server approach or independently. Puppet can provide system administrators with convenient and fast automated system management.

2. Puppet workflow

The client puppet-client initiates an authentication request to puppet-master, or uses a signed certificate.

puppet-master tells puppet-client that it is legal.

puppet-client calls facter. Facter detects some variables of the host, such as host name, memory size, IP address, etc. puppet-client sends this information to the server through an SSL connection.

puppet-master The server detects the host name of the client, then finds the node configuration corresponding to the manifest, and parses this part of the content. The information sent by the facter can be processed as variables. Only the code involved in the node is parsed, and other codes not involved are not parsed. Parsing is divided into several stages. The first is grammar checking. If the grammar is wrong, an error will be reported; if the grammar is correct, parsing will continue. The parsing result will generate an intermediate "pseudocode" (catelog), and then the pseudocode will be sent to the client. .

puppet-client receives the "pseudocode" and executes it.

Puppet-client determines whether there is a file file during execution, and if so, initiates a request to fileserver.

puppet-client determines whether report is configured. If it is configured, the execution result is sent to the server.

The puppet-server writes the execution results of the puppet-client into logs and sends them to the reporting system.

For more FAQ, please visit the PHP Chinese website.

The above is the detailed content of What language is puppet written in?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use usb switchNext article:How to use usb switch