Jump to content

GSTN - Satelite Installation and configuartion The Puppet Agent

From TetraWiki


Installing and Configuring the Puppet Agent[edit]

These steps show how to install and configure the Puppet agent on a host. The Puppet agent must be configured so that Red Hat Satellite Server can list all available hosts in All Hosts.== Installing and Enabling the Puppet Agent: ==

  • Open a terminal console and login as root on the command line.
  • Install the Puppet agent using the following command:


# yum install puppet== Configuring the Puppet Agent: ==

Prerequisites:

You must meet the following conditions before continuing with this task:* The host must be registered to the Red Hat Satellite Server.

  • The Red Hat Common repository must be enabled.
  • Puppet packages must be installed on the host.

Configure the Puppet agent by changing the /etc/puppet/puppet.conf file:[edit]

# vim /etc/puppet/puppet.conf

[main]

# The Puppet log directory.

# The default value is '$vardir/log'.

logdir = /var/log/puppet


# Where Puppet PID files are kept.

# The default value is '$vardir/run'.

rundir = /var/run/puppet


# Where SSL certificates are kept.

# The default value is '$confdir/ssl'.

ssldir = $vardir/ssl



[agent]

# The file in which puppetd stores a list of the classes

# associated with the retrieved configuratiion. Can be loaded in

# the separate ``puppet`` executable using the ``--loadclasses``

# option.

# The default value is '$confdir/classes.txt'.

classfile = $vardir/classes.txt

pluginsync = true

report = true

ignoreschedules = true

daemon = false

ca_server = gd9105.gstn.org.in

server = gd9105.gstn.org.in

environment = KT_Gstn_Delhi_Library_Puppet_view_2


# Where puppetd caches the local configuration. An

# extension indicating the cache format is added automatically.

# The default value is '$confdir/localconfig'.

localconfig = $vardir/localconfig


# Where puppetd caches the local configuration. An

# extension indicating the cache format is added automatically.

# The default value is '$confdir/localconfig'.

localconfig = $vardir/localconfig


Start and enable puppet agent service:[edit]

#systemctl enable puppet

#systemctl restart puppet


Request for signing of certificate to Satellite server:[edit]

# puppet agent -t --server gd9105.gstn.org.in

Exiting; no certificate found and waitforcert is disabled== Signing client certificate from satellite server: (sap) (Sapose client hostname was gd9204.gstn.local ). ==


# puppet cert sign gd9204.gstn.local

Notice: Signed certificate request for gd9204.gstn.local

Notice: Removing file Puppet::SSL::CertificateRequest gd9204.gstn.local at '/var/lib/puppet/ssl/ca/requests/gd9204.gstn.local.pem'


Check registration status from the client machine:[edit]

# puppet agent -t --server gd9105.gstn.org.in

Warning: Local environment: "KT_Gstn_Delhi_Library_Puppet_view_2" doesn't match server specified node environment "production", switching agent to "production".

Info: Retrieving pluginfacts

Info: Retrieving plugin

Info: Loading facts

Info: Caching catalog for gd9204.gstn.local

Info: Applying configuration version '1474712280'

Notice: Finished catalog run in 0.06 seconds


Note: Change puppet environment from “production” to “KT_Gstn_Delhi_Library_Puppet_view_2” from satellite server > all host > gd9204.gstn.local > edit.

Now check again from the puppet client:

# puppet agent -t --server gd9105.gstn.org.in

Info: Retrieving pluginfacts

Info: Retrieving plugin

Info: Loading facts

Info: Caching catalog for gd9204.gstn.local

Info: Applying configuration version '1474713066'

Notice: Finished catalog run in 0.04 seconds.