You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/deployment-options/deploying-with-puppet/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
Deployment with Puppet
9
9
======================
10
10
11
-
Puppet is an open-source software tool that gives you an automatic way to inspect, deliver, operate, and future-proof all of your software, no matter where it is executed. It runs on many Unix-like systems as well as on Microsoft Windows and includes its own declarative language to describe system configuration. It is very simple to use and allows you to install and configure Wazuh easily.
11
+
Puppet is an opensource software that automatically inspects, delivers, operates, and future-proofs all of your software, no matter where it is executed. It runs on many Unix-like systems as well as Microsoft Windows and includes its own declarative language to describe system configuration. It gives an alternative to install and configure Wazuh.
Copy file name to clipboardExpand all lines: source/deployment-options/deploying-with-puppet/setup-puppet/index.rst
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,16 @@
8
8
Set up Puppet
9
9
=============
10
10
11
-
In this section, we are going to give a short explanation of how to install the different instances of Puppet. For a more detailed guide, go to the `official Puppet documentation.<https://puppet.com/docs/puppet/latest/puppet_index.html>`_
11
+
In this section, we will explain how to install the different instances of Puppet. For a more detailed guide, see the `official Puppet documentation <https://puppet.com/docs/puppet/latest/puppet_index.html>`_.
12
12
13
13
Before we get started with Puppet, confirm that the following network requirements are met:
14
14
15
-
- **Private network DNS**: Forward and reverse DNS must be configured, and every server must have a unique hostname. If you do not have DNS configured, you must use your hosts file for name resolution. We will assume that you will use your private network for communication within your infrastructure.
16
-
- **Firewall open ports**: The Puppet master must be reachable on TCP port 8140.
15
+
- **Private network DNS**: Forward and reverse DNS must be configured, and every server must have a unique hostname. If you do not have DNS configured, use your hosts file for name resolution. We assume you will use your private network for communication within your infrastructure.
17
16
18
-
.. note::
17
+
- **Firewall open ports**: The Puppet master must be reachable on TCP port 8140.
19
18
19
+
.. note::
20
+
20
21
We made this guide using Puppet version 7.16. You need root user privileges to run all the commands described below.
21
22
22
23
.. topic:: Contents
@@ -27,3 +28,20 @@ Before we get started with Puppet, confirm that the following network requiremen
27
28
install-puppet-master.rst
28
29
install-puppet-agent.rst
29
30
setup-puppet-certificates.rst
31
+
32
+
33
+
This section explains how to install puppet-master. Follow this link to check the `official installation guide <https://puppet.com/docs/puppetserver/latest/install_from_packages.html>`_.
34
+
35
+
If you do not have DNS configured, you must use your hosts file for name resolution.
36
+
Edit the ``/etc/hosts`` file and add the following:
37
+
38
+
.. code-block:: console
39
+
40
+
<PUPPET_MASTER_IP> puppet puppet-master
41
+
<PUPPET_AGENT_IP> puppet-agent
42
+
43
+
Where:
44
+
45
+
- ``PUPPET_MASTER_IP`` is the IP address of your Puppet master.
46
+
47
+
- ``PUPPET_AGENT_IP`` is the IP address of your Puppet agent.
Copy file name to clipboardExpand all lines: source/deployment-options/deploying-with-puppet/setup-puppet/install-puppet-agent.rst
+47-43Lines changed: 47 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,69 +8,76 @@
8
8
Installing Puppet agent
9
9
=======================
10
10
11
-
In this section it is explained how to install *puppet-agent*. Follow this link to check the `official installation guide <https://puppet.com/docs/puppet/6.4/install_agents.html>`_.
11
+
This section explains how to install Puppet Agent. Follow this link to check the `official installation guide <https://puppet.com/docs/puppet/6.4/install_agents.html>`_.
12
12
13
13
We assume that you have already installed the ``apt`` or ``yum`` Puppet repository on your agent system in the same way that you did on your Puppet Server.
14
14
15
-
If you do not have DNS configured, you must use your hosts file for name resolution.
15
+
If you do not have DNS configured, use your hosts file for name resolution.
16
16
17
17
Edit the ``/etc/hosts`` file, and add the IP address and hostname of the Puppet master and agent:
18
18
19
19
.. code-block:: console
20
20
21
-
[puppet master ip] puppet puppet-master
22
-
[puppet agent ip] puppet-agent
21
+
<PUPPET_MASTER_IP> puppet puppet-master
22
+
<PUPPET_AGENT_IP> puppet-agent
23
+
24
+
Where:
25
+
26
+
- ``PUPPET_MASTER_IP`` is the IP address of your Puppet master.
27
+
- ``PUPPET_AGENT_IP`` is the IP address of your Puppet agent.
23
28
24
29
25
30
Installation on CentOS/RHEL/Fedora
26
31
----------------------------------
27
32
28
-
Install the Puppet yum repository and then the "puppet-agent" package. See this `index <https://yum.puppetlabs.com/>`_ to find the correct rpm file needed to install the puppet repo for your Linux distribution. For example, to install Puppet 7 for CentOS 7 or RHEL 7, do the following:
33
+
See this `index <https://yum.puppetlabs.com/>`_ to find the correct rpm file to install the Puppet repo for your Linux distribution. For example, to install Puppet 7 for RHEL 9, do the following:
29
34
30
-
.. code-block:: console
35
+
#. Install the Puppet yum repository and the puppet-agent package:
#. Install ``curl``, ``apt-transport-https`` and ``lsb-release``:
58
59
59
-
Install the appropriate Puppet apt repository, and then the “puppet-agent” package. See https://apt.puppetlabs.com to find the correct deb file to install the puppet repo for your Linux distribution.
#. Install the appropriate Puppet apt repository, and then the “puppet-agent” package. See https://apt.puppetlabs.com for the correct Debian file to install the Puppet repo for your Linux distribution.
Create a symbolic link between the installed binary file and your default binary file:
70
75
71
-
.. code-block:: console
76
+
#. Create a symbolic link between the installed binary file and your default binary file:
72
77
73
-
# ln -s /opt/puppetlabs/bin/puppet /bin
78
+
.. code-block:: console
79
+
80
+
# ln -s /opt/puppetlabs/bin/puppet /usr/local/bin
74
81
75
82
76
83
Installation on Windows
@@ -90,41 +97,38 @@ Installation on Windows
90
97
91
98
- Execute the GUI with elevated privileges.
92
99
- During installation, Puppet asks you for the hostname of your Puppet master server.
93
-
- For standalone Puppet nodes that won’t connect to a master, use the default hostname (`puppet`). You might also want to install it on the command line and set the agent startup mode to `Disabled`.
100
+
- For standalone Puppet nodes that won't connect to a master, use the default hostname (puppet). You might also want to install it on the command line and set the agent startup mode to Disabled.
94
101
- Once the installer finishes, Puppet will be installed and running.
Optionally, you can specify ``/l*v install.txt`` to log the installation’s progress to a file. You can also set several MSI properties to pre-configure Puppet as you install it.
110
+
Specify ``/l*v install.txt`` to log the installation's progress to a file. You can also set several MSI properties to pre-configure Puppet as you install it.
104
111
105
112
106
-
Agent Configuration
113
+
Agent configuration
107
114
^^^^^^^^^^^^^^^^^^^
108
115
109
-
To configure the Puppet agent, edit the configuration file in the node.
110
-
111
-
- ``/etc/puppetlabs/puppet/puppet.conf`` for Linux systems
112
-
- ``C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf`` for Windows systems
116
+
To configure the Puppet agent, edit the configuration file on the node.
113
117
114
-
Add the ``server`` setting to the ``[main]`` section of the file. If you have set up your own DNS, replace ``puppet-master`` with the Fully Qualified Domain Name (FQDN) of your Puppet server.
118
+
- ``/etc/puppetlabs/puppet/puppet.conf`` for Linux systems
115
119
116
-
.. code-block:: none
120
+
- ``C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf`` for Windows systems
117
121
118
-
[main]
119
-
server = puppet-master
120
-
122
+
Add the ``server`` setting to the ``[main]`` section of the file. If you have set up your own DNS, replace puppet-master with the Fully Qualified Domain Name (FQDN) of your Puppet server.
121
123
122
-
.. note:: The Puppet server FQDN should be resolved by the Puppet agent host.
124
+
.. code-block:: none
123
125
126
+
[main]
127
+
server = puppet-master
124
128
125
129
Restart and check the status of the Puppet service:
126
130
127
131
.. code-block:: console
128
132
129
133
# puppet resource service puppet ensure=running enable=true
Copy file name to clipboardExpand all lines: source/deployment-options/deploying-with-puppet/setup-puppet/install-puppet-master.rst
+51-50Lines changed: 51 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,101 +8,94 @@
8
8
Installing Puppet master
9
9
========================
10
10
11
-
This section explains how to install *puppet-master*. Follow this link to check the `official installation guide <https://puppet.com/docs/puppetserver/latest/install_from_packages.html>`_.
12
-
13
-
If you do not have DNS configured, you must use your hosts file for name resolution.
14
-
Edit the ``/etc/hosts`` file and add the following:
15
-
16
-
.. code-block:: console
17
-
18
-
[puppet master ip] puppet puppet-master
19
-
[puppet agent ip] puppet-agent
20
11
21
12
22
13
Installation on CentOS/RHEL/Fedora
23
-
----------------------------------
24
-
25
-
Install the Puppet yum repository and then the “puppetserver” package. See this `index <https://yum.puppetlabs.com/>`_ to find the correct rpm file needed to install the puppet repo for your Linux distribution. For example, to install Puppet 7 for CentOS 8 or RHEL 8, do the following:
14
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
15
27
-
.. code-block:: console
16
+
#. Install the Puppet yum repository and then the "puppetserver" package. See this `index <https://yum.puppetlabs.com/>`_ for the correct RPM file to install the Puppet repo for your Linux distribution. For example, to install Puppet 7 for RHEL 9, do the following:
#. Install the appropriate Puppet apt repository, and then the "puppetserver" package. See https://apt.puppetlabs.com to find the correct Debian file to install the Puppet 8 repo for your Linux distribution.
55
46
56
-
Install the appropriate Puppet apt repository, and then the “puppetserver” package. See https://apt.puppetlabs.com to find the correct deb file to install the Puppet 7 repo for your Linux distribution.
By default, Puppet Server will be configured to use 2GB of RAM. However, if you want to experiment with Puppet Server on a VM, you can safely allocate as little as 512MB of memory. You can edit the init config file to change Puppet Server memory allocation.
73
66
74
-
Memory Allocation
75
-
-----------------
67
+
.. tabs::
68
+
69
+
.. group-tab:: CentOS/RHEL/Fedora
70
+
71
+
.. code-block:: none
76
72
77
-
By default, Puppet Server will be configured to use 2GB of RAM. However, if you want to experiment with Puppet Server on a VM, you can safely allocate as little as 512MB of memory. To change Puppet Server memory allocation, you can edit the following init config file.
Replace 2g in the ``JAVA_ARGS`` variable with the amount of memory you want to allocate to Puppet Server. For example, to allocate 1GB of memory, use ``JAVA_ARGS="-Xms1g -Xmx1g"``; for 512MB, use ``JAVA_ARGS="-Xms512m -Xmx512m"``.
77
+
.. code-block:: none
78
+
79
+
/etc/default/puppetserver
80
+
81
+
Replace 2g in the ``JAVA_ARGS`` variable with the memory you want to allocate to Puppet Server. For example, to allocate 1GB of memory, use ``JAVA_ARGS="-Xms1g -Xmx1g"``; for 512MB, use ``JAVA_ARGS="-Xms512m -Xmx512m"``.
83
82
84
83
Configuration
85
84
-------------
86
85
87
-
Edit the ``/etc/puppetlabs/puppet/puppet.conf`` file to configure the Puppet server. Add the following settings to the ``[main]`` section. You need to create the section if it doesn't exist. If you have set up your own DNS, replace ``puppet`` and ``puppet-master`` with your Fully Qualified Domain Names (FQDNs).
86
+
Edit the ``/etc/puppetlabs/puppet/puppet.conf`` file to configure the Puppet server. Add the following settings to the ``[server]`` section. You need to create the section if it doesn't exist. If you have set up your own DNS, replace ``puppet`` and ``puppet-master`` with your Fully Qualified Domain Names (FQDNs).
88
87
89
88
.. code-block:: none
90
89
91
-
[main]
90
+
[server]
92
91
server = puppet-master
93
92
dns_alt_names = puppet, puppet-master
94
93
95
94
.. note:: If you find ``templatedir=$confdir/templates`` in the config file, delete that line. It has been deprecated.
96
95
97
96
98
-
For Ubuntu/Debian machines, in case puppetserver does not start. Edit the puppetserver file, ``/etc/default/puppetserver``. Modify the following line to change the memory size to 1G or 512MB:
@@ -120,3 +113,11 @@ Then, start your Puppet Server:
120
113
121
114
# service puppetserver start
122
115
# update-rc.d puppetserver
116
+
117
+
.. note::
118
+
119
+
For Ubuntu/Debian machines, in case puppetserver does not start due to a lack of memory. Edit the ``/etc/default/puppetserver`` config file. Modify the following line to change the memory size to 1GB or 512MB:
0 commit comments