| 1 |
============================= |
| 2 |
Upgrade Testing using grenade |
| 3 |
============================= |
| 4 |
|
| 5 |
Run a Grenade upgrade: deploy a base DevStack, then upgrade to a target |
| 6 |
release and verify Cyborg device profiles survive the upgrade. |
| 7 |
|
| 8 |
Requirements |
| 9 |
============ |
| 10 |
|
| 11 |
- 8 GB RAM, 8 vCPUs (or reduce services in the configs). |
| 12 |
|
| 13 |
Setup |
| 14 |
===== |
| 15 |
|
| 16 |
1. Clone Grenade:: |
| 17 |
|
| 18 |
git clone https://opendev.org/openstack/grenade |
| 19 |
|
| 20 |
2. Configure Grenade. Use Grenade's base configuration files with minimal |
| 21 |
Cyborg-specific overrides. |
| 22 |
|
| 23 |
a. **Create localrc** with Cyborg-specific branch settings:: |
| 24 |
|
| 25 |
cat > localrc <<EOF |
| 26 |
# Set base release branch (update to match desired base release) |
| 27 |
BASE_DEVSTACK_BRANCH=stable/2025.2 |
| 28 |
TARGET_DEVSTACK_BRANCH=master |
| 29 |
EOF |
| 30 |
|
| 31 |
b. **Create pluginrc** to enable Cyborg grenade plugin:: |
| 32 |
|
| 33 |
cat > pluginrc <<EOF |
| 34 |
enable_grenade_plugin cyborg https://opendev.org/openstack/cyborg |
| 35 |
EOF |
| 36 |
|
| 37 |
3. (Optional) Customize devstack configs for resource-constrained environments. |
| 38 |
|
| 39 |
Edit ``devstack.local.conf.base`` and ``devstack.local.conf.target`` to |
| 40 |
disable unneeded services:: |
| 41 |
|
| 42 |
[[local|localrc]] |
| 43 |
disable_service s-account s-container s-object s-proxy |
| 44 |
disable_service etcd |
| 45 |
disable_service c-api c-bak c-sch c-vol cinder |
| 46 |
disable_service horizon |
| 47 |
|
| 48 |
Run |
| 49 |
=== |
| 50 |
|
| 51 |
From the Grenade repo root:: |
| 52 |
|
| 53 |
cd grenade |
| 54 |
./grenade.sh |
| 55 |
|
| 56 |
Clean up after test failure:: |
| 57 |
|
| 58 |
./clean.sh |
| 59 |
./grenade.sh |
| 60 |
|
| 61 |
Configuration Details |
| 62 |
===================== |
| 63 |
|
| 64 |
**Required Files** (in Grenade repo root): |
| 65 |
|
| 66 |
- ``localrc`` — Grenade variables (branches, paths). Minimum requirement: |
| 67 |
set ``BASE_DEVSTACK_BRANCH`` to the release you want to upgrade from. |
| 68 |
|
| 69 |
- ``pluginrc`` — Enables the Cyborg grenade plugin. |
| 70 |
|
| 71 |
**Optional Files** (customize as needed): |
| 72 |
|
| 73 |
- ``devstack.local.conf.base`` — Base (old) release DevStack configuration. |
| 74 |
- ``devstack.local.conf.target`` — Target (new) release DevStack configuration. |
| 75 |
|
| 76 |
**Cyborg Grenade Plugin** (``cyborg/devstack/upgrade/``): |
| 77 |
|
| 78 |
Automatically used by Grenade when the plugin is enabled in ``pluginrc``: |
| 79 |
|
| 80 |
- ``resources.sh`` — Create/verify/destroy device profiles during upgrade. |
| 81 |
- ``shutdown.sh`` — Stop Cyborg services before upgrade. |
| 82 |
- ``upgrade.sh`` — Install target Cyborg, run DB migrations, start services. |
| 83 |
- ``settings`` — Register Cyborg project/DB with Grenade. |
| 84 |
|
| 85 |
Configuration Examples |
| 86 |
======================= |
| 87 |
|
| 88 |
**Minimal localrc**:: |
| 89 |
|
| 90 |
BASE_DEVSTACK_BRANCH=stable/2025.2 |
| 91 |
TARGET_DEVSTACK_BRANCH=master |
| 92 |
|
| 93 |
**Reduce resource usage** (add to devstack.local.conf files):: |
| 94 |
|
| 95 |
disable_service s-account s-container s-object s-proxy etcd cinder horizon |
| 96 |
|
| 97 |
**Custom passwords** (add to devstack.local.conf files):: |
| 98 |
|
| 99 |
ADMIN_PASSWORD=password |
| 100 |
DATABASE_PASSWORD=password |
| 101 |
MYSQL_PASSWORD=password |
| 102 |
RABBIT_PASSWORD=password |
| 103 |
SERVICE_PASSWORD=password |
| 104 |
|
| 105 |
**Tuning for CI/stability**:: |
| 106 |
|
| 107 |
ENABLE_SYSCTL_MEM_TUNING="True" |
| 108 |
ENABLE_SYSCTL_NET_TUNING="True" |
| 109 |
ENABLE_ZSWAP="True" |
| 110 |
|
| 111 |
**Fixed network range for tenant networks**:: |
| 112 |
|
| 113 |
NETWORK_GATEWAY=10.0.0.1 |
| 114 |
FIXED_RANGE=10.0.0.0/22 |
| 115 |
|
| 116 |
Notes |
| 117 |
===== |
| 118 |
|
| 119 |
- Grenade provides default settings for passwords, networking, paths, and |
| 120 |
service configurations. Only override settings specific to your test |
| 121 |
environment. |
| 122 |
|
| 123 |
- The ``BASE_DEVSTACK_BRANCH`` should match the OpenStack release you want |
| 124 |
to upgrade from (e.g., stable/2025.2, stable/2026.1). |
| 125 |
|
| 126 |
- Grenade automatically detects the Cyborg upgrade plugin when |
| 127 |
``devstack_plugins`` includes Cyborg in CI jobs. For local testing, |
| 128 |
use ``pluginrc`` to enable the plugin. |
| 129 |
|
| 130 |
- In CI job, use `grenade_devstack_localrc` var to pass extra things |
| 131 |
in devstack localrc on the base or target node:: |
| 132 |
|
| 133 |
grenade_devstack_localrc: |
| 134 |
old: |
| 135 |
<setting for base devstack localrc> |
| 136 |
new: |
| 137 |
<setting for target devstack localrc> |
| 138 |
shared: |
| 139 |
<setting which are applicable for both base and target> |