Skip to content

Commit 01b6e34

Browse files
pablomhaneta-petrova
authored andcommitted
Change MQTT tuning procedure to a "custom-hiera"-based one (#4262)
That way the configuration file won't be deleted when `foreman-installer` is run again and won't be needed to reload or restart services manually. (cherry picked from commit ea2acbc)
1 parent 6245189 commit 01b6e34

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed
Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
[id="Increasing_host_limit_for_pull_based_REX_transport_{context}"]
22
= Increasing host limit for pull-based REX transport
33

4-
You can tune the `mosquitto` MQTT server and increase the number of hosts connected to it.
4+
You can tune the `mosquitto` MQTT server and increase the maximum number of hosts connected to it.
5+
By default, {SmartProxies} support a maximum of 1014 connected hosts.
6+
7+
This example configures the `mosquitto` service on your {SmartProxy} to handle up to 5000 hosts.
8+
9+
.Prerequisites
10+
* You have enabled pull-based remote execution on your {SmartProxy}.
11+
For more information, see {InstallingSmartProxyDocURL}configuring-pull-based-transport-for-remote-execution_{smart-proxy-context}[Configuring pull-based transport for remote execution] in _{InstallingSmartProxyDocTitle}_.
512

613
.Procedure
7-
. Enable pull-based remote execution on your {ProjectServer} or {SmartProxyServer}:
14+
. On your {SmartProxy}, set the upper limit of connected hosts for pull-based remote execution in `/etc/foreman-installer/custom-hiera.yaml`:
815
+
916
[options="nowrap", subs="+quotes,verbatim,attributes"]
1017
----
11-
# {foreman-installer} --foreman-proxy-plugin-remote-execution-script-mode pull-mqtt
18+
systemd::dropin_files:
19+
limits.conf:
20+
unit: mosquitto.service
21+
content: "[Service]\nLimitNOFILE=5000\n"
1222
----
23+
. Re-run the installer for the changes to take effect:
1324
+
14-
Note that your {ProjectServer} or {SmartProxyServer} can only use one transport mode, either SSH or MQTT.
15-
. Create a config file to increase the default number of hosts accepted by the MQTT service:
16-
+
17-
[options="nowrap", subs="+quotes,verbatim,attributes"]
18-
----
19-
cat >/etc/systemd/system/mosquitto.service.d/limits.conf <<__EOF__
20-
[Service]
21-
LimitNOFILE=5000
22-
__EOF__
23-
----
24-
+
25-
This example sets the limit to allow the `mosquitto` service to handle 5000 hosts.
26-
. Run the following commands to apply your changes:
27-
+
28-
[options="nowrap", subs="+quotes,verbatim,attributes"]
25+
[source, yaml, options="nowrap", subs="+quotes,verbatim,attributes"]
2926
----
30-
# systemctl daemon-reload
31-
# systemctl restart mosquitto.service
27+
# {foreman-installer}
3228
----

0 commit comments

Comments
 (0)