+ All Categories
Home > Documents > Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and...

Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and...

Date post: 17-Apr-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
20
EffOne Monitoring System Installation of Puppet (Server & Client) Document Control Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 29 June 2022 Document Version 1.0 Prepared By Srinu Venigalla Approved By [AES] Date : Approved By [EffOne] Date: Revision History Revision Number Date Author Sections amended or changed Installation and configuration Guide – Puppet Version 1.0 Confidential Page 1/20 6/29/2022
Transcript
Page 1: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Document Control

Document Name Install Puppet Server and Client Nodes

Status Initial Draft

Last Updated 18 May 2023

Document Version 1.0

Prepared By Srinu Venigalla

Approved By [AES] Date :

Approved By [EffOne]

Date:

Revision History

Revision Number Date Author Sections amended or changed

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 1/18 5/18/2023

Page 2: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Contents

Document Control.......................................................................................................................1

Revision History..........................................................................................................................1

Contents..................................................................................................................................... 2

System Applicability....................................................................................................................4

Documents referenced prior to execution of tasks.....................................................................4

Overview.....................................................................................................................................4

What are the alternative solutions?.....................................................................................................4

Puppet operates in two different Modes:.............................................................................................5

Server less Puppet..............................................................................................................................5

Master/Agent Mode Puppet.................................................................................................................5

How Puppet works?....................................................................................................................6

Components, that makes Puppet more flexible and powerful....................................................6

Resources and Resource types..........................................................................................................6

Resource Types..................................................................................................................................7

Puppet Manifests.................................................................................................................................8

Puppet Modules..................................................................................................................................8

Puppet Facts....................................................................................................................................... 8

Puppet Plugins............................................................................................................................9

Puppet Tools:......................................................................................................................................9

puppetmaster (puppet master daemon)...........................................................................................9

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 2/18 5/18/2023

Page 3: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

puppet (puppet client agent)............................................................................................................9

puppet ca (Puppet Cert Tool)..........................................................................................................9

ralsh (puppet resource management shell).....................................................................................9

Puppet-inspect (Puppet Inspector tool)...........................................................................................9

factor (A library tool).........................................................................................................................9

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 3/18 5/18/2023

Page 4: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

System Applicability

This document applies install Puppet server and client installation on Centos 6.3

Documents referenced prior to execution of tasks

Overview

This document contains the procedure for installing Puppet server and client nodes for effective

system administration, automating repetitive administrative tasks and with platform independent.

Below is some of the system management tasks that organizations want to automate:

 Tasks related to Software/Package Installation

1. Tasks related to the changes to be made to the configuration files.

2. Tasks related to Scheduling jobs

3. Tasks related to Installing, Configuring and managing various services.

Traditionally, system administrators trying to solve above challenges with the help of their awesome scripting knowledge and in-depth system administration experience. But there are some problems with these method, those are

1. Complexity involved in rollback the configuration changes

2. After certain period, we will lose the track of configuration changes that applied to a machine

3. And most importantly, it requires a whole lot of efforts and people to keep up these scripts based automation system.

What are the alternative solutions?Puppet Tool (from puppetlabs.com) is one of the popular open-source platforms, that allows Automation of System Management Tasks for thousands of servers. Puppet helps systems administrators to build a robust environment with the ability to rollback any configuration change to its previous state, without much complexity.

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 4/18 5/18/2023

Page 5: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

The biggest challenge in automating system configuration understands the complex relationships between servers, the services they give and the objects that comprise the services. Puppet addresses this challenge with the help of, easy to use, puppet language.

I started experimenting with puppet for past several days, as I was personally impressed with the way that puppet assists to the systems administrators  I am going to share my experiments with puppet with you ( for my own benefit of learning through discussion) in a series of puppet tool posts. This is the first post of the series

There are Two Different Software Releases of Puppet:

The first one is Puppet Open Source, which can be downloaded and can be deployed without any cost. 

The second one is, Puppet Enterprise which had some additional features like – a Production-grade puppet master stack, a web console for report generation, powerful orchestration features and cloud provisioning tools – in addition to professional support and regular updates from puppet labs.

Puppet operates in two different Modes:

Server less Puppet Operates with the help of

Resources

Manifests - written by using simple declarative puppet language

Master/Agent Mode Puppet Operates with the help of

Resources

Manifests  - written by using simple declarative puppet language

Puppet Master Service and Client Agents

Puppet DB

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 5/18 5/18/2023

Page 6: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

How Puppet works?

In simple terms, puppet is a declarative language to define the customized system configuration for each node, and distribute the configuration to each node using puppet master and client agents. On each node, there will be a puppet library which converts the configuration (defined by puppet language) into system understandable format.

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 6/18 5/18/2023

Page 7: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Components, that makes Puppet more flexible and powerful

Resources and Resource typesPuppet treats each component of the server, which needs configuration, as a resource. For example, A resource could include a user account, a configuration file or a running service. Puppet classifies the resources into multiple resource types (as of today, puppet support supports around 48 resource types), and puppet also allows us to define our own custom type resources.

Below are some of the resource types that you might be interested to know:

Resource Types cron exec file filebucket group host interface k5login macauthorization mailalias maillist mcx mount notify package resources router schedule scheduled_task selboolean selmodule service ssh_authorized_key

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 7/18 5/18/2023

Page 8: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

sshkey stage tidy user vlan yumrepo zfs zone zpool

Puppet Manifests The programs written in puppet language are called as puppet manifests. And they commonly use the extension as “.pp”. The Core part of the Puppet manifest is all about resource declarations. In addition to the resource declaration, manifests also use conditional statements, grouping resources into collections and reference code in other manifests.

A simple Manifest, to create a user named “srinivas.venigalla”

# cat >create-user.ppuser { “srinivas.venigalla”:ensure=>present,}

Note: Actually, puppet don’t directly apply these manifests against the resources, during the configuration deployment. Instead, manifests will be compiled into a “catalog” that represents resources in a dependency order.

Puppet ModulesModule is nothing but self-contained bundle of Code and data. You can write your own modules for your customized requirements, or you can directly use the pre-built modules available in puppet forge.It is easy to use Puppet modules in puppet manifests, below example shows to use apache module in a manifest

#cat my-manifest.pp:::output truncated ::::includeapache::: output truncated ::::

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 8/18 5/18/2023

Page 9: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Puppet FactsFacts are nothing but the pieces of information, about hardware and operating system, which are specific to each managed hosts. Facts are very important information for puppet because they decide the course of action on how a manifest should apply on a specific hosts based on its operating system and hardware.

Puppet Plugins

Custom types and facts are stored in modules, and these custom types and facts are gathered together to a common location. And puppet makes these locations distributed via file mounts called puppet plugins.

Puppet Tools:Puppet provides several executable binaries to run as a sub-command with a single puppet tool called “puppet”. And below are some of the sub-commands that you can use with puppet

puppetmaster (puppet master daemon)

Is a central management daemon which serves compiled configurations, files and custom plugins to the managed nodes. Additionally, it puppet master also acts as a certificate authority.

puppet (puppet client agent)

It is a agent runs on each managed node, and will wake up every 30mins (default value) to check with puppetmasterd for any new configuration information available for that particular managed node.

puppet ca (Puppet Cert Tool)

It is a tool used to sing, list and examine certificates used by puppet to secure the connection between the puppet master and agents.

ralsh (puppet resource management shell)

A shell interface that allows system administrators to interactively view and manipulate resource locally.

Puppet-inspect (Puppet Inspector tool)

It is a tool used to perform an inspection on current status of the system.

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 9/18 5/18/2023

Page 10: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

factor (A library tool)

Used by every puppet managed node, to provide information (called facts) about the hardware and operating system to the puppet master server. These facts can be used in manifests as global variables.

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 10/18 5/18/2023

Page 11: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Puppet Master Installation:

1) Install the puppet yum repo rpm

2) Insatll yum puppet server and puppet and facter using puppet labs yum repos

3) Check the DNS was resoling at client and server

4) Start the puppet server and client

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 11/18 5/18/2023

Page 12: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Linux client Installation:

1) Install the puppet yum repos rpm

2) Install the puppet master through yum

Windows Client Installation:

1) Choose the windows installer and install the windows puppet by giving the puppet master FQDN

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 12/18 5/18/2023

Page 13: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

SSL Authentication:

1) Check the puppet master daemon is listening on client node

2) From the client node, we have to send the certificate request

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 13/18 5/18/2023

Page 14: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

3) From the server end check for the certificate requests

4) Sign on the certificate at server side

Define manifest for the puppet clients at the puppet master end:

For Linux client:

1) Write manifests for the linux client

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 14/18 5/18/2023

Page 15: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

For Windows client:

1) Write manifests for the Windows client

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 15/18 5/18/2023

Page 16: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Testing at the client end:

Linux client:

We write the manifest and test it at the client end it executed successfully

For more testing

1) I stopped the ntpd service

2) I uninstall the nano package

After again tested the puppet it restated the stopped ntpd service and tried install nano package but there was an issue with yum repo, so I was unable to fetch the nano package

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 16/18 5/18/2023

Page 17: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Windows Client:

After fetching the client

It created a file on desktop with specified content

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 17/18 5/18/2023

Page 18: Restarting Server€¦  · Web viewDocument Control. Document Name Install Puppet Server and Client Nodes Status Initial Draft Last Updated 7 July 2014 Document Version 1.0 Prepared

EffOne Monitoring System

Installation of Puppet (Server & Client)

Conclusion:

Successfully installed the puppet and managed puppet on master and puppet client end.

Installation and configuration Guide – Puppet Version 1.0

Confidential Page 18/18 5/18/2023


Recommended