Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
puppet_overview_installation [2020/11/13 22:40] – andonovj | puppet_overview_installation [2020/11/16 16:21] (current) – andonovj | ||
---|---|---|---|
Line 14: | Line 14: | ||
In a nutshell, the Agent is trying to pull the necessary steps from the master, each couple seconds. It is important to note that, the master doesn' | In a nutshell, the Agent is trying to pull the necessary steps from the master, each couple seconds. It is important to note that, the master doesn' | ||
- | =====Installation===== | + | =====Repo Configuration===== |
To install it, we have to configure the Repo and install the server & agent for the **master** and the agent for the **slave**. | To install it, we have to configure the Repo and install the server & agent for the **master** and the agent for the **slave**. | ||
Line 30: | Line 30: | ||
- | ====Configure | + | ====Install |
< | < | ||
[root@puppetmaster etc]# yum install puppetserver | [root@puppetmaster etc]# yum install puppetserver | ||
Line 89: | Line 89: | ||
</ | </ | ||
- | That will install both, the server and the agent, we can start the service as follows: | + | That will install both, the server and the agent on the master server. |
- | < | ||
- | [root@puppetmaster etc]# service puppetserver start | ||
- | Redirecting to / | ||
- | [root@puppetmaster etc]# service puppetserver status | ||
- | Redirecting to / | ||
- | ● puppetserver.service - puppetserver Service | ||
- | | ||
- | | ||
- | Process: 7345 ExecStart=/ | ||
- | Main PID: 7368 (java) | ||
- | Tasks: 40 (limit: 4915) | ||
- | | ||
- | | ||
- | |||
- | Nov 13 16:49:35 puppetmaster.example.com systemd[1]: Starting puppetserver Service... | ||
- | Nov 13 16:50:11 puppetmaster.example.com systemd[1]: Started puppetserver Service. | ||
- | [root@puppetmaster etc]# | ||
- | </ | ||
- | |||
- | Nice, we have a working default server. Let's configure the agent, we will return to the master in a second. | ||
- | As stated before, the agent is the one pulling the requests from the master, but before it can do that, the connection between them NEEDS to be secure. Secure in the IT world means, certificates, | ||
- | |||
- | < | ||
- | [root@puppetmaster certificate_requests]# | ||
- | Signed Certificates: | ||
- | puppetmaster.example.com | ||
- | [root@puppetmaster certificate_requests]# | ||
- | </ | ||
- | |||
- | So we see that the master has his own certificate and that is that. But for the agent to work, we need the agent to send his certificate to be signed by the master. So let's setup the agent. | ||
- | |||
- | ====Configure Agent==== | ||
- | We will simple install the agent and do little magic. | ||
+ | ====Install Agent==== | ||
< | < | ||
[root@puppetagent etc]# yum install puppet-agent | [root@puppetagent etc]# yum install puppet-agent | ||
Line 167: | Line 135: | ||
</ | </ | ||
- | After we have installed it, we have to modify the puppet.conf file (e.g./ | ||
- | < | ||
- | [root@puppetagent puppet]# vi / | ||
- | # This file can be used to override the default puppet settings. | ||
- | # See the following links for more details on what settings are available: | ||
- | # - https:// | ||
- | # - https:// | ||
- | # - https:// | ||
- | # - https:// | ||
- | |||
- | [main] | ||
- | certserver = puppetslave.example.com | ||
- | server = puppetmaster.example.com | ||
- | |||
- | :wq | ||
- | |||
- | </ | ||
- | |||
- | Once done, we can start the agent as follows: | ||
- | |||
- | |||
- | < | ||
- | [root@puppetagent puppet]# service puppet start | ||
- | Redirecting to / | ||
- | [root@puppetagent puppet]# service puppet status | ||
- | Redirecting to / | ||
- | ● puppet.service - Puppet agent | ||
- | | ||
- | | ||
- | Main PID: 26262 (puppet) | ||
- | Tasks: 2 | ||
- | | ||
- | | ||
- | |||
- | Nov 13 17:23:04 puppetslave.example.com systemd[1]: Started Puppet agent. | ||
- | [root@puppetagent puppet]# | ||
- | </ | ||
- | |||
- | So let's return to the Master and see how he is doing. | ||
- | |||
- | ====Sign Certificate==== | ||
- | Since the agent started (and hopefully not mistakes) the master should' | ||
- | |||
- | < | ||
- | [root@puppetmaster certificate_requests]# | ||
- | Requested Certificates: | ||
- | puppetslave.example.com | ||
- | Signed Certificates: | ||
- | puppetmaster.example.com | ||
- | </ | ||
- | |||
- | Now, we have 2 certiciates :), so let's approve our agent. | ||
- | |||
- | < | ||
- | [root@puppetmaster certificate_requests]# | ||
- | Successfully signed certificate request for puppetslave.example.com | ||
- | [root@puppetmaster certificate_requests]# | ||
- | [root@puppetmaster certificate_requests]# | ||
- | Signed Certificates: | ||
- | puppetmaster.example.com | ||
- | puppetslave.example.com | ||
- | [root@puppetmaster certificate_requests]# | ||
- | </ | ||
- | From now on, we will have trusted connection between the Agent/Slave and the Master. |