Skip to content

Commit b771fca

Browse files
committed
Docs from openstack admin guide
1 parent dbf644c commit b771fca

22 files changed

+2195
-48
lines changed

doc/source/configuration/cephadm.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
====
2-
Ceph
3-
====
1+
.. _cephadm-kayobe:
2+
3+
================
4+
Cephadm & Kayobe
5+
================
46

57
This section describes how to use the Cephadm integration included in StackHPC
68
Kayobe configuration to deploy Ceph.

doc/source/configuration/ci-cd.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,26 @@ Runner Deployment
5757
Ideally an Infra VM could be used here or failing that the control host.
5858
Wherever it is deployed the host will need access to the :code:`admin_network`, :code:`public_network` and the :code:`pulp registry` on the seed.
5959

60-
2. Edit the environment's :code:`${KAYOBE_CONFIG_PATH}/environments/${KAYOBE_ENVIRONMENT}/inventory/groups` to add the predefined :code:`github-runners` group to :code:`infra-vms`
60+
2. Edit the environment's :code:`$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/inventory/groups` to add the predefined :code:`github-runners` group to :code:`infra-vms`
6161

6262
.. code-block:: ini
6363
6464
[infra-vms:children]
6565
github-runners
6666
67-
3. Edit the environment's :code:`${KAYOBE_CONFIG_PATH}/environments/${KAYOBE_ENVIRONMENT}/inventory/hosts` to define the host(s) that will host the runners.
67+
3. Edit the environment's :code:`$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/inventory/hosts` to define the host(s) that will host the runners.
6868

6969
.. code-block:: ini
7070
7171
[github-runners]
7272
prod-runner-01
7373
74-
4. Provide all the relevant Kayobe :code:`group_vars` for :code:`github-runners` under :code:`${KAYOBE_CONFIG_PATH}/environments/${KAYOBE_ENVIRONMENT}/inventory/group_vars/github-runners`
74+
4. Provide all the relevant Kayobe :code:`group_vars` for :code:`github-runners` under :code:`$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/inventory/group_vars/github-runners`
7575
* `infra-vms` ensuring all required `infra_vm_extra_network_interfaces` are defined
7676
* `network-interfaces`
7777
* `python-interpreter.yml` ensuring that `ansible_python_interpreter: /usr/bin/python3` has been set
7878

79-
5. Edit the ``${KAYOBE_CONFIG_PATH}/inventory/group_vars/github-runners/runners.yml`` file which will contain the variables required to deploy a series of runners.
79+
5. Edit the ``$KAYOBE_CONFIG_PATH/inventory/group_vars/github-runners/runners.yml`` file which will contain the variables required to deploy a series of runners.
8080
Below is a core set of variables that will require consideration and modification for successful deployment of the runners.
8181
The number of runners deployed can be configured by removing and extending the dict :code:`github-runners`.
8282
As for how many runners present three is suitable number as this would prevent situations where long running jobs could halt progress other tasks whilst waiting for a free runner.
@@ -120,7 +120,7 @@ Runner Deployment
120120

121121
7. If the host is an actual Infra VM then please refer to upstream `Infrastructure VMs <https://docs.openstack.org/kayobe/latest/configuration/reference/infra-vms.html>`__ documentation for additional configuration and steps.
122122

123-
8. Run :code:`kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/deploy-github-runner.yml`
123+
8. Run :code:`kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/deploy-github-runner.yml`
124124

125125
9. Check runners have registered properly by visiting the repository's :code:`Action` tab -> :code:`Runners` -> :code:`Self-hosted runners`
126126

@@ -130,9 +130,9 @@ Runner Deployment
130130
Workflow Deployment
131131
-------------------
132132

133-
1. Edit :code:`${KAYOBE_CONFIG_PATH}/inventory/group_vars/github-writer/writer.yml` in the base configuration making the appropriate changes to your deployments specific needs. See documentation for `stackhpc.kayobe_workflows.github <https://github.com/stackhpc/ansible-collection-kayobe-workflows/tree/main/roles/github>`__.
133+
1. Edit :code:`$KAYOBE_CONFIG_PATH/inventory/group_vars/github-writer/writer.yml` in the base configuration making the appropriate changes to your deployments specific needs. See documentation for `stackhpc.kayobe_workflows.github <https://github.com/stackhpc/ansible-collection-kayobe-workflows/tree/main/roles/github>`__.
134134

135-
2. Run :code:`kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/write-github-workflows.yml`
135+
2. Run :code:`kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/write-github-workflows.yml`
136136

137137
3. Add all required secrets and variables to repository either via the GitHub UI or GitHub CLI (may require repository owner)
138138

doc/source/configuration/lvm.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ hosts:
9393

9494
.. code-block:: console
9595
96-
mkdir -p ${KAYOBE_CONFIG_PATH}/hooks/overcloud-host-configure/pre.d
97-
cd ${KAYOBE_CONFIG_PATH}/hooks/overcloud-host-configure/pre.d
96+
mkdir -p $KAYOBE_CONFIG_PATH/hooks/overcloud-host-configure/pre.d
97+
cd $KAYOBE_CONFIG_PATH/hooks/overcloud-host-configure/pre.d
9898
ln -s ../../../ansible/growroot.yml 30-growroot.yml

doc/source/configuration/monitoring.rst

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Monitoring
33
==========
44

5+
.. _monitoring-service-configuration:
6+
57
Monitoring Configuration
68
========================
79

doc/source/configuration/release-train.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _stackhpc_release_train:
1+
.. _stackhpc-release-train:
22

33
======================
44
StackHPC Release Train

doc/source/configuration/vault.rst

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _hashicorp-vault:
2+
13
================================
24
Hashicorp Vault for internal PKI
35
================================
@@ -168,6 +170,9 @@ Certificates generation
168170
Create the external TLS certificates (testing only)
169171
---------------------------------------------------
170172

173+
This method should only be used for testing. For external TLS on production systems,
174+
See `Installing External TLS Certificates <installing-external-tls-certificates>`__.
175+
171176
Typically external API TLS certificates should be generated by a organisation's trusted internal or third-party CA.
172177
For test and development purposes it is possible to use Vault as a CA for the external API.
173178

doc/source/configuration/wazuh.rst

+52-19
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22
Wazuh
33
=====
44

5+
`Wazuh <https://wazuh.com>`_ is a security monitoring platform.
6+
It monitors for:
7+
8+
* Security-related system events.
9+
* Known vulnerabilities (CVEs) in versions of installed software.
10+
* Misconfigurations in system security.
11+
512
The short version
613
=================
714

815
#. Create an infrastructure VM for the Wazuh manager, and add it to the wazuh-manager group
916
#. Configure the infrastructure VM with kayobe: ``kayobe infra vm host configure``
1017
#. Edit your config under
11-
``etc/kayobe/inventory/group_vars/wazuh-manager/wazuh-manager``, in
18+
``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/wazuh-manager``, in
1219
particular the defaults assume that the ``provision_oc_net`` network will be
1320
used.
1421
#. Generate secrets: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml``
@@ -27,14 +34,14 @@ Provisioning an infra VM for Wazuh Manager.
2734
Kayobe supports :kayobe-doc:`provisioning infra VMs <deployment.html#infrastructure-vms>`.
2835
The following configuration may be used as a guide. Config for infra VMs is documented :kayobe-doc:`here <configuration/reference/infra-vms>`.
2936

30-
Add a Wazuh Manager host to the ``wazuh-manager`` group in ``etc/kayobe/inventory/hosts``.
37+
Add a Wazuh Manager host to the ``wazuh-manager`` group in ``$KAYOBE_CONFIG_PATH/inventory/hosts``.
3138

3239
.. code-block:: ini
3340
3441
[wazuh-manager]
3542
os-wazuh
3643
37-
Add the ``wazuh-manager`` group to the ``infra-vms`` group in ``etc/kayobe/inventory/groups``.
44+
Add the ``wazuh-manager`` group to the ``infra-vms`` group in ``$KAYOBE_CONFIG_PATH/inventory/groups``.
3845

3946
.. code-block:: ini
4047
@@ -43,7 +50,7 @@ Add the ``wazuh-manager`` group to the ``infra-vms`` group in ``etc/kayobe/inven
4350
[infra-vms:children]
4451
wazuh-manager
4552
46-
Define VM sizing in ``etc/kayobe/inventory/group_vars/wazuh-manager/infra-vms``:
53+
Define VM sizing in ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/infra-vms``:
4754

4855
.. code-block:: yaml
4956
@@ -57,7 +64,7 @@ Define VM sizing in ``etc/kayobe/inventory/group_vars/wazuh-manager/infra-vms``:
5764
# Capacity of the infra VM data volume.
5865
infra_vm_data_capacity: "200G"
5966
60-
Optional: define LVM volumes in ``etc/kayobe/inventory/group_vars/wazuh-manager/lvm``.
67+
Optional: define LVM volumes in ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/lvm``.
6168
``/var/ossec`` often requires greater storage space, and ``/var/lib/wazuh-indexer``
6269
may be beneficial too.
6370

@@ -79,7 +86,7 @@ may be beneficial too.
7986
create: true
8087
8188
82-
Define network interfaces ``etc/kayobe/inventory/group_vars/wazuh-manager/network-interfaces``:
89+
Define network interfaces ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/network-interfaces``:
8390

8491
(The following is an example - the names will depend on your particular network configuration.)
8592

@@ -91,7 +98,7 @@ Define network interfaces ``etc/kayobe/inventory/group_vars/wazuh-manager/networ
9198
9299
93100
The Wazuh manager may need to be exposed externally, in which case it may require another interface.
94-
This can be done as follows in ``etc/kayobe/inventory/group_vars/wazuh-manager/network-interfaces``,
101+
This can be done as follows in ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/network-interfaces``,
95102
with the network defined in ``networks.yml`` as usual.
96103

97104
.. code-block:: yaml
@@ -183,7 +190,7 @@ Deploying Wazuh Manager services
183190
Setup
184191
-----
185192

186-
To install a specific version modify the wazuh-ansible entry in ``etc/kayobe/ansible/requirements.yml``:
193+
To install a specific version modify the wazuh-ansible entry in ``$KAYOBE_CONFIG_PATH/ansible/requirements.yml``:
187194

188195
.. code-block:: yaml
189196
@@ -204,7 +211,7 @@ Edit the playbook and variables to your needs:
204211
Wazuh manager configuration
205212
---------------------------
206213

207-
Wazuh manager playbook is located in ``etc/kayobe/ansible/wazuh-manager.yml``.
214+
Wazuh manager playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml``.
208215
Running this playbook will:
209216

210217
* generate certificates for wazuh-manager
@@ -214,7 +221,7 @@ Running this playbook will:
214221
* setup and deploy wazuh-dashboard on wazuh-manager vm
215222
* copy certificates over to wazuh-manager vm
216223

217-
Wazuh manager variables file is located in ``etc/kayobe/inventory/group_vars/wazuh-manager/wazuh-manager``.
224+
Wazuh manager variables file is located in ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/wazuh-manager``.
218225

219226
You may need to modify some of the variables, including:
220227

@@ -225,31 +232,38 @@ You may need to modify some of the variables, including:
225232

226233
If you are using multiple environments, and you need to customise Wazuh in
227234
each environment, create override files in an appropriate directory,
228-
for example ``etc/kayobe/environments/production/inventory/group_vars/``.
235+
for example ``$KAYOBE_CONFIG_PATH/environments/production/inventory/group_vars/``.
229236

230237
Files which values can be overridden (in the context of Wazuh):
231238

232-
- etc/kayobe/inventory/group_vars/wazuh/wazuh-manager/wazuh-manager
233-
- etc/kayobe/wazuh-manager.yml
234-
- etc/kayobe/inventory/group_vars/wazuh/wazuh-agent/wazuh-agent
239+
- $KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh/wazuh-manager/wazuh-manager
240+
- $KAYOBE_CONFIG_PATH/wazuh-manager.yml
241+
- $KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh/wazuh-agent/wazuh-agent
242+
243+
You'll need to run ``wazuh-manager.yml`` playbook again to apply customisation.
235244

236245
Secrets
237246
-------
238247

239-
Wazuh secrets playbook is located in ``etc/kayobe/ansible/wazuh-secrets.yml``.
248+
Wazuh requires that secrets or passwords are set for itself and the services with which it communiticates.
249+
Wazuh secrets playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml``.
240250
Running this playbook will generate and put pertinent security items into secrets
241251
vault file which will be placed in ``$KAYOBE_CONFIG_PATH/wazuh-secrets.yml``.
242252
If using environments it ends up in ``$KAYOBE_CONFIG_PATH/environments/<env_name>/wazuh-secrets.yml``
243253
Remember to encrypt!
244254

245-
Wazuh secrets template is located in ``etc/kayobe/ansible/templates/wazuh-secrets.yml.j2``.
255+
Wazuh secrets template is located in ``$KAYOBE_CONFIG_PATH/ansible/templates/wazuh-secrets.yml.j2``.
246256
It will be used by wazuh secrets playbook to generate wazuh secrets vault file.
247257

248258

249259
.. code-block:: console
250260
251261
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml
252262
263+
.. note:: Use ``ansible-vault`` to view the secrets:
264+
265+
``ansible-vault view --vault-password-file ~/vault.password $KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-manager/wazuh-secrets.yml``
266+
253267
Configure Wazuh Dashboard's Server Host
254268
---------------------------------------
255269

@@ -361,7 +375,7 @@ Verification
361375
------------
362376

363377
The Wazuh portal should be accessible on port 443 of the Wazuh
364-
manager’s IPs (using HTTPS, with the root CA cert in ``etc/kayobe/ansible/wazuh/certificates/wazuh-certificates/root-ca.pem``).
378+
manager’s IPs (using HTTPS, with the root CA cert in ``$KAYOBE_CONFIG_PATH/ansible/wazuh/certificates/wazuh-certificates/root-ca.pem``).
365379
The first login should be as the admin user,
366380
with the opendistro_admin_password password in ``$KAYOBE_CONFIG_PATH/wazuh-secrets.yml``.
367381
This will create the necessary indices.
@@ -373,9 +387,9 @@ Logs are in ``/var/log/wazuh-indexer/wazuh.log``. There are also logs in the jou
373387
Wazuh agents
374388
============
375389

376-
Wazuh agent playbook is located in ``etc/kayobe/ansible/wazuh-agent.yml``.
390+
Wazuh agent playbook is located in ``$KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml``.
377391

378-
Wazuh agent variables file is located in ``etc/kayobe/inventory/group_vars/wazuh-agent/wazuh-agent``.
392+
Wazuh agent variables file is located in ``$KAYOBE_CONFIG_PATH/inventory/group_vars/wazuh-agent/wazuh-agent``.
379393

380394
You may need to modify some variables, including:
381395

@@ -385,6 +399,25 @@ Deploy the Wazuh agents:
385399

386400
``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml``
387401

402+
The Wazuh Agent is deployed to all hosts in the ``wazuh-agent``
403+
inventory group, comprising the ``seed`` group
404+
plus the ``overcloud`` group (containing all hosts in the
405+
OpenStack control plane).
406+
407+
.. code-block:: ini
408+
409+
[wazuh-agent:children]
410+
seed
411+
overcloud
412+
413+
The hosts running Wazuh Agent should automatically be registered
414+
and visible within the Wazuh Manager dashboard.
415+
416+
.. note:: It is good practice to use a `Kayobe deploy hook
417+
<https://docs.openstack.org/kayobe/latest/custom-ansible-playbooks.html#hooks>`_
418+
to automate deployment and configuration of the Wazuh Agent
419+
following a run of ``kayobe overcloud host configure``.
420+
388421
Verification
389422
------------
390423

doc/source/contributor/pre-commit.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Once done you should find `pre-commit` is available within the `kayobe` virtuale
2929

3030
To run the playbook using the following command
3131

32-
- ``kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/install-pre-commit-hooks.yml``
32+
- ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/install-pre-commit-hooks.yml``
3333

3434
Whereas to run the playbook when control host bootstrap runs ensure it registered as symlink using the following command
3535

36-
- ``mkdir -p ${KAYOBE_CONFIG_PATH}/hooks/control-host-bootstrap/post.d``
37-
- ``ln -s ${KAYOBE_CONFIG_PATH}/ansible/install-pre-commit-hooks.yml ${KAYOBE_CONFIG_PATH}/hooks/control-host-bootstrap/post.d/install-pre-commit-hooks.yml``
36+
- ``mkdir -p $KAYOBE_CONFIG_PATH/hooks/control-host-bootstrap/post.d``
37+
- ``ln -s $KAYOBE_CONFIG_PATH/ansible/install-pre-commit-hooks.yml $KAYOBE_CONFIG_PATH/hooks/control-host-bootstrap/post.d/install-pre-commit-hooks.yml``
3838

3939
All that remains is the installation of the hooks themselves which can be accomplished either by
4040
running `pre-commit run` or using `git commit` when you have changes that need to be committed.

0 commit comments

Comments
 (0)