Download Puppet agent packages for “Debian 8.2” from the WEB

Open the Puppet console :

puppetdebian

 

 

 

 

 

 

 

 

 

 

Select PE_Master :

puppetdebian1

 

 

 

 

 

 

 

 

 

 

Add “pe_repo::platform::debian_8_amd64” class and commit.

Logon as “root” to the Puppet server, 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 '1450348945'
 Notice: /Stage[main]/Pe_repo::Platform::Debian_8_amd64/Pe_repo::Debian[debian-8-amd64]/File[/opt/puppetlabs/server/data/packages/public/2015.2.3/debian-8-amd64.bash]/ensure: defined content as '{md5}daea610c57e8e19160eca74d203afe19'
 Notice: /Stage[main]/Pe_repo::Platform::Debian_8_amd64/Pe_repo::Debian[debian-8-amd64]/Pe_repo::Repo[debian-8-amd64 2015.2.3]/File[/opt/puppetlabs/server/data/packages/public/2015.2.3/debian-8-amd64]/ensure: created
 Notice: /Stage[main]/Pe_repo::Platform::Debian_8_amd64/Pe_repo::Debian[debian-8-amd64]/Pe_repo::Repo[debian-8-amd64 2015.2.3]/Pe_staging::Deploy[puppet-agent-debian-8-amd64.tar.gz]/Pe_staging::Extract[puppet-agent-debian-8-amd64.tar.gz]/Exec[extract puppet-agent-debian-8-amd64.tar.gz]/returns: executed successfully
 Notice: Applied catalog in 7.20 seconds

This will download Puppet agent tools for “Debian 8.2” :

root@puppet:~# ls -l /opt/puppetlabs/server/data/packages/public/2015.2.3/debian-8*
-rw-r--r-- 1 root root 9554 Dec 17 11:42 /opt/puppetlabs/server/data/packages/public/2015.2.3/debian-8-amd64.bash

/opt/puppetlabs/server/data/packages/public/2015.2.3/debian-8-amd64:
total 16
drwxr-xr-x 2 root root 4096 Oct 30 01:20 conf
drwxr-xr-x 2 root root 4096 Oct 30 01:20 db
drwxr-xr-x 3 root root 4096 Oct 30 01:20 dists
drwxr-xr-x 3 root root 4096 Oct 30 01:20 pool

Discover from the Puppet console, the magic command you have to run on your agent :

puppetdebian2

 

 

 

 

 

 

 

 

 

 

Agent installation

Logon as root :

wou@debian:~$ su -
Password:
root@debian:~# id
uid=0(root) gid=0(root) groups=0(root)

Verify DNS records :

root@debian:~# hostname
debian
root@debian:~# nslookup debian
Server: 192.168.1.200
Address: 192.168.1.200#53

Name: debian.argonay.wou
Address: 192.168.1.206
root@debian:~# nslookup 192.168.1.206
Server: 192.168.1.200
Address: 192.168.1.200#53

206.1.168.192.in-addr.arpa name = debian.argonay.wou.

Install “curl” :

root@debian:~# apt-get -y install curl

Well, you can now execute the “curl” command :

root@debian:~# curl -k https://puppet.argonay.wou:8140/packages/current/install.bash | bash
 % Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
 100 14659 100 14659 0 0 99k 0 --:--:-- --:--:-- --:--:-- 99k
 E: Release file for http://ftp.fr.debian.org/debian/dists/jessie-updates/InRelease is expired (invalid since 3d 2h 30min 39s). Updates for this repository will not be applied.
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 The following NEW packages will be installed:
 apt-transport-https
 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
 Need to get 138 kB of archives.
 After this operation, 230 kB of additional disk space will be used.
 WARNING: The following packages cannot be authenticated!
 apt-transport-https
 E: There are problems and -y was used without --force-yes
 OK
 E: The method driver /usr/lib/apt/methods/https could not be found.
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 E: Unable to locate package puppet-agent
 /tmp/tmp.yugX1LBmy4: line 75: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 grep: /puppet.conf: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 84: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 97: /opt/puppetlabs/puppet/bin/ruby: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 97: /opt/puppetlabs/puppet/bin/facter: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 97: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 106: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 107: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 111: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 46: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 46: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 46: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 /tmp/tmp.yugX1LBmy4: line 46: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
 Error running install script /tmp/tmp.yugX1LBmy4

Error : “ruby” is missing !!!

root@debian:~# dpkg --get-selections | grep -i ruby

Install it :

root@debian:~# apt-get install ruby2.1

download the Puppet agent from Puppet Labs

And copy manually  the file to your agent :

root@debian:~# cd /tmp
root@debian:/tmp# ls -l puppet-agent_1.2.7-1jessie_amd64.deb
-rw-r--r-- 1 wou wou 10780090 Dec 5 11:40 puppet-agent_1.2.7-1jessie_amd64.deb

Install this package :

root@debian:/tmp# apt install puppet-agent_1.2.7-1jessie_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package puppet-agent_1.2.7-1jessie_amd64.deb
E: Couldn't find any package by regex 'puppet-agent_1.2.7-1jessie_amd64.deb'
root@debian:/tmp# apt install /tmp/puppet-agent_1.2.7-1jessie_amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package /tmp
root@debian:/tmp# apt install /tmp/puppet-agent
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package /tmp
root@debian:/tmp# ls
puppet-agent_1.2.7-1jessie_amd64.deb tmp.LZWK0x6WnZ tmp.yugX1LBmy4 vmware-root
root@debian:/tmp# dpkg -i puppet-agent_1.2.7-1jessie_amd64.deb
Selecting previously unselected package puppet-agent.
(Reading database ... 30908 files and directories currently installed.)
Preparing to unpack puppet-agent_1.2.7-1jessie_amd64.deb ...
Unpacking puppet-agent (1.2.7-1jessie) ...
Setting up puppet-agent (1.2.7-1jessie) ...

Configuration file '/etc/default/puppet'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
 What would you like to do about it ? Your options are:
 Y or I : install the package maintainer's version
 N or O : keep your currently-installed version
 D : show the differences between the versions
 Z : start a shell to examine the situation
 The default action is to keep your current version.
*** puppet (Y/I/N/O/D/Z) [default=N] ?
Created symlink from /etc/systemd/system/multi-user.target.wants/puppet.service to /lib/systemd/system/puppet.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mcollective.service to /lib/systemd/system/mcollective.service.

Launch one again the “curl” script :

root@debian:/tmp# curl -k https://puppet.argonay.wou:8140/packages/current/install.bash | bash
 % Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
100 14659 100 14659 0 0 130k 0 --:--:-- --:--:-- --:--:-- 131k
E: The method driver /usr/lib/apt/methods/https could not be found.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
 apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 138 kB of archives.
After this operation, 230 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
 apt-transport-https
E: There are problems and -y was used without --force-yes
OK
E: The method driver /usr/lib/apt/methods/https could not be found.
Reading package lists... Done
Building dependency tree
Reading state information... Done
puppet-agent is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Notice: /Service[puppet]/ensure: ensure changed 'stopped' to 'running'
service { 'puppet':
  ensure => 'running',
  enable => 'true',
}
Notice: /File[/usr/local/bin/facter]/ensure: created
file { '/usr/local/bin/facter':
  ensure => 'link',
  target => '/opt/puppetlabs/puppet/bin/facter',
}
Notice: /File[/usr/local/bin/puppet]/ensure: created
file { '/usr/local/bin/puppet':
 ensure => 'link',
 target => '/opt/puppetlabs/puppet/bin/puppet',
}
Notice: /File[/usr/local/bin/pe-man]/ensure: created
file { '/usr/local/bin/pe-man':
  ensure => 'link',
  target => '/opt/puppetlabs/puppet/bin/pe-man',
}
Notice: /File[/usr/local/bin/hiera]/ensure: created
file { '/usr/local/bin/hiera':
  ensure => 'link',
  target => '/opt/puppetlabs/puppet/bin/hiera',
}

It works much better !!!

Now, launch this command on the agent to request a certificate from the server :

root@debian:~# puppet agent -t
Exiting; no certificate found and waitforcert is disabled

Accept this certificate from the Puppet console :

puppetdebian3

 

 

 

 

 

 

 

 

 

 

Launch this command to valid this agent :

root@debian:~# puppet agent --test

A new agent will appear on the console :

puppetdebian4

 

 

www.pdf24.org    Send article as PDF   

Leave a Reply

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


*