Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 1 | VOLTHA Release process |
| 2 | ====================== |
Joey Armstrong | 1eb713f | 2024-01-30 13:53:00 -0500 | [diff] [blame] | 3 | |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 4 | This document describes the technical steps of VOLTHA's release process. |
Joey Armstrong | f6dde7a | 2024-02-01 10:09:20 -0500 | [diff] [blame] | 5 | The document assumes you are creating a release named voltha-X.Y, where X |
| 6 | is the major release version and Y is the minor. See versioning in the |
| 7 | :doc:`releases documentation </overview/releases>` |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 8 | |
| 9 | Code Freeze and pre-release testing |
| 10 | ----------------------------------- |
| 11 | |
| 12 | VOLTHA is released every 6 months. The suggested codefreeze is 3 weeks before release. |
| 13 | Code freeze means that no functionality is added, only bug fixes and tests can be added during the code freeze time. |
| 14 | Code freeze is announced during the TST meetings and enforced by the core contributors that have +2/merge access. |
| 15 | The 3 weeks of code freeze are used to stabilize the tests and prepare the components for the release. |
| 16 | |
| 17 | During code freeze the jenkins jobs test the latest code in master which, given the code freeze state, is the |
| 18 | release candidate (RC) for the release. |
| 19 | A release can be considered ready if the tests on Jenkins pass with no issue, both on hardware and bbsim jobs. |
| 20 | |
Joey Armstrong | ea30799 | 2024-08-12 14:49:49 -0400 | [diff] [blame^] | 21 | Component releasing and Lazy Branching (legacy) |
| 22 | ----------------------------------------------- |
| 23 | |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 24 | In VOLTHA for a release we release components (services) and lazy branch when/if needed. |
| 25 | Once a component (service) is ready to be released we increase the version in the VERSION file, |
| 26 | going from the -dev or released version x.y.z to either a higher number in minor version (y) or in bug version (z). |
| 27 | |
| 28 | To allow for future patches to go into the repo in a way that does not conflict with the patch version, |
| 29 | each component repo's VERSION file should have it's minor version increased in master. (ex: 1.1.X to 1.2.0-dev, |
| 30 | so future 1.1.X+1 component release can easily be created for the released VOLTHA version). |
| 31 | |
Joey Armstrong | d24a112 | 2023-01-04 09:34:46 -0500 | [diff] [blame] | 32 | The same should be done on Helm charts in the chart repos post release, but the versions there shouldn't include a |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 33 | -dev suffix because chart publishing requires that every new chart version be unique and using un-suffixed SemVer is a |
| 34 | better release numbering pattern. |
| 35 | |
Joey Armstrong | ea30799 | 2024-08-12 14:49:49 -0400 | [diff] [blame^] | 36 | If a repository is branched the :doc:`.gitreview <howto/release/post-release/gitreview.html>` |
| 37 | file needs to be changed, adding `defaultorigin=voltha-X.Y` at the end. |
| 38 | |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 39 | .. note:: |
| 40 | Given the dependency of the containers on the protos and the library, if the voltha-protos and/or voltha-lib-go or |
| 41 | omci-lib-go need to be released, it should be done first and then updated in the components: |
| 42 | |
| 43 | - release `voltha-proto` |
| 44 | - update `voltha-lib-go` and release it |
| 45 | - change the protos and lib-go versions in the components (in `go.mod`) |
| 46 | - issue `make mod-update` |
| 47 | - release the component |
| 48 | |
| 49 | |
| 50 | Every repository that need releasing is listed here. |
| 51 | |
| 52 | Services: |
| 53 | |
| 54 | - `VOLTHA Core <https://github.com/opencord/voltha-go>`_ |
| 55 | - `OpenFlow Agent <https://github.com/opencord/ofagent-go>`_ |
| 56 | - `Openonu Adapter <https://github.com/opencord/voltha-openonu-adapter-go>`_ |
| 57 | - `Openolt Adapter <https://github.com/opencord/voltha-openolt-adapter>`_ |
| 58 | - `Openolt Agent <https://github.com/opencord/openolt>`_ |
| 59 | - `ONOS controller <https://github.com/opencord/voltha-onos>`_ (Note, only do it after releasing all the apps below) |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 60 | - `BBSIM Sadis Server <https://github.com/opencord/bbsim-sadis-server>`_ |
| 61 | |
| 62 | Libraries and APIs: |
| 63 | |
| 64 | - `VOLTHA protos <https://github.com/opencord/voltha-protos>`_ |
| 65 | - `VOLTHA Library in Go <https://github.com/opencord/voltha-lib-go>`_ |
| 66 | - `OMCI Library in GO <https://github.com/opencord/omci-lib-go>`_ |
| 67 | |
| 68 | Tools: |
| 69 | |
Joey Armstrong | ea30799 | 2024-08-12 14:49:49 -0400 | [diff] [blame^] | 70 | - `BBSIM <https://github.com/opencord/bbsim>`_ |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 71 | - `voltctl <https://github.com/opencord/voltctl>`_ |
| 72 | |
| 73 | Configuration: |
| 74 | |
| 75 | - `pod-configs <https://github.com/opencord/pod-configs>`_ |
| 76 | |
| 77 | ONOS Apps |
| 78 | ^^^^^^^^^ |
| 79 | |
Joey Armstrong | a144ef3 | 2024-01-11 11:26:41 -0500 | [diff] [blame] | 80 | :ref:`_howto_release_components_onos_components` |
| 81 | |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 82 | The ONOS Apps need to be released in a different manner. |
| 83 | |
Joey Armstrong | a144ef3 | 2024-01-11 11:26:41 -0500 | [diff] [blame] | 84 | A dedicated Jenkins job is used to release ONOS app: https://jenkins.opencord.org/job/onos-app-release. |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 85 | |
Joey Armstrong | a144ef3 | 2024-01-11 11:26:41 -0500 | [diff] [blame] | 86 | The job will need to be initiated using specific parameters, for an example view the lateset pipeline job. |
| 87 | |
| 88 | 1. `Build with parameters <https://jenkins.opencord.org/job/onos-app-release>`_: use the name of the repo (not of the app itself) |
| 89 | - appRepo: sadis |
| 90 | - appName: sadis |
| 91 | - apiVersion: `sadis:5.12.0-SNAPSHOT <https://gerrit.opencord.org/plugins/gitiles/sadis/+/refs/heads/master/api/pom.xml#22>`__ |
| 92 | - nextApiVersion: version+1 |
| 93 | - version: `sadis:5.12.0-SNAPSHOT <https://gerrit.opencord.org/plugins/gitiles/sadis/+/refs/heads/master/app/pom.xml#20>`__ |
| 94 | - nextVersion: version+1 |
| 95 | - branch: master |
| 96 | - jdkDistro: java-11-amazon-corretto |
| 97 | |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 98 | 2. Wait for build to complete |
Joey Armstrong | ea30799 | 2024-08-12 14:49:49 -0400 | [diff] [blame^] | 99 | |
Joey Armstrong | a144ef3 | 2024-01-11 11:26:41 -0500 | [diff] [blame] | 100 | 3. Merge the component patches on gerrit |
| 101 | - `View <https://gerrit.opencord.org/q/owner:do-not-reply%2540opennetworking.org>`_ |
Joey Armstrong | 56334fc | 2023-01-15 22:53:19 -0500 | [diff] [blame] | 102 | - Two pull requests are created modifying pom.xml. |
| 103 | - Approve patch one (-SNAPSHOT: no) to initiate a release build. |
| 104 | - Approve patch two (-SNAPSHOT: yes) to revert pom.xml to a non-release version. |
| 105 | |
Joey Armstrong | a144ef3 | 2024-01-11 11:26:41 -0500 | [diff] [blame] | 106 | 4. Approval and merge will trigger `jenkins::maven-publish_sadis <https://jenkins.opencord.org/job/maven-publish_sadis/>`_ |
| 107 | that will publish an artifact into the staging repo on `sonatype <https://oss.sonatype.org>`_. |
| 108 | Once published to the staging server the artifact will need to be released to maven central. |
Joey Armstrong | 56334fc | 2023-01-15 22:53:19 -0500 | [diff] [blame] | 109 | |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 110 | - Login into the sonatype server (for username and password contact mroth@linuxfoundation.org) |
Joey Armstrong | 56334fc | 2023-01-15 22:53:19 -0500 | [diff] [blame] | 111 | - search for org.opencord |
| 112 | - Select the app you want to release and click "all versions" |
| 113 | - Click on "Staging repositories" (in the left side navigation) |
| 114 | - In the top right search for last part of the app name (eg: olt) |
| 115 | - Click release (top left bar, small button) |
| 116 | |
| 117 | 5. Wait until the artifacts are published |
| 118 | |
| 119 | - https://search.maven.org/search?q=g:org.opencord |
| 120 | - https://search.maven.org/artifact/org.opencord/dhcpl2relay/2.9.0/pom |
| 121 | |
| 122 | 6. Iterate through apps: |
| 123 | |
| 124 | - Modify pom.xml and dependencies.xml |
| 125 | - Update version string for all released dependencies. |
| 126 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 127 | 7. Start over with the next app |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 128 | |
Joey Armstrong | f6dde7a | 2024-02-01 10:09:20 -0500 | [diff] [blame] | 129 | ss.. note:: |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 130 | Given component inter dependencies, ONOS apps need to be released in order: |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 131 | |
| 132 | 1. sadis |
| 133 | 2. olt, aaa, dhcpl2relay, mcast, igmpproxy, maclearning |
| 134 | 3. bng, PPPoE |
| 135 | 4. kafka |
| 136 | |
| 137 | ONOS APPs: |
| 138 | |
| 139 | - `AAA <https://github.com/opencord/aaa>`_ |
| 140 | - `BNG <https://github.com/opencord/bng>`_ |
| 141 | - `DHCP L2 Relay <https://github.com/opencord/dhcpl2relay>`_ |
| 142 | - `IGMPProxy <https://github.com/opencord/igmpproxy>`_ |
| 143 | - `Kafka <https://github.com/opencord/kafka-onos>`_ |
| 144 | - `Mac Learning <https://github.com/opencord/mac-learning>`_ |
| 145 | - `Multicast <https://github.com/opencord/mcast>`_ |
| 146 | - `OLT <https://github.com/opencord/olt>`_ |
| 147 | - `OLT Topology <https://github.com/opencord/olttopology>`_ |
| 148 | - `PPPoE Agent <https://github.com/opencord/pppoeagent>`_ |
| 149 | - `Sadis <https://github.com/opencord/sadis>`_ |
| 150 | |
| 151 | |
Joey Armstrong | ea30799 | 2024-08-12 14:49:49 -0400 | [diff] [blame^] | 152 | Component releasing and Branching (variations) |
| 153 | ---------------------------------------------- |
| 154 | |
| 155 | - Tagnames |
| 156 | |
| 157 | .. list-table:: Tagnames |
| 158 | :widths: 10, 40 |
| 159 | |
| 160 | * - Format |
| 161 | - Description |
| 162 | * - 1.2.3.4 |
| 163 | - Default tagname syntax is a semver |
| 164 | * - v1.2.3.4 |
| 165 | - Repos that contain golang code use tagname {vee}{semver} |
| 166 | |
| 167 | - branch-then-tag |
| 168 | |
| 169 | - Only for "primary" repositories: ci, docs, helm & test |
| 170 | - Step[1] - create a branch named voltha-X.Y |
| 171 | - Step[2] - tag repository attached to branch voltha-X.Y |
| 172 | |
| 173 | - tag-then-branch |
| 174 | |
| 175 | - Default/non-primary VOLTHA repos and ONOS components. |
| 176 | - Step[1] - tag repository attached to master branch. |
| 177 | - Step[2] - create a branch named attached to the release tag. |
| 178 | |
| 179 | |
| 180 | Lazy Branching |
| 181 | -------------- |
| 182 | |
| 183 | Since the v2.11 release all VOLTHA repositories have been branched/tags |
| 184 | during release. Explicitly branching all repositoreis provides two benefits, |
| 185 | first explict release branching helps avoid blocking on branch creation |
| 186 | while creating hotfix branches. Second benefit is all branch/tagged |
| 187 | repositories are dated to a release timeframe rather than posted dated |
| 188 | when hotfix patch creation is needed. |
| 189 | |
| 190 | - Primary repos (ci, docs, helm, test) |
| 191 | |
| 192 | |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 193 | Creating the release |
| 194 | -------------------- |
| 195 | |
Joey Armstrong | f6dde7a | 2024-02-01 10:09:20 -0500 | [diff] [blame] | 196 | Once the components have been tested and the release is considered ready |
| 197 | there are 4 more elements that need to be tagged: |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 198 | |
| 199 | - `VOLTHA Helm Charts <https://github.com/opencord/voltha-helm-charts>`_ |
| 200 | - `VOLTHA System Tests <https://github.com/opencord/voltha-system-tests>`_ |
| 201 | - `VOLTHA docs <https://github.com/opencord/voltha-docs>`_ |
Joey Armstrong | f6dde7a | 2024-02-01 10:09:20 -0500 | [diff] [blame] | 202 | - `repo:ci-management <https://gerrit.opencord.org/plugins/gitiles/ci-management>`_ |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 203 | |
Joey Armstrong | f6dde7a | 2024-02-01 10:09:20 -0500 | [diff] [blame] | 204 | These 4 repos are the only ones that receive a X.Y.Z tag. |
| 205 | Other repos that contain individual components have their own |
| 206 | versioning/release cadence, driven by SemVer. |
| 207 | |
| 208 | repo:ci-management |
| 209 | ^^^^^^^^^^^^^^^^^^ |
| 210 | |
| 211 | Jenkins pipelines for building & testing release jobs are retrieved from |
| 212 | repository branch=voltha-X.Y. This repository is a dependency for all |
| 213 | other VOLTHA repositories that invoke test suites. |
| 214 | |
| 215 | See Also: :ref:`_Release Repository ci-management` |
| 216 | |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 217 | |
| 218 | Helm Charts |
| 219 | ^^^^^^^^^^^ |
| 220 | |
| 221 | The official action of creating the voltha-X.Y release is releasing the voltha helm chart, and adapter charts |
| 222 | with version:X.Y.Z (e.g. 2.10.0) specified in Chart.yaml within the voltha-helm-charts repo, and within the VERSION |
| 223 | file in that repo. |
| 224 | A branch named voltha-X.Y needs to be created on the voltha-helm-charts repo. |
| 225 | The helm charts repo overall VERSION should also be incremented to the next minor version (X.Y+1-dev), so all X.Y.Z |
| 226 | releases of the overall charts repo will happen on the voltha-X.Y branch. |
| 227 | |
| 228 | Voltha-system-tests |
| 229 | ^^^^^^^^^^^^^^^^^^^ |
| 230 | Accompanying tests for voltha-X.Y are created by creating a branch created named voltha-X.Y on the voltha-system-tests |
| 231 | repo and creating a tag X.Y.Z on that branch. |
| 232 | |
| 233 | Documentation and Release Notes |
| 234 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 235 | Release notes for the voltha-X.Y release are created and added to the voltha-docs repo. Please follow the template of |
Joey Armstrong | 449ce7a | 2023-07-18 18:32:24 -0400 | [diff] [blame] | 236 | past releases, an :doc:`example <voltha_releases/voltha_2.12.rst>` |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 237 | |
| 238 | Also, if needed a voltha-X.Y branch is created on docs repo. These release notes also contain all the |
| 239 | versions of components that will be released, and may be updated during the final QA process. |
| 240 | At release we create a tag X.Y.Z in the VERSION file. |
| 241 | |
| 242 | CI-Management |
| 243 | ^^^^^^^^^^^^^ |
| 244 | In the `Ci management <https://github.com/opencord/ci-management>`_ repository create the /voltha-x.y.z folder and copy the /master repos |
| 245 | Testing CI jobs should be created that check out the voltha-X.Y branch of the voltha-system-tests repo, testing the |
| 246 | charts as checked out with the voltha-X.Y tag of voltha-helm-charts. |
| 247 | |
| 248 | |
| 249 | Release support and bug-fixing |
| 250 | ------------------------------ |
| 251 | |
| 252 | What changes can be brought into the X.Y.Z branch? |
| 253 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 254 | Has to be a bug or non-code fix. |
| 255 | |
| 256 | Add a Jira item with type Bug, tag against VOLTHA vX.Y |
| 257 | Discuss on the Voltha mailing list, or in all-Voltha meeting, get consensus on whether should be brought to X.Y.z |
| 258 | Documentation or other non-code updates are also acceptable |
| 259 | |
| 260 | What is a bug? Not a new feature! |
| 261 | Anything that causes a functional regression test (Robot tests) to fail |
| 262 | Severe issue (causes data loss or crash), or frequently occurring -> add to X.Y |
| 263 | Issues that are merely annoying and don't cause data loss or a crash, or are very infrequently occurring -> may |
| 264 | wait for next release |
| 265 | |
| 266 | WHen a bug is found please add to tests both on the released version and the master branch, if tests don't cover |
| 267 | the bug. Add to Robot tests for integration-related issues, to Unit tests for code-level or functional issues. |
| 268 | |
| 269 | Update/Fixes to the released version |
| 270 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 271 | This section shows how to create minor releases on the X.Y.Z branch when a bug fix is required. |
| 272 | |
| 273 | If a fix is needed to the helm charts: |
| 274 | |
| 275 | - Make the fix on the master branch of voltha-helm-charts (assuming that it is required in both places). |
| 276 | - After the master tests pass, manually cherry-pick the fix to the voltha-X.Y branch (the Chart version would be |
| 277 | different, requiring the manual step). |
| 278 | - Cherry-picked patchsets on that branch will be checked by the voltha-X.Y branch of tests. |
| 279 | - When it passes, submitting the change will make a new X.Y.Z release |
| 280 | - Update the documentation to reflect the chart changes, a description of the changes made, and increment the tag |
| 281 | on the docs from X.Y.Z to X.Y.Z+1, to reflect the patch change. |
| 282 | - If all the charts are updated and working correctly, create a new charts point release by increasing the |
| 283 | X.Y.Z VERSION file in the voltha-helm-charts repo. The versions need to be updated in the voltha-docs repo, |
| 284 | which needs to be tagged as well, thus releasing it. |
| 285 | |
| 286 | If a fix is needed to the components/containers that are included by the helm charts: |
| 287 | |
| 288 | - Develop a fix to the issue on the master branch, get it approved after passing master tests. |
Joey Armstrong | d24a112 | 2023-01-04 09:34:46 -0500 | [diff] [blame] | 289 | - Manually cherry-pick to the voltha-X.Y branch of the component (create one if needed) |
Andrea Campanella | 4dfe932 | 2022-05-10 12:40:10 +0200 | [diff] [blame] | 290 | - incrementing the patch version in the VERSION file, |
| 291 | - test with the voltha-X.Y version of voltha-system-tests and helm charts. |
| 292 | - Update helm charts and go through the helm chart update process above. |
| 293 | - Update the voltha-docs with the right version of the component. |
| 294 | |
| 295 | If a fix is needed to the ONOS apps: |
| 296 | |
| 297 | - Create a branch here https://gerrit.opencord.org/plugins/gitiles/olt/+/refs/heads/olt-4.1 |
| 298 | - then `Git checkout -b <branch-name> opencord/<version>` |
| 299 | - Then push a commit changing to `.1-SNAPSHOT` more (see e.g. https://gerrit.opencord.org/c/igmpproxy/+/19589) |
| 300 | - Then push you changes (e.g. https://gerrit.opencord.org/c/igmpproxy/+/19590) |
| 301 | - Then release as per the process above. |
Joey Armstrong | 56334fc | 2023-01-15 22:53:19 -0500 | [diff] [blame] | 302 | |
| 303 | See Also |
| 304 | ======== |
| 305 | - `VOLTHA Release Process <https://docs.voltha.org/master/overview/release_process.html?highlight=charts%20yaml>`_ |
| 306 | - `release_notes: Release Process <https://docs.voltha.org/master/release_notes/release_process.html>`_ |
| 307 | - `VOLTHA and ONOS Software Update Procedure <https://docs.voltha.org/master/operations/software-upgrade.html?highlight=set%20global%20image>`_ |
| 308 | - `Helm Chart Deployment <https://docs.voltha.org/master/voltha-helm-charts/README.html?highlight=voltctl>`_ |