Skip to content

Commit 5a983b4

Browse files
authored
Merge branch 'stackhpc/2025.1' into gatherCloudFactsv2
2 parents 9d48307 + 443214e commit 5a983b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1012
-7
lines changed

.automation

doc/source/configuration/magnum-capi.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ The Cluster API architecture relies on a CAPI management cluster in order to run
1515

1616
2. It must be reachable from the control plane nodes (either controllers or dedicated network hosts) on which the Magnum containers are running (so that the Magnum can reach the IP listed in the management cluster's ``kubeconfig`` file).
1717

18+
The Magnum Cluster API driver requires that Barbican, Octavia, and Redis are deployed and working in your OpenStack environment. Octavia can be deployed with either the Amphora or OVN drivers, but the OVN driver is recommended for new deployments.
19+
1820
For testing purposes, a simple `k3s <https://k3s.io>`_ cluster would suffice. For production deployments, the recommended solution is to instead set up a separate HA management cluster in an isolated OpenStack project by leveraging the CAPI management cluster configuration used in `Azimuth <https://github.com/stackhpc/azimuth>`_. This approach will provide a resilient HA management cluster with a standard set of component versions that are regularly tested in Azimuth CI.
1921
The general process for setting up this CAPI management cluster using Azimuth tooling is described here, but the `Azimuth operator documentation <https://stackhpc.github.io/azimuth-config/#deploying-azimuth>`_ should be consulted for additional information if required.
2022

@@ -105,7 +107,21 @@ Next, copy the CAPI management cluster's kubeconfig file into your stackhpc-kayo
105107

106108
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.
107109

108-
To apply the configuration, run ``kayobe overcloud service reconfigure -kt magnum``.
110+
If Magnum is already deployed, apply the configuration with ``kayobe overcloud service reconfigure -kt magnum``.
111+
112+
If Magnum is not yet deployed, enable it and its dependencies in your kayobe environment's ``kolla.yml`` file:
113+
114+
.. code-block:: yaml
115+
:caption: kolla.yml
116+
117+
kolla_enable_magnum: true
118+
kolla_enable_octavia: true
119+
kolla_enable_barbican: true
120+
kolla_enable_redis: true
121+
122+
See the `Kolla-Ansible documentation <https://docs.openstack.org/kolla-ansible/latest/reference/networking/octavia.html>`_ for more details on configuring Octavia.
123+
124+
Deploy the services with ``kayobe overcloud service deploy``.
109125

110126
Magnum Cluster Templates
111127
========================
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
==========
2+
ci-tenks
3+
==========
4+
5+
The ``ci-tenks`` Kayobe environment is used to test seed services.
6+
It is currently a work in progress.
7+
8+
The environment is deployed using `automated-deployment.sh`. It bootstraps
9+
localhost as a hypervisor for a seed and one controller instance. The seed
10+
provisions the controller with Bifrost.
11+
12+
It currently tests:
13+
14+
* Seed hypervisor host configuration
15+
* Seed VM provisioning
16+
* Seed host configuration
17+
* Pulp deployment
18+
* Pulp container syncing (one container - Bifrost)
19+
* Bifrost overcloud provisioning
20+
21+
In the future it could test:
22+
23+
* Pulp package syncing
24+
* Overcloud host configuration, pulling packages from a local Pulp
25+
* Upgrades (Host OS and OpenStack)
26+
* Multi-node OpenStack deployments
27+
28+
* Multiple controllers
29+
* Multiple compute nodes (and live migration)
30+
* Multiple storage nodes (Ceph)
31+
32+
These extensions depend on more SMS hypervisor capacity and improved sync times
33+
for the local Pulp instance.
34+
35+
Prerequisites
36+
=============
37+
38+
* A Rocky Linux 9 or Ubuntu Noble 24.04 host
39+
* 16GB of memory
40+
* 4 cores
41+
* No LVM
42+
43+
Setup
44+
=====
45+
46+
The environment is designed to run in CI, however can also be deployed
47+
manually.
48+
49+
Access the host via SSH. You may wish to start a ``tmux`` session.
50+
51+
Download the setup script:
52+
53+
.. parsed-literal::
54+
55+
curl -LO https://raw.githubusercontent.com/stackhpc/stackhpc-kayobe-config/stackhpc/2025.1/etc/kayobe/environments/ci-tenks/automated-deployment.sh
56+
57+
Change the permissions on the script:
58+
59+
.. parsed-literal::
60+
61+
sudo chmod +x automated-deployment.sh
62+
63+
Acquire the Ansible Vault password for this repository, and store a
64+
copy at ``~/vault-pw``.
65+
66+
.. note::
67+
68+
The vault password is currently the same as for the ``ci-aio``
69+
environment.
70+
71+
Run the setup script:
72+
73+
.. parsed-literal::
74+
75+
./automated-deployment.sh

doc/source/contributor/environments/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ The following Kayobe environments are provided with this configuration:
99
ci-aio
1010
ci-builder
1111
ci-multinode
12+
ci-tenks
1213
aufn-ceph

etc/kayobe/ansible/diagnostics.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
- name: Collect diagnostic information
1010
hosts: seed-hypervisor:seed:overcloud:infra-vms
1111
vars:
12-
diagnostics_path_local: "{{ lookup('env', 'PWD') }}/diagnostics"
12+
diagnostics_path_local: "{{ lookup('env', 'HOME') }}/diagnostics"
1313
tasks:
1414
- name: Run diagnostics
1515
block:
16+
- name: Create a local directory to sync diagnostics
17+
ansible.builtin.file:
18+
path: "{{ diagnostics_path_local }}"
19+
state: directory
20+
delegate_to: localhost
21+
run_once: true
22+
1623
- name: Create a temporary directory for diagnostics
1724
ansible.builtin.tempfile:
1825
state: directory
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# CI-Tenks Kayobe Environment
2+
3+
This Kayobe environment is designed for use in CI, primarily to test Seed
4+
service deployment and Bifrost provisioning. It is currently a work in
5+
progress.
6+
7+
The environment is deployed using the `automated-deployment.sh` script. This
8+
script bootstraps the localhost as a hypervisor for a Seed and one Controller
9+
instance. The Seed provisions the Controller using Bifrost.
10+
11+
### Current Tests
12+
13+
The environment currently tests the following:
14+
15+
* Seed Hypervisor host configuration
16+
* Seed VM provisioning
17+
* Seed host configuration
18+
* Pulp deployment
19+
* Pulp container syncing (one container - Bifrost)
20+
* Bifrost Overcloud provisioning
21+
22+
### Future Enhancements
23+
24+
Potential future tests include:
25+
26+
* Pulp package syncing
27+
* Overcloud host configuration, pulling packages from a local Pulp instance
28+
* Full openstack service deployment (AIO or otherwise)
29+
* Upgrades (Host OS and OpenStack)
30+
* Multi-node OpenStack deployments:
31+
* Multiple Controllers
32+
* Multiple Compute nodes (including live migration)
33+
* Multiple Storage nodes (e.g., Ceph)
34+
35+
These enhancements depend on increased SMS hypervisor capacity and improved
36+
synchronization times for the local Pulp instance.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
2+
#!/bin/bash
3+
4+
###########################################
5+
# STACKHPC-KAYOBE-CONFIG ci-tenks VERSION #
6+
###########################################
7+
8+
# Script for a full deployment.
9+
10+
set -eu
11+
12+
BASE_PATH=~
13+
KAYOBE_BRANCH=stackhpc/2025.1
14+
KAYOBE_CONFIG_REF=${KAYOBE_CONFIG_REF:-stackhpc/2025.1}
15+
KAYOBE_ENVIRONMENT=${KAYOBE_ENVIRONMENT:-ci-tenks}
16+
17+
if [[ ! -f $BASE_PATH/vault-pw ]]; then
18+
echo "Vault password file not found at $BASE_PATH/vault-pw"
19+
exit 1
20+
fi
21+
22+
export KAYOBE_VAULT_PASSWORD=$(cat $BASE_PATH/vault-pw)
23+
24+
# Install git and tmux.
25+
if $(which dnf 2>/dev/null >/dev/null); then
26+
sudo dnf -y install git tmux python3.12
27+
else
28+
sudo apt update
29+
sudo apt -y install git tmux gcc libffi-dev python3-dev python-is-python3 python3-pip python3.12-venv
30+
fi
31+
32+
# Disable the firewall.
33+
sudo systemctl is-enabled firewalld && sudo systemctl stop firewalld && sudo systemctl disable firewalld || true
34+
35+
# Disable SELinux both immediately and permanently.
36+
if $(which setenforce 2>/dev/null >/dev/null); then
37+
sudo setenforce 0
38+
sudo sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
39+
fi
40+
41+
# Prevent sudo from performing DNS queries.
42+
echo 'Defaults !fqdn' | sudo tee /etc/sudoers.d/no-fqdn
43+
44+
# Clone repositories
45+
cd $BASE_PATH
46+
mkdir -p src
47+
pushd src
48+
if [[ ! -d kayobe-config ]]; then
49+
git clone https://github.com/stackhpc/stackhpc-kayobe-config kayobe-config
50+
pushd kayobe-config
51+
git checkout $KAYOBE_CONFIG_REF
52+
popd
53+
fi
54+
[[ -d kayobe ]] || git clone https://github.com/stackhpc/kayobe.git -b $KAYOBE_BRANCH
55+
[[ -d kayobe/tenks ]] || (cd kayobe && git clone https://opendev.org/openstack/tenks.git)
56+
popd
57+
58+
# Create Kayobe virtualenv
59+
mkdir -p venvs
60+
pushd venvs
61+
if [[ ! -d kayobe ]]; then
62+
python3.12 -m venv kayobe
63+
fi
64+
# NOTE: Virtualenv's activate and deactivate scripts reference an
65+
# unbound variable.
66+
set +u
67+
source kayobe/bin/activate
68+
set -u
69+
pip install -U pip
70+
pip install -r ../src/kayobe-config/requirements.txt
71+
popd
72+
73+
# Activate environment
74+
pushd $BASE_PATH/src/kayobe-config
75+
source kayobe-env --environment $KAYOBE_ENVIRONMENT
76+
77+
# Configure host networking (bridge, routes & firewall)
78+
sudo $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/configure-local-networking.sh
79+
80+
# Bootstrap the Ansible control host.
81+
kayobe control host bootstrap
82+
83+
# Configure the seed hypervisor host.
84+
kayobe seed hypervisor host configure
85+
86+
# Provision the seed VM.
87+
kayobe seed vm provision
88+
89+
# Configure the seed host, and deploy a local registry.
90+
kayobe seed host configure
91+
92+
# Deploy local pulp server as a container on the seed VM
93+
kayobe seed service deploy --tags seed-deploy-containers --kolla-tags none
94+
95+
# Deploying the seed restarts networking interface, run configure-local-networking.sh again to re-add routes.
96+
sudo $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/configure-local-networking.sh
97+
98+
# Sync package & container repositories.
99+
# FIXME: repo sync playbook takes around 30 minutes (tested on ubuntu).
100+
# for now we should skip it and just get to provisioning. Once we have a local
101+
# package mirror, we can probably add it back in and at least get to host
102+
# configuration.
103+
#kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-sync.yml
104+
#kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-repo-publish.yml
105+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-sync.yml -e stackhpc_pulp_images_kolla_filter=bifrost
106+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-container-publish.yml -e stackhpc_pulp_images_kolla_filter=bifrost
107+
108+
# Re-run full task to set up bifrost_deploy etc. using newly-populated pulp repo
109+
kayobe seed service deploy
110+
111+
# NOTE: Make sure to use ./tenks, since just ‘tenks’ will install via PyPI.
112+
(export TENKS_CONFIG_PATH=$KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/tenks.yml && \
113+
export KAYOBE_CONFIG_SOURCE_PATH=$BASE_PATH/src/kayobe-config && \
114+
export KAYOBE_VENV_PATH=$BASE_PATH/venvs/kayobe && \
115+
cd $BASE_PATH/src/kayobe && \
116+
./dev/tenks-deploy-overcloud.sh ./tenks)
117+
118+
# Inspect and provision the overcloud hardware:
119+
kayobe overcloud inventory discover
120+
kayobe overcloud hardware inspect
121+
kayobe overcloud provision
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
###############################################################################
3+
# Cephadm deployment configuration.
4+
5+
# List of additional cephadm commands to run before deployment
6+
# cephadm_commands:
7+
# - "config set global osd_pool_default_size {{ [3, groups['osds'] | length] | min }}"
8+
# - "config set global osd_pool_default_min_size {{ [3, groups['osds'] | length] | min }}"
9+
10+
# Ceph OSD specification.
11+
cephadm_osd_spec:
12+
service_type: osd
13+
service_id: osd_spec_default
14+
placement:
15+
host_pattern: "*"
16+
data_devices:
17+
all: true
18+
19+
###############################################################################
20+
# Ceph post-deployment configuration.
21+
22+
# List of Ceph erasure coding profiles. See stackhpc.cephadm.ec_profiles role
23+
# for format.
24+
cephadm_ec_profiles: []
25+
26+
# List of Ceph CRUSH rules. See stackhpc.cephadm.crush_rules role for format.
27+
cephadm_crush_rules: []
28+
29+
# List of Ceph pools. See stackhpc.cephadm.pools role for format.
30+
cephadm_pools:
31+
- name: backups
32+
application: rbd
33+
state: present
34+
- name: images
35+
application: rbd
36+
state: present
37+
- name: volumes
38+
application: rbd
39+
state: present
40+
- name: vms
41+
application: rbd
42+
state: present
43+
44+
# List of Cephx keys. See stackhpc.cephadm.keys role for format.
45+
cephadm_keys:
46+
- name: client.cinder
47+
caps:
48+
mon: "profile rbd"
49+
osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images"
50+
mgr: "profile rbd pool=volumes, profile rbd pool=vms"
51+
state: present
52+
- name: client.cinder-backup
53+
caps:
54+
mon: "profile rbd"
55+
osd: "profile rbd pool=volumes, profile rbd pool=backups"
56+
mgr: "profile rbd pool=volumes, profile rbd pool=backups"
57+
state: present
58+
- name: client.glance
59+
caps:
60+
mon: "profile rbd"
61+
osd: "profile rbd pool=images"
62+
mgr: "profile rbd pool=images"
63+
state: present

0 commit comments

Comments
 (0)