Skip to content

Commit c87ec0a

Browse files
authored
Merge branch 'stackhpc/yoga' into add-kayobe-workflows
2 parents e85da18 + c872280 commit c87ec0a

26 files changed

+1026
-105
lines changed

.github/workflows/overcloud-host-image-build.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ on:
2323
description: Build Ubuntu 22.04 Jammy
2424
type: boolean
2525
default: true
26-
SMS:
27-
description: Push images to SMS
28-
type: boolean
29-
default: true
3026
secrets:
3127
KAYOBE_VAULT_PASSWORD:
3228
required: true
@@ -187,7 +183,7 @@ jobs:
187183
env:
188184
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
189185
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
190-
if: inputs.centos && steps.build_centos_stream_8.outcome == 'success' && inputs.sms
186+
if: inputs.centos && steps.build_centos_stream_8.outcome == 'success'
191187

192188
- name: Build a Rocky Linux 8 overcloud host image
193189
id: build_rocky_8
@@ -231,7 +227,7 @@ jobs:
231227
env:
232228
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
233229
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
234-
if: inputs.rocky8 && steps.build_rocky_8.outcome == 'success' && inputs.sms
230+
if: inputs.rocky8 && steps.build_rocky_8.outcome == 'success'
235231

236232
- name: Build a Rocky Linux 9 overcloud host image
237233
id: build_rocky_9
@@ -275,7 +271,7 @@ jobs:
275271
env:
276272
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
277273
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
278-
if: inputs.rocky9 && steps.build_rocky_9.outcome == 'success' && inputs.sms
274+
if: inputs.rocky9 && steps.build_rocky_9.outcome == 'success'
279275

280276
- name: Build an Ubuntu Focal 20.04 overcloud host image
281277
id: build_ubuntu_focal
@@ -319,7 +315,7 @@ jobs:
319315
env:
320316
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
321317
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
322-
if: inputs.ubuntu-focal && steps.build_ubuntu_focal.outcome == 'success' && inputs.sms
318+
if: inputs.ubuntu-focal && steps.build_ubuntu_focal.outcome == 'success'
323319

324320
- name: Build an Ubuntu Jammy 22.04 overcloud host image
325321
id: build_ubuntu_jammy
@@ -363,7 +359,7 @@ jobs:
363359
env:
364360
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
365361
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
366-
if: inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success' && inputs.sms
362+
if: inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success'
367363

368364
- name: Upload updated images artifact
369365
uses: actions/upload-artifact@v3

doc/source/configuration/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ the various features provided.
1919
vault
2020
magnum-capi
2121
ci-cd
22+
security-hardening
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
==================
2+
Security Hardening
3+
==================
4+
5+
CIS Benchmark Hardening
6+
-----------------------
7+
8+
The roles from the `Ansible-Lockdown <https://github.com/ansible-lockdown>`_
9+
project are used to harden hosts in accordance with the CIS benchmark criteria.
10+
It won't get your benchmark score to 100%, but should provide a significant
11+
improvement over an unhardened system. A typical score would be 70%.
12+
13+
The following operating systems are supported:
14+
15+
- Rocky 8, RHEL 8, CentOS Stream 8
16+
- Ubuntu 22.04
17+
- Rocky 9
18+
19+
Configuration
20+
--------------
21+
22+
Some overrides to the role defaults are provided in
23+
``$KAYOBE_CONFIG_PATH/inventory/group_vars/overcloud/cis``. These may not be
24+
suitable for all deployments and so some fine tuning may be required. For
25+
instance, you may want different rules on a network node compared to a
26+
controller. It is best to consult the upstream role documentation for details
27+
about what each variable does. The documentation can be found here:
28+
29+
- `Rocky 8, RHEL 8, CentOS Stream 8 <https://github.com/ansible-lockdown/RHEL8-CIS/tree/1.3.0>`__
30+
- `Ubuntu 22.04 <https://github.com/ansible-lockdown/UBUNTU22-CIS>`__
31+
- `Rocky 9 <https://github.com/ansible-lockdown/RHEL9-CIS>`__
32+
33+
Running the playbooks
34+
---------------------
35+
36+
As there is potential for unintended side effects when applying the hardening
37+
playbooks, the playbooks are not currently enabled by default. It is recommended
38+
that they are first applied to a representative staging environment to determine
39+
whether or not workloads or API requests are affected by any configuration changes.
40+
41+
.. code-block:: console
42+
43+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cis.yml
44+

doc/source/operations/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ This guide is for operators of the StackHPC Kayobe configuration project.
1010
rabbitmq
1111
octavia
1212
hotfix-playbook
13+
rocky-linux-9

doc/source/operations/octavia.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,55 @@ when building new images.
3838

3939
To rollback an image update, simply delete the old image. The next newest image with
4040
a tag matching ``amp_image_tag`` will be selected.
41+
42+
Manually deleting broken load balancers
43+
=======================================
44+
45+
Sometimes, a load balancer will get stuck in a broken state of ``PENDING_CREATE`` or ``PENDING_UPDATE``.
46+
When in this state, the load balancer cannot be deleted; you will see the error ``Invalid state PENDING_CREATE of loadbalancer resource``.
47+
To delete a load balancer in this state, you will need to manually update its provisioning status in the database.
48+
49+
Find the database password:
50+
51+
.. code-block:: console
52+
53+
ansible-vault view --vault-password-file <path-to-vault-pw> $KOLLA_CONFIG_PATH/passwords.yml
54+
55+
# Search for database_password with:
56+
/^database
57+
58+
Access the database from a controller:
59+
60+
.. code-block:: console
61+
62+
docker exec -it mariadb bash
63+
mysql -u root -p octavia
64+
# Enter the database password when promted.
65+
66+
List the load balancers to find the ID of the broken one(s):
67+
68+
.. code-block:: console
69+
70+
SELECT * FROM load_balancer;
71+
72+
Set the provisioning status to ERROR for any broken load balancer:
73+
74+
.. code-block:: console
75+
76+
UPDATE load_balancer SET provisioning_status='ERROR' WHERE id='<id>';
77+
78+
Delete the load balancer from the OpenStack CLI, cascading if any stray
79+
Amphorae are hanging around:
80+
81+
.. code-block:: console
82+
83+
openstack loadbalancer delete <id> --cascade
84+
85+
86+
Sometimes, Amphora may also fail to delete if they are stuck in state
87+
``BOOTING``. These can be resolved entirely from the OpenStack CLI:
88+
89+
.. code-block:: console
90+
91+
openstack loadbalancer amphora configure <amphora-id>
92+
openstack loadbalancer amphora delete <amphora-id>

0 commit comments

Comments
 (0)