Puppet Organizational Structure

Source: Internet
Author: User
Tags syslog node server

   树结构如下:        |-- puppet.conf   #主配置配置文件        |-- fileserver.conf #文件服务器配置文件        |-- auth.conf     #认证配置文件        |-- autosign.conf # 自动验证配置文件        |-- tagmail.conf  #邮件配置文件(将错误信息发送)        |-- manifests     #文件存储目录(puppet 会先读取该目录的.PP 文件)        |   --nodes        |   |    | puppetclient.pp        |   |-- site.pp   #定义puppet 相关的变量和默认配置。        |   |-- modules.pp  #加载class 类模块文件(include syslog)        |-- modules        #定义模块        |   -- syslog     #以syslog 为例        |        |-- file        |        |-- manifests        |        |   |-- init.pp #class 类配置       |        |--- templates    #模块配置目录        |        |   |-- syslog.erb #erb 模板
Important Concepts

Resources : Defines the core components of the target State;

core resources include : Notify, Package, group, user, file, exec, cron, service, etc.

Modules : resource-centric, a collection of classes, such as Mod1,mod2

node : The managed host as the core, such as Node1,node2

Puppet the definition of the target State by using the module + node method

manifest: checklist, used to define and save resources, is a resource organization tool;

facter: How to obtain the resource usage of each managed node;

Common structural Finishing

Read the countless information on the Internet, through the hundreds of millions of drawings out of the following three kinds of structure, red for the root directory, the orange color of the directory, the blue representation of the file. Because I am in the exploration puppet, so not good to say who is bad, according to my current personal understanding, I think the figure II is suitable for my company, Linux server is not many, only 70 or so, the other hundreds of servers are Windows, with no puppet. Figure one, too simple, if the node server a lot, the structure is bound to be a bit messy, figure three, too fine, on the scale of thousands of servers useful.

Write base.pp Feature Description: Install the cron package and start the service
vim base.pp----------------------class cron::base {   package { cron:  name => $operatingsystem ?  {#facter 获取客户端操作系统确定包的名称  ubuntu => "cron",  debian => "cron",  redhat => "vixie-cron",  centos => "vixie-cron", },  ensure => present,  }  

Puppet Organizational Structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.