@@ -253,11 +253,28 @@ VM:
253
253
zone : " {{ admin_oc_net_name | net_zone }}"
254
254
state : disabled
255
255
256
- Extra rules have higher precedence than the default rules, but are not
256
+ Extra rules have higher precedence than the default rules but are not
257
257
validated before being applied. Use with caution. If you need to add a custom
258
258
rule, consider adding it to the default rule list with an appropriate boolean
259
259
condition, and where possible merge your changes back into upstream SKC.
260
260
261
+ Kolla-Ansible configuration
262
+ ---------------------------
263
+
264
+ Ensure Kolla Ansible opens up ports in firewalld for services on the public
265
+ API network:
266
+
267
+ .. code-block :: yaml
268
+ :caption : ` ` etc/kayobe/kolla/globals.yml``
269
+
270
+ enable_external_api_firewalld : true
271
+ external_api_firewalld_zone : " {{ public_net_name | net_zone }}"
272
+
273
+ Ensure every network in ``networks.yml `` has a zone defined. The standard
274
+ configuration is to set the internal network zone to ``trusted `` and every
275
+ other zone to the name of the network. See
276
+ ``etc/kayobe/environments/ci-multinode/networks.yml `` for a practical example.
277
+
261
278
Validation
262
279
----------
263
280
@@ -268,33 +285,55 @@ that will be applied to a host.
268
285
269
286
kayobe configuration dump --var-name stackhpc_firewalld_rules --limit < host>
270
287
271
- If the command above prints a template, rather than a clean list of rules, the
272
- configuration is invalid. The kayobe configuration dump command can be used on
273
- other variables such as ``stackhpc_firewalld_rules_default `` or
288
+ A shorter version, ``stackhpc_firewalld_rules_debug `` prints the rules in a
289
+ simplified format:
290
+
291
+ .. code-block :: bash
292
+
293
+ kayobe configuration dump --var-name stackhpc_firewalld_rules_debug --limit < host>
294
+
295
+ If the commands above print a template, rather than a list of rules, the
296
+ configuration may be invalid. The ``kayobe configuration dump `` command can be
297
+ used on other variables such as ``stackhpc_firewalld_rules_default `` or
274
298
``stackhpc_*_firewalld_rules_template `` to debug the configuration. See the
275
299
`How it works `_ section for more details.
276
300
277
- Kolla-Ansible configuration
278
- ---------------------------
301
+ It can be useful to print the active ports on each type of host, to create
302
+ rules for running services. The internal network is currently left open. The
303
+ below command will print all other open ports:
279
304
280
- Ensure Kolla Ansible opens up ports in firewalld for services on the public
281
- API network:
305
+ .. code-block :: bash
282
306
283
- .. code-block :: yaml
284
- :caption : ` ` etc/kayobe/kolla/globals.yml``
307
+ ss -lntpu | grep --invert-match ' <internal net ip>'
285
308
286
- enable_external_api_firewalld : true
287
- external_api_firewalld_zone : " {{ public_net_name | net_zone }} "
309
+ It is strongly recommended that you dry-run the changes using `` --diff `` and
310
+ `` --check `` before applying to a production system:
288
311
289
- Ensure every network in `` networks.yml `` has a zone defined. The standard
290
- configuration is to set the internal network zone to `` trusted `` and every
291
- other zone to the name of the network. See
292
- `` etc/ kayobe/environments/ci-multinode/networks.yml `` for a practical example.
312
+ .. code-block :: bash
313
+ :caption: ` ` Overcloud diff example ` `
314
+
315
+ kayobe overcloud host configure -t firewall --diff --check
293
316
294
317
Applying changes
295
318
----------------
296
319
297
- Use the ``kayobe * host configure `` commands to apply the changes:
320
+ Before applying these changes, you should be completely sure you are not going
321
+ to lock yourself out of any hosts. If you are deploying these changes to a test
322
+ environment, it might be appropriate to set a password on the stack user so
323
+ that you can access the host through a BMC or horizon console.
324
+
325
+ The following Kayobe command can be used to set a password on all overcloud
326
+ hosts:
327
+
328
+ .. code-block :: bash
329
+
330
+ kayobe overcloud host command run --command " echo 'stack:super-secret-password' | sudo chpasswd" --show-output
331
+
332
+ Changes should be applied to controllers one at a time to ensure connectivity
333
+ is not lost.
334
+
335
+ Once you are sure you know what you are doing, use the ``kayobe * host
336
+ configure `` commands to apply the firewall changes:
298
337
299
338
.. code-block :: bash
300
339
@@ -304,7 +343,13 @@ Use the ``kayobe * host configure`` commands to apply the changes:
304
343
kayobe seed host configure -t network,firewall
305
344
# For Infrastructure VM hosts
306
345
kayobe infra vm host configure -t network,firewall
307
- # For Overcloud hosts
346
+ # For the First Controller
347
+ kayobe overcloud host configure -t network,firewall -l controllers[0]
348
+ # For the Second Controller
349
+ kayobe overcloud host configure -t network,firewall -l controllers[1]
350
+ # For the Third Controller
351
+ kayobe overcloud host configure -t network,firewall -l controllers[2]
352
+ # For the rest of the Overcloud hosts
308
353
kayobe overcloud host configure -t network,firewall
309
354
310
355
How it works
0 commit comments