DeskTux

Linux on Desktops

User Tools

Site Tools


apps:puppet

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
apps:puppet [2019-08-10 19:24] – Connecting clients jensapps:puppet [2019-08-11 09:16] – [And now?] Change heading jens
Line 1: Line 1:
 ====== Puppet ====== ====== Puppet ======
-Even if you manage just a handful or two servers, [[https://puppet.com/|Puppet]] can already help you to save loads of time and ensures all your systems run in the desired state.+Even if you manage just a handful or two of servers, [[https://puppet.com/|Puppet]] can already help you to save loads of time and ensures all your systems run in the desired state.
  
 Somehow, I could not find very many or good manuals on how to set up your own (basic) Puppet server on Debian, so I decided to write my own. Somehow, I could not find very many or good manuals on how to set up your own (basic) Puppet server on Debian, so I decided to write my own.
Line 9: Line 9:
   apt install puppet puppet-master vim-puppet   apt install puppet puppet-master vim-puppet
      
-That last package is not really needed but comes in really handy when editing your Puppet manifests in vim and you want syntax highlighting. While this would be more needed on a git client (which will be discussed here in future) it also is nice to have on the Puppet master.+That last package is not really needed but comes in really handy when editing your Puppet manifests in vim and you want syntax highlighting. While this would be more needed on a [[git]] client it also is nice to have on the Puppet master.
  
 As for the main configuration file ''/etc/puppet/puppet.conf'' I leave the Debian standard for what it is. As for the main configuration file ''/etc/puppet/puppet.conf'' I leave the Debian standard for what it is.
Line 28: Line 28:
                 ├── module2                 ├── module2
                 │   ├── examples                 │   ├── examples
-                │   ├── manifests +                │   ├── files 
-                │   └── files+                │   └── manifests
                 └── moduleX                 └── moduleX
                     ├── examples                     ├── examples
Line 53: Line 53:
 That way, you can easily test the code of that module by using ''puppet apply -t init.pp''. That way, you can easily test the code of that module by using ''puppet apply -t init.pp''.
  
-Of course, before testing your code, you should first run it through ''puppet parser validate'' and ''puppet-lint''. However, this is not a Puppet code manual, you should check their [[https://puppet.com/docs/puppet/6.7/puppet_index.html|excellent documentation]] for that.+Of course, before testing your code, you should first run it through ''puppet parser validate'' and ''puppet-lint''. However, this is not a Puppet code manual, you should check their [[https://puppet.com/docs|excellent documentation]] for that.
  
 ==== Connecting Clients ==== ==== Connecting Clients ====
Line 65: Line 65:
 </code> </code>
  
-Afterwards, run ''puppet agent -t''. This will create a certificate request on the Puppet master. There run ''puppet cert list''((That might yield a warning that this is deprecated, but for now that is still the way to go.)) and you will get an output similar to this((In case you run full IPv6, there might also be a warning on routing issues, just ignore that. It is a bug.)):+Afterwards, run ''puppet agent -t''. This will create a certificate request on the Puppet master. Thererun ''puppet cert list''((That might yield a warning that this is deprecated, but for now that is still the way to go.)) and you will get an output similar to this((In case you run full IPv6, there might also be a warning on routing issues, just ignore that. It is a bug.)):
  
 <code> <code>
Line 76: Line 76:
 === Removing clients === === Removing clients ===
 In case you need to remove (decommission) a client, you can list all available certificates with ''puppet cert list -a'' and then ''puppet cert clean <client.name.tld>''. Don't forget to remove that client from backup and monitoring ;-) In case you need to remove (decommission) a client, you can list all available certificates with ''puppet cert list -a'' and then ''puppet cert clean <client.name.tld>''. Don't forget to remove that client from backup and monitoring ;-)
 +
 +===== What next? =====
 +Now, it might be a good idea to manage your Puppet code from your workstation using [[git]]. That way you do not need to log in to the Puppet master all the time to make changes to your code as root.
apps/puppet.txt · Last modified: 2019-08-31 17:59 by jens