"Linux" "Services" "Configuration" puppet

Source: Internet
Author: User

---restore content starts---

1. Introduction

1.1. Official website: https://docs.puppet.com/

1.2. Puppet is an IT Infrastructure automation management tool whose entire life cycle includes: provisioning,configuration,orchestration,reporting

1.3. Puppet is a master/agent model, but the agent can perform the operation independently, the agent is the core part that really performs the corresponding management operation, he will periodically go to master to request the configuration related to himself

1.4. Puppet mode of operation:

Declarative, model-based:

Definition: Defining basic configuration Information using the puppet configuration language

Simulation: Simulated test run

Force: Forces the current to conform to the defined target State

Report: Send execution results to recipients via puppet API

1.5. Puppet has three levels:

Configuration language

Transaction layer

Resource Abstraction Layer

Resource types: such as users, groups, files, services, cron tasks, and so on

Separation of attributes and States from their implementation methods

Desired status

1.6. Puppet Core components: Resources

List of resources: manifests

Resource lists and resource definitions in the list depend on files, templates, and other data that are organized as "templates" for specific structures

2. Installation

2.1. Agent:puppet, Facter

2.2. Master:puppet-server

3. Command

3.1. Puppet:

The usage format of the command:

Usage:puppet <subcommand> [Options] <action> [options]

Get all of the supported resource types:

# puppet Describe-l

# Puppet describe Resource_type

3.2. Define resources:

Type {' title ':

attribute1 = value1,

Attribute2 = value2,

}

Type must be lowercase: Title must be unique under the same type;

Common resource types:

User, group, file, package, service, exec, Cron, notify

Group

Manage Group Resources

Common Properties:

Name: Group name, Namevar

Gid:gid

System:true,false

Ensure:present,absent

Members: Member in Group

User

Manage users

Common Properties:

Comment: Comment information

Ensure:present,absent

Expiry: Expiration period

GID: Basic Group ID

Groups: Additional groups

Home: Home Directory

Shell: Default shell

Name:namevar

System: Is it user, True|false

Uid:uid

Password

  

File

Manage files, directories, symbolic links, etc. content can be given directly through the contents property, or can be downloaded from a remote server path via the Source property;

Indicate the source of the file content

Content: Directly to the contents of the file, support \ n, \ t;

Source: Download location from the specified location;

Ensure:file,directory,link,present,absent

Common Properties

Force: Forced operation, available value Yes,no,true,false

Group: Genus

Owner: Master

Mode: permissions, support octal format permissions, and U,g,o's empowerment mode

Path: Destination Path

Source: The path to the origin file, which can be a local file path (stand-alone model), or you can use the Puppet:///modules/module_name/file_name

"Linux" "Services" "Configuration" puppet

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.