|
1 | 1 | [id="Increasing_host_limit_for_pull_based_REX_transport_{context}"] |
2 | 2 | = Increasing host limit for pull-based REX transport |
3 | 3 |
|
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}_. |
5 | 12 |
|
6 | 13 | .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`: |
8 | 15 | + |
9 | 16 | [options="nowrap", subs="+quotes,verbatim,attributes"] |
10 | 17 | ---- |
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" |
12 | 22 | ---- |
| 23 | +. Re-run the installer for the changes to take effect: |
13 | 24 | + |
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"] |
29 | 26 | ---- |
30 | | -# systemctl daemon-reload |
31 | | -# systemctl restart mosquitto.service |
| 27 | +# {foreman-installer} |
32 | 28 | ---- |
0 commit comments