Puppet agent installation

Download the rpm from Puppet Labs and copy it to your Linux machine

[root@centos7 ~]# ls -l /tmp/puppet-agent-1.2.7-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 19489520 Nov 27 14:59 /tmp/puppet-agent-1.2.7-1.el7.x86_64.rpm

Install this rpm :

[root@centos7 ~]# rpm -ivh /tmp/puppet-agent-1.2.7-1.el7.x86_64.rpm

Verify your DNS configuration :

[root@centos7 ~]# host puppet
puppet.argonay.wou has address 192.168.1.204
[root@centos7 ~]# host 192.168.1.204
204.1.168.192.in-addr.arpa domain name pointer puppet.argonay.wou.

Add “/opt/puppetlabs/puppet/bin” in your PATH (for example, edit “/etc/profile” to get it) :

[root@centos7 ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/puppet/bin:/root/bin

On Puppet server

Install the agent on the server

Open the WEB console :

puppetagent

 

 

 

 

 

 

 

 

 

 

Select PE_master :

puppetagent1

 

 

 

 

 

 

 

 

 

 

Create a new class (here : “pe_repo::platform::el_7_x86_64” for RedHat Enterprise Linux 7 <=> CentOS 7), then commit :

puppetagent2

 

 

 

 

 

 

 

 

 

 

Open a terminal, and launch :

root@puppet:~# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet.argonay.wou
Info: Applying configuration version '1450008353'
Notice: /Stage[main]/Pe_repo::Platform::El_7_x86_64/Pe_repo::El[el-7-x86_64]/File[/opt/puppetlabs/server/data/packages/public/2015.2.3/el-7-x86_64.repo]/ensure: defined content as '{md5}6ef1c5ffe7b7b89ae6ee8db4b53311f7'
Notice: /Stage[main]/Pe_repo::Platform::El_7_x86_64/Pe_repo::El[el-7-x86_64]/File[/opt/puppetlabs/server/data/packages/public/2015.2.3/el-7-x86_64.bash]/ensure: defined content as '{md5}fdec085dd189d26403311aa447abb6cb'
Notice: /Stage[main]/Pe_repo::Platform::El_7_x86_64/Pe_repo::El[el-7-x86_64]/Pe_repo::Repo[el-7-x86_64 2015.2.3]/File[/opt/puppetlabs/server/data/packages/public/2015.2.3/el-7-x86_64]/ensure: created
Notice: /Stage[main]/Pe_repo::Platform::El_7_x86_64/Pe_repo::El[el-7-x86_64]/Pe_repo::Repo[el-7-x86_64 2015.2.3]/Pe_staging::Deploy[puppet-agent-el-7-x86_64.tar.gz]/Pe_staging::File[puppet-agent-el-7-x86_64.tar.gz]/Exec[/opt/puppetlabs/server/data/staging/pe_repo-puppet-agent-1.2.7/puppet-agent-el-7-x86_64.tar.gz]/returns: executed successfully
Notice: /Stage[main]/Pe_repo::Platform::El_7_x86_64/Pe_repo::El[el-7-x86_64]/Pe_repo::Repo[el-7-x86_64 2015.2.3]/Pe_staging::Deploy[puppet-agent-el-7-x86_64.tar.gz]/Pe_staging::Extract[puppet-agent-el-7-x86_64.tar.gz]/Exec[extract puppet-agent-el-7-x86_64.tar.gz]/returns: executed successfully
Notice: Applied catalog in 35.74 seconds

That will download packages from the WEB, and create files and directories :

root@puppet:~# ls -l /opt/puppetlabs/server/data/packages/public/2015.2.3/el-7-x86_64*
-rw-r--r-- 1 root root 7558 Dec 13 13:06 /opt/puppetlabs/server/data/packages/public/2015.2.3/el-7-x86_64.bash
-rw-r--r-- 1 root root 252 Dec 13 13:06 /opt/puppetlabs/server/data/packages/public/2015.2.3/el-7-x86_64.repo

/opt/puppetlabs/server/data/packages/public/2015.2.3/el-7-x86_64:
total 19040
-rw-r--r-- 1 root root 19489520 Oct 30 01:19 puppet-agent-1.2.7-1.el7.x86_64.rpm
drwxr-xr-x 2 root root 4096 Oct 30 01:20 repodata

Puppet agent configuration

Check if your server has everything compatible with the agent Linux distribution :

[root@centos7 ~]# curl -k https://puppet.argonay.wou:8140/packages/current/install.bash | sudo bash

Define the master :

[root@centos7 ~]# puppet config set master puppet.argonay.wou

Define the agent :

[root@centos7 ~]# puppet config set certname centos7.argonay.wou

Create certificates

Create a certificate request on the agent :

[root@centos7 ~]# puppet agent -t
Info: Creating a new SSL key for centos7.argonay.wou
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppetlabs/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for centos7.argonay.wou
Info: Certificate Request fingerprint (SHA256): 75:90:C8:B7:ED:27:79:E0:21:AC:67:A1:C0:FB:E9:29:27:18:59:D9:D5:94:B0:A8:21:6C:10:F1:51:24:9E:C0
Info: Caching certificate for ca
Exiting; no certificate found and waitforcert is disabled

Accept the request from the WEB console :

puppetagent3

 

 

 

 

 

 

 

 

 

 

 

puppetagent4

 

 

 

 

 

 

 

 

 

 

On the agent, launch this command :

[root@centos7 ~]# puppet agent -t
...
...
...
Notice: /Stage[main]/Puppet_enterprise::Mcollective::Service/Service[mcollective]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Puppet_enterprise::Mcollective::Service/Service[mcollective]: Unscheduling refresh on Service[mcollective]
Notice: Applied catalog in 6.15 seconds

We will see the agent on Puppet concole :

puppetagent5

 

 

 

 

 

 

 

 

 

 

 

tools.pdf24.org    Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *


*