Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:puppet [2015/06/16 16:44]
vondra [Client side]
linux:puppet [2019/01/28 15:16] (current)
admin [Client side again]
Line 1: Line 1:
 ====== Client side ===== ====== Client side =====
-1. add puppet to your /etc/hosts+First 
 +   apt install puppet 
 +    
 +You can choose how to reach the server by configuring it or using dns, which is a    great advantage if you have all the servers in one domain. 
 +==== Config way ==== 
 +   ​puppet config set server puppet.starlab.cz 
 + 
 +==== DNS way ==== 
 + 
 +  - make sure you have properly setup hostname in /​etc/​hostname and /​etc/​hosts 
 +  - add puppet to your /etc/hosts
 <file /​etc/​hosts>​ <file /​etc/​hosts>​
 10.0.4.60 puppet puppet.starlab.cz 10.0.4.60 puppet puppet.starlab.cz
Line 8: Line 18:
 212.20.102.91 puppet puppet.starlab.cz 212.20.102.91 puppet puppet.starlab.cz
 </​file>​ </​file>​
- +  - initiate connection to server<code bash> 
-<code bash> +xen-starlab:~# puppetd --server puppet --test 
-xen-jpcomp:~# puppetd --server puppet --test +info: Creating a new SSL key for xen.starlab.cz
-info: Creating a new SSL key for xen-jpcomp.jpcomp.cz+
 info: Caching certificate for ca info: Caching certificate for ca
-info: Creating a new SSL certificate request for xen-jpcomp.jpcomp.cz+info: Creating a new SSL certificate request for xen.starlab.cz
 info: Certificate Request fingerprint (md5): AA:​A6:​EA:​69:​9A:​35:​91:​C2:​EA:​8B:​CF:​B4:​70:​8E:​2E:​4B info: Certificate Request fingerprint (md5): AA:​A6:​EA:​69:​9A:​35:​91:​C2:​EA:​8B:​CF:​B4:​70:​8E:​2E:​4B
 Exiting; no certificate found and waitforcert is disabled Exiting; no certificate found and waitforcert is disabled
Line 19: Line 28:
 v novejsi verzi puppetu: v novejsi verzi puppetu:
 <code bash> <code bash>
-xen-jpcomp:~# puppet agent --server puppet --test+xen-starlab:~# puppet agent --server puppet --test
 </​code>​ </​code>​
  
Line 31: Line 40:
 Hey! We have a new client Hey! We have a new client
  
-  root@ibm:​~# ​puppetca ​--list +  root@ibm:​~# ​puppet cert --list 
-    "xen-jpcomp.jpcomp.cz" (AA:​A6:​EA:​69:​9A:​35:​91:​C2:​EA:​8B:​CF:​B4:​70:​8E:​2E:​4B)+    "xen.starlab.cz" (AA:​A6:​EA:​69:​9A:​35:​91:​C2:​EA:​8B:​CF:​B4:​70:​8E:​2E:​4B)
  
 So sign it! So sign it!
-  ​puppetca ​--sign xen-jpcomp.jpcomp.cz +  ​puppet cert --sign xen.starlab.cz 
-  notice: Signed certificate request for xen-jpcomp.jpcomp.cz +  notice: Signed certificate request for xen.starlab.cz 
-  notice: Removing file Puppet::​SSL::​CertificateRequest xen-jpcomp.jpcomp.cz at '/​path/​to.pem'​+  notice: Removing file Puppet::​SSL::​CertificateRequest xen.starlab.cz at '/​path/​to.pem'​
   ​   ​
   ​   ​
Line 49: Line 58:
 Here is the output: Here is the output:
 <​code>​ <​code>​
-xen-jpcomp:~# puppetd --server puppet --waitforcert 80 --test +xen-starlab:~# puppetd --server puppet --waitforcert 80 --test 
-info: Caching catalog for xen-jpcomp.jpcomp.cz+info: Caching catalog for xen.starlab.cz
 info: Applying configuration version '​1413471896'​ info: Applying configuration version '​1413471896'​
 notice: /​Stage[main]//​File[nrpe_local.cfg]/​content: ​ notice: /​Stage[main]//​File[nrpe_local.cfg]/​content: ​
Line 104: Line 113:
  
 Why cron job instead of daemon? Cron job can sometimes perform better and use less memory. ​ Why cron job instead of daemon? Cron job can sometimes perform better and use less memory. ​
 +
 +===== Autostart =====
 +<code bash>
 +puppet agent --enable
 +service puppet restart
 +</​code>​
 +
 
linux/puppet.1434465894.txt.gz · Last modified: 2015/06/16 16:44 by vondra