Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the basic knowledge of puppet

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will introduce to you what is the basic knowledge of puppet. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.

Puppet basic guide

Puppet, which is the mainstream automation tool for operation and maintenance, has been heard of by most operation and maintenance managers, or is in use or under consideration. Puppet can cooperate with cobbler,puppet or func to realize operation and maintenance automation, simplifying and turning complexity into simplicity.

1. What is puppet?

Puppet is a centralized configuration management system for Linux and Unix platforms. Ruby language is used to manage configuration files, users, cron tasks, software packages, system services and so on. Puppet calls these system entities resources. The design goal of puppet is to simplify the management of these resources and properly deal with the dependencies between resources.

Syntax of 2.puppet

Since puppet is written by ruby, the syntax of ruby is very similar. For an introduction to ruby, see http://ruby-lang.org.

3. How to get the puppet module

Download from puppet Lab: http://projects.puppetlabs.com/projects/1/wiki/Downloading_Puppet

Which resources can be managed by 4.puppet:

It is written in the puppet introduction that he can manage common resources such as file (files), user (users), group (groups), package (software packages), mount (mount), schedule and cron (scheduled tasks), service (services), tidy (cleanup), yumrepo (yum warehouse), sshkey (ssh certification) and so on.

How to install and configure 5.puppet.

1.Puppet is installed on a RedHat/CentOS system

1)。 Install the ruby environment: yuminstallrubyruby-rdoc

2)。 Install puppet:yum-yinstallpuppetpuppet-server

The working mode of 6.Puppet

Puppet is a configuration management tool for the Cramp S architecture that installs the puppet-server package (called Puppetmaster) on a central server. Install the puppet client software (known as PuppetClient) on the target host that needs to be managed. When the client connects to the Puppetmaster, the configuration file defined on the Puppetmaster is compiled and run on the client. By default, each client communicates with the server every half hour to confirm the update of the configuration information. If there is new configuration information or if the configuration information has changed, the configuration will be recompiled and released to each client for execution. You can also actively trigger an update of configuration information on the server to force each client to configure. If the configuration information of the client is changed, it can obtain the original configuration from the server to correct it.

Introduction to 7.puppet configuration file

Master profile (puppet.conf):

1)。 Profile Namespace:

Common configuration options for main

Puppetd client configuration options

Puppetmasterd server configuration options

2) .main namespace option:

Confdir configuration file directory, default is / etc/puppet

Vardir dynamic data directory, default is / var/lib/puppet

Logdir log directory, default is / var/log/log

RundirpuppetPID directory, default is / var/run/puppet

Statedirstate directory, default is $vardir/state

Statefilestate file, default is $statedir/state.yaml

SsldirSSL certificate directory, default is $vardir/ssl

Displays trace information when an error occurs in trace. Default is false.

Time period for filetimeout to detect changes in profile status (in seconds). Default is 15 seconds.

Syslogfacility specifies that the syslog function is user-level, and the default is daemon-level

3) .uplopetmasterd namespace option:

Users executed by user background processes

Groups executed by group background processes

Mainfestdirmainfests file storage directory, default is $confdir/mainfests

Name of the mainfestmainfest site file, default is site.pp

Nic address interface bound by bindaddress background process

The port executed by the masterport background process. Default is 8140.

4) .puppet namespace option:

Serverpuppetpuppet server name, default is puppet

Time interval configured for runintervalsecondspuppet application. Default is 1800 seconds (0.5h)

Puppetdlockfiefilepuppetlock file location, default $statedir/puppetdlock

The port executed by the puppetportport background process. Default is 8139.

File Service profile (fileserver.conf):

[files] path/var/lib/puppet/filesallow192.168.1.*allow*.test.comdeny*.example.com

Path defines the file storage path and controls access through allow/deny.

8.puppet command set

1) .puppet is used to execute independent mainfests files written by the user

# puppet-l/tmp/manifest.logmanifest.pp

2) A client program that runs on the managed host

# puppetd-serverpuppet

3). Server programs run on the management machine by Secretpetmasterd

# puppetmasterd

4) .accounpetcapuppet authentication program

# puppetca-ltest1.test.com+test2.test.com#puppetca-stest1.test.com## sign for test1.test.com

5) .uplopetrun is used to connect to the client and force the local configuration file to run

# puppetrun-p10-hosthost1-hosthost2-tremotefile-twebserver

6) tools used by the .filebucket client to send files to puppetfilebucket

# filebucket-b/tmp/filebucket/my/file

7) .ralsh transform configuration information to puppet configuration code

# ralshusersky above is the whole content of what is the basic knowledge of puppet. For more content related to the basic knowledge of puppet, you can search the previous articles or browse the following articles to learn! I believe the editor will add more knowledge to you. I hope you can support it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report