Skip to content

Commit 5d8299e

Browse files
authored
Change MQTT tuning procedure to a "custom-hiera"-based one
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.
1 parent 8343cf4 commit 5d8299e

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

guides/common/modules/proc_increasing-host-limit-for-pull-based-rex-transport.adoc

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,28 @@
33
[id="Increasing_host_limit_for_pull_based_REX_transport_{context}"]
44
= Increasing host limit for pull-based REX transport
55

6-
You can tune the `mosquitto` MQTT server and increase the number of hosts connected to it.
6+
You can tune the `mosquitto` MQTT server and increase the maximum number of hosts connected to it (by default it's 1014).
77

88
.Procedure
9-
. Enable pull-based remote execution on your {ProjectServer} or {SmartProxyServer}:
9+
This example configures the `mosquitto` service on a {ProjectServer} or {SmartProxyServer} to handle 5000 content hosts.
10+
11+
. Add the following to `/etc/foreman-installer/custom-hiera.yaml` to increase the default value:
1012
+
1113
[options="nowrap", subs="+quotes,verbatim,attributes"]
1214
----
13-
# {foreman-installer} --foreman-proxy-plugin-remote-execution-script-mode pull-mqtt
15+
cat >>/etc/foreman-installer/custom-hiera.yaml <<EOF
16+
17+
systemd::dropin_files:
18+
limits.conf:
19+
unit: mosquitto.service
20+
content: "[Service]\nLimitNOFILE=5000\n"
21+
EOF
1422
----
15-
+
16-
Note that your {ProjectServer} or {SmartProxyServer} can only use one transport mode, either SSH or MQTT.
17-
. Create a config file to increase the default number of hosts accepted by the MQTT service:
23+
. Enable pull-based remote execution:
1824
+
1925
[options="nowrap", subs="+quotes,verbatim,attributes"]
2026
----
21-
cat >/etc/systemd/system/mosquitto.service.d/limits.conf <<__EOF__
22-
[Service]
23-
LimitNOFILE=5000
24-
__EOF__
27+
# {foreman-installer} --foreman-proxy-plugin-remote-execution-script-mode pull-mqtt
2528
----
2629
+
27-
This example sets the limit to allow the `mosquitto` service to handle 5000 hosts.
28-
. Apply your changes:
29-
+
30-
[options="nowrap", subs="+quotes,verbatim,attributes"]
31-
----
32-
# systemctl daemon-reload
33-
# systemctl restart mosquitto.service
34-
----
30+
Note that your {ProjectServer} or {SmartProxyServer} can only use one transport mode, either SSH or MQTT.

0 commit comments

Comments
 (0)