Skip to content

Commit a0f85e2

Browse files
authored
Merge branch 'stackhpc/2023.1' into feature/2023.1/infiniband
2 parents bbf4ac7 + a22c955 commit a0f85e2

37 files changed

+474
-36
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Generate inputs for the reusable multinode.yml workflow.
2+
# The test scenario is randomly selected.
3+
# The inputs are printed to stdout in GitHub step output key=value format.
4+
5+
from dataclasses import dataclass
6+
import random
7+
import typing as t
8+
9+
10+
@dataclass
11+
class OSRelease:
12+
distribution: str
13+
release: str
14+
ssh_username: str
15+
16+
17+
@dataclass
18+
class OpenStackRelease:
19+
version: str
20+
previous_version: str
21+
os_releases: t.List[OSRelease]
22+
23+
24+
@dataclass
25+
class Scenario:
26+
openstack_release: OpenStackRelease
27+
os_release: OSRelease
28+
neutron_plugin: str
29+
upgrade: bool
30+
31+
32+
ROCKY_9 = OSRelease("rocky", "9", "cloud-user")
33+
UBUNTU_JAMMY = OSRelease("ubuntu", "jammy", "ubuntu")
34+
# NOTE(upgrade): Add supported releases here.
35+
OPENSTACK_RELEASES = [
36+
OpenStackRelease("2023.1", "zed", [ROCKY_9, UBUNTU_JAMMY])
37+
]
38+
NEUTRON_PLUGINS = ["ovs", "ovn"]
39+
40+
41+
def main() -> None:
42+
scenario = random_scenario()
43+
inputs = generate_inputs(scenario)
44+
for name, value in inputs.items():
45+
write_output(name, value)
46+
47+
48+
def random_scenario() -> Scenario:
49+
openstack_release = random.choice(OPENSTACK_RELEASES)
50+
os_release = random.choice(openstack_release.os_releases)
51+
neutron_plugin = random.choice(NEUTRON_PLUGINS)
52+
upgrade = random.random() > 0.6
53+
return Scenario(openstack_release, os_release, neutron_plugin, upgrade)
54+
55+
56+
def generate_inputs(scenario: Scenario) -> t.Dict[str, str]:
57+
branch = get_branch(scenario.openstack_release.version)
58+
previous_branch = get_branch(scenario.openstack_release.previous_version)
59+
inputs = {
60+
"os_distribution": scenario.os_release.distribution,
61+
"os_release": scenario.os_release.release,
62+
"ssh_username": scenario.os_release.ssh_username,
63+
"neutron_plugin": scenario.neutron_plugin,
64+
"upgrade": str(scenario.upgrade).lower(),
65+
"stackhpc_kayobe_config_version": branch,
66+
"stackhpc_kayobe_config_previous_version": previous_branch,
67+
}
68+
return inputs
69+
70+
71+
def get_branch(version: str) -> str:
72+
return f"stackhpc/{version}"
73+
74+
75+
def write_output(name: str, value: str) -> None:
76+
print(f"{name}={value}")
77+
78+
79+
if __name__ == "__main__":
80+
main()
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
# This workflow provides a periodic deploy of a multi-node test cluster.
3+
# The test scenario is randomly selected.
4+
5+
name: Multinode periodic
6+
'on':
7+
schedule:
8+
# Runs nightly at 2:42 AM.
9+
- cron: "42 2 * * *"
10+
jobs:
11+
generate-inputs:
12+
name: Generate inputs
13+
runs-on: ubuntu-latest
14+
outputs:
15+
os_distribution: ${{ steps.generate-inputs.outputs.os_distribution }}
16+
os_release: ${{ steps.generate-inputs.outputs.os_release }}
17+
ssh_username: ${{ steps.generate-inputs.outputs.ssh_username }}
18+
neutron_plugin: ${{ steps.generate-inputs.outputs.neutron_plugin }}
19+
upgrade: ${{ steps.generate-inputs.outputs.upgrade }}
20+
stackhpc_kayobe_config_version: ${{ steps.generate-inputs.outputs.stackhpc_kayobe_config_version }}
21+
stackhpc_kayobe_config_previous_version: ${{ steps.generate-inputs.outputs.stackhpc_kayobe_config_previous_version }}
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Generate inputs for multinode workflow
27+
id: generate-inputs
28+
run: |
29+
python3 .github/workflows/multinode-inputs.py >> $GITHUB_OUTPUT
30+
31+
- name: Display generated inputs
32+
run: |
33+
echo '${{ toJSON(steps.generate-inputs.outputs) }}'
34+
multinode:
35+
name: Multinode periodic
36+
needs:
37+
- generate-inputs
38+
uses: stackhpc/stackhpc-openstack-gh-workflows/.github/workflows/[email protected]
39+
with:
40+
multinode_name: mn-prdc-${{ github.run_id }}
41+
os_distribution: ${{ needs.generate-inputs.outputs.os_distribution }}
42+
os_release: ${{ needs.generate-inputs.outputs.os_release }}
43+
ssh_username: ${{ needs.generate-inputs.outputs.ssh_username }}
44+
neutron_plugin: ${{ needs.generate-inputs.outputs.neutron_plugin }}
45+
upgrade: ${{ needs.generate-inputs.outputs.upgrade == 'true' }}
46+
stackhpc_kayobe_config_version: ${{ needs.generate-inputs.outputs.stackhpc_kayobe_config_version }}
47+
stackhpc_kayobe_config_previous_version: ${{ needs.generate-inputs.outputs.stackhpc_kayobe_config_previous_version }}
48+
enable_slack_alert: true
49+
secrets: inherit
50+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
# This workflow provides a workflow_dispatch (manual) trigger to deploy a
3+
# multi-node test cluster.
4+
5+
name: Multinode
6+
'on':
7+
workflow_dispatch:
8+
# NOTE: workflow_dispatch is limited to 10 inputs.
9+
inputs:
10+
multinode_name:
11+
description: Multinode cluster name
12+
type: string
13+
required: true
14+
os_distribution:
15+
description: Host OS distribution
16+
type: choice
17+
default: rocky
18+
options:
19+
- rocky
20+
- ubuntu
21+
neutron_plugin:
22+
description: Neutron ML2 plugin
23+
type: choice
24+
default: ovn
25+
options:
26+
- ovn
27+
- ovs
28+
upgrade:
29+
description: Whether to perform an upgrade
30+
type: boolean
31+
default: false
32+
break_on:
33+
description: When to break execution for manual interaction
34+
type: choice
35+
default: never
36+
options:
37+
- always
38+
- failure
39+
- never
40+
- success
41+
break_duration:
42+
description: How long to break execution for (minutes)
43+
type: number
44+
default: 60
45+
ssh_key:
46+
description: SSH public key to authorise on Ansible control host
47+
type: string
48+
terraform_kayobe_multinode_version:
49+
description: terraform-kayobe-multinode version
50+
type: string
51+
default: main
52+
jobs:
53+
multinode:
54+
name: Multinode
55+
uses: stackhpc/stackhpc-openstack-gh-workflows/.github/workflows/[email protected]
56+
with:
57+
multinode_name: ${{ inputs.multinode_name }}
58+
os_distribution: ${{ inputs.os_distribution }}
59+
os_release: ${{ inputs.os_distribution == 'rocky' && '9' || 'jammy' }}
60+
ssh_username: ${{ inputs.os_distribution == 'rocky' && 'cloud-user' || 'ubuntu' }}
61+
neutron_plugin: ${{ inputs.neutron_plugin }}
62+
upgrade: ${{ inputs.upgrade }}
63+
break_on: ${{ inputs.break_on }}
64+
# Workaround loss of number type using fromJSON: https://github.com/orgs/community/discussions/67182
65+
break_duration: ${{ fromJSON(inputs.break_duration) }}
66+
ssh_key: ${{ inputs.ssh_key }}
67+
stackhpc_kayobe_config_version: ${{ github.ref_name }}
68+
# NOTE(upgrade): Reference the PREVIOUS release here.
69+
stackhpc_kayobe_config_previous_version: stackhpc/zed
70+
terraform_kayobe_multinode_version: ${{ inputs.terraform_kayobe_multinode_version }}
71+
secrets: inherit

doc/source/_static/images/release-train.svg

Lines changed: 1 addition & 1 deletion
Loading

doc/source/configuration/cephadm.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ should be used in the Kolla Manila configuration e.g.:
347347
RADOS Gateways
348348
--------------
349349

350+
RADOS Gateway integration is described in the :kolla-ansible-doc:`Kolla Ansible
351+
documentation
352+
<https://docs.openstack.org/kolla-ansible/latest/reference/storage/external-ceph-guide.html#radosgw>`.
353+
350354
RADOS Gateways (RGWs) are defined with the following:
351355

352356
.. code:: yaml
@@ -377,7 +381,7 @@ The set of commands below configure all of these.
377381
- "config set client.rgw rgw_enable_apis 's3, swift, swift_auth, admin'"
378382
- "config set client.rgw rgw_enforce_swift_acls true"
379383
- "config set client.rgw rgw_keystone_accepted_admin_roles 'admin'"
380-
- "config set client.rgw rgw_keystone_accepted_roles 'member, Member, _member_, admin'"
384+
- "config set client.rgw rgw_keystone_accepted_roles 'member, admin'"
381385
- "config set client.rgw rgw_keystone_admin_domain Default"
382386
- "config set client.rgw rgw_keystone_admin_password {{ secrets_ceph_rgw_keystone_password }}"
383387
- "config set client.rgw rgw_keystone_admin_project service"
@@ -393,6 +397,12 @@ The set of commands below configure all of these.
393397
- "config set client.rgw rgw_swift_account_in_url true"
394398
- "config set client.rgw rgw_swift_versioning_enabled true"
395399
400+
Enable the Kolla Ansible RADOS Gateway integration in ``kolla.yml``:
401+
402+
.. code:: yaml
403+
404+
kolla_enable_ceph_rgw: true
405+
396406
As we have configured Ceph to respond to Swift APIs, you will need to tell
397407
Kolla to account for this when registering Swift endpoints with Keystone. Also,
398408
when ``rgw_swift_account_in_url`` is set, the equivalent Kolla variable should
@@ -414,6 +424,11 @@ before deploying the RADOS gateways. If you are using the Kolla load balancer
414424
415425
kayobe overcloud service deploy -kt ceph-rgw,keystone,haproxy,loadbalancer
416426
427+
There are two options for load balancing RADOS Gateway:
428+
429+
1. HA with Ceph Ingress services
430+
2. RGWs with hyper-converged Ceph (using the Kolla Ansible deployed HAProxy
431+
load balancer)
417432

418433
.. _RGWs-with-hyper-converged-Ceph:
419434

doc/source/configuration/magnum-capi.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ To deploy the CAPI management cluster using this site-specific environment, run
6060

6161
.. code-block:: bash
6262
63-
# Activate the environment
64-
./bin/activate <site-specific-name>
65-
6663
# Install or update the local Ansible Python venv
6764
./bin/ensure-venv
6865
66+
# Activate the environment
67+
source bin/activate <site-specific-name>
68+
6969
# Install or update Ansible dependencies
7070
ansible-galaxy install -f -r ./requirements.yml
7171
@@ -103,12 +103,7 @@ To configure the Magnum service with the Cluster API driver enabled, first ensur
103103

104104
Next, copy the CAPI management cluster's kubeconfig file into your stackhpc-kayobe-config environment (e.g. ``<your-skc-environment>/kolla/config/magnum/kubeconfig``). This file must be Ansible vault encrypted.
105105

106-
The following config should also be set in your stackhpc-kayobe-config environment:
107-
108-
.. code-block:: yaml
109-
:caption: kolla/globals.yml
110-
111-
magnum_capi_helm_driver_enabled: true
106+
The presence of a kubeconfig file in the Magnum config directory is used by Kolla to determine whether the CAPI Helm driver should be enabled.
112107

113108
To apply the configuration, run ``kayobe overcloud service reconfigure -kt magnum``.
114109

doc/source/configuration/monitoring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ on the overcloud hosts:
7474
.. code-block:: console
7575
7676
(kayobe) [stack@node ~]$ cd etc/kayobe
77-
(kayobe) [stack@node kayobe]$ kayobe playbook run ansible/smartmontools.yml
77+
(kayobe) [stack@node kayobe]$ kayobe playbook run ansible/smartmon-tools.yml
7878
7979
SMART reporting should now be enabled along with a Prometheus alert for
8080
unhealthy disks and a Grafana dashboard called ``Hardware Overview``.

doc/source/configuration/wazuh.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The short version
1212
particular the defaults assume that the ``provision_oc_net`` network will be
1313
used.
1414
#. Generate secrets: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml``
15-
#. Encrypt the secrets: ``ansible-vault encrypt --vault-password-file ~/vault.password $KAYOBE_CONFIG_PATH/environments/ci-multinode/wazuh-secrets.yml``
1615
#. Deploy the Wazuh manager: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml``
1716
#. Deploy the Wazuh agents: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml``
1817

@@ -250,7 +249,6 @@ It will be used by wazuh secrets playbook to generate wazuh secrets vault file.
250249
.. code-block:: console
251250
252251
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml
253-
ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/wazuh-secrets.yml
254252
255253
Configure Wazuh Dashboard's Server Host
256254
---------------------------------------

doc/source/operations/upgrading-ceph.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Place the host or batch of hosts into maintenance mode:
6363

6464
.. code-block:: console
6565
66-
sudo cephadm shell -- ceph orch host maintenance enter <host>
66+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-enter-maintenance.yml -l <host>
6767
6868
To update all eligible packages, use ``*``, escaping if necessary:
6969

@@ -72,7 +72,8 @@ To update all eligible packages, use ``*``, escaping if necessary:
7272
kayobe overcloud host package update --packages "*" --limit <host>
7373
7474
If the kernel has been upgraded, reboot the host or batch of hosts to pick up
75-
the change:
75+
the change. While running this playbook, consider setting ``ANSIBLE_SERIAL`` to
76+
the maximum number of hosts that can safely reboot concurrently.
7677

7778
.. code-block:: console
7879
@@ -82,7 +83,7 @@ Remove the host or batch of hosts from maintenance mode:
8283

8384
.. code-block:: console
8485
85-
sudo cephadm shell -- ceph orch host maintenance exit <host>
86+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-exit-maintenance.yml -l <host>
8687
8788
Wait for Ceph health to return to ``HEALTH_OK``:
8889

0 commit comments

Comments
 (0)