Skip to content

Prepare a new release

Alexander Krizhanovsky edited this page Oct 8, 2023 · 9 revisions

Continuous Delivery can complete the current manual from beginning to end, but it's not configured/implemented yet and manual actions are required #786 . The document shouldn't be abandoned on CD arrival, it should document CD behaviour instead.

Release check list

After a new release is build and uploaded the following list of actions must be performed to assure the the uploaded release is fully functional.

  • Only release branch are packaged, not bugfix or feature branch. Currently only one release branch exists: release-0.7
  • Release version must be bumped.
  • Changelog must be updated.
  • Actual commit in the release branch used to build the package must be marked by a git tag with name equal to release version.
  • Clean environment must be used to build the package.
  • Build the package
  • Assure that the package is fully functional: package has the correct version number, it can be successfully installed, and once installed, it normally operates (better is to run functional tests against the built artefact).
  • Upload the package
  • Assure that the installer script installs the last uploaded version.

Instructions

Prerequisites

Install clean Ubuntu 22.04 LTS and update to the last version.

Configure packager information:

export DEBEMAIL="[email protected]"
export DEBFULLNAME="Tempesta Technologies, Inc."

[TODO]: Configure digital signatures to sign packages after build. At the moment packages are unsigned.

Install all packages required for packaging:

sudo apt-get install devscripts build-essential lintian debhelper dkms -y

Packaging Linux kernel

Consult the manual in the separate repo.

Packaging Tempesta

It's much simpler:

git clone https://github.com/tempesta-tech/tempesta.git -b release-0.5
cd tempesta
ln -s pkg/debian/ debian
make
debuild -us -uc
cd ..

The binary package will be saved as tempesta-fw-dkms_<VERSION>_amd64.deb. Other files are required to distribute the TemestaFW through software repository.

Testing the built artefacts

Run installation of builded package tempesta-fw-dkms__amd64.deb

dpkg -i ../tempesta-fw-dkms_0.7.0_amd64.deb

Expected output
    root@tempesta:/home/user/tempesta# dpkg -i ../tempesta-fw-dkms_0.7.0_amd64.deb
    Selecting previously unselected package tempesta-fw-dkms.
    (Reading database ... 187409 files and directories currently installed.)
    Preparing to unpack .../tempesta-fw-dkms_0.7.0_amd64.deb ...
    Unpacking tempesta-fw-dkms (0.7.0) ...
    Setting up tempesta-fw-dkms (0.7.0) ...
    Loading new tempesta-fw-0.7.0 DKMS files...
    Building for 5.10.35.tfw-4c9ba16 and 5.15.0-76-generic
    Building initial module for 5.10.35.tfw-4c9ba16
    Done.

    tempesta_db.ko:
    Running module version sanity check.
    - Original module
      - No original module exists within this kernel
    - Installation
      - Installing to /lib/modules/5.10.35.tfw-4c9ba16/updates/dkms/

    tempesta_tls.ko:
    Running module version sanity check.
    - Original module
      - No original module exists within this kernel
    - Installation
      - Installing to /lib/modules/5.10.35.tfw-4c9ba16/updates/dkms/

    tempesta_fw.ko:
    Running module version sanity check.
    - Original module
      - No original module exists within this kernel
    - Installation
      - Installing to /lib/modules/5.10.35.tfw-4c9ba16/updates/dkms/

    tempesta_lib.ko:
    Running module version sanity check.
    - Original module
      - No original module exists within this kernel
    - Installation
      - Installing to /lib/modules/5.10.35.tfw-4c9ba16/updates/dkms/

    depmod....
    Building initial module for 5.15.0-76-generic
    Error! The /var/lib/dkms/tempesta-fw/0.7.0/5.15.0-76-generic/x86_64/dkms.conf for module tempesta-fw includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
    This indicates that it should not be built.
    Skipped.

Error is okay - cause kernel 5.15.0-76-generic doesn't met our BUILD_EXCLUSIVE_KERNEL directive. You could change it to make tempesta dkms package working only for target kernels

Check is tempesta-fw working fine

     root@tempesta:/home/user# systemctl start tempesta-fw
     root@tempesta:/home/user# systemctl status tempesta-fw
Expected output
tempesta-fw.service - High performance HTTP proxy server
     Loaded: loaded (/lib/systemd/system/tempesta-fw.service; disabled; vendor preset: enabled)
     Active: active (exited) since Mon 2023-07-24 16:30:24 UTC; 9h ago
Process: 66106 ExecStart=/lib/tempesta/scripts/tempesta.sh --start (code=exited, status=0/SUCCESS)
Main PID: 66106 (code=exited, status=0/SUCCESS)
     CPU: 273ms

Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: ...load Tempesta modules
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: Loading Tempesta kernel modules...
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: Loading module tempesta_lib
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: Loading module tempesta_tls
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: Loading module tempesta_db
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: Loading module tempesta_fw tfw_cfg_path=/lib/tempesta/etc/tempesta_t>
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: ...compile html templates for JS challenge
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: ...start Tempesta FW
Jul 24 16:30:24 tempesta-wh1te tempesta.sh[66106]: done
Jul 24 16:30:24 tempesta-wh1te systemd[1]: Finished High performance HTTP proxy server.

This text means that tempesta-fw successfully started, you could upload your release to Nexus

Install clean Ubuntu 22.04 system and follow the installation guide. Assure that the correct version is installed and it's operational.

Uploading to Nexus

  1. Naviagte to Nexus and upload builded tempesta-fw-dkms package via Upload component button
  2. Search uploaded package and target kernel and update links in tempesta_installer.sh

Uploading to GitHub (deprecated)

Imagine, that version 0.5.4 is build for release-0.7 branch.

Mark the commit used for the build and build the package.

git tag 0.7.0
git push --tags 

Once package is built and tested, create a new release on GitHub, tag, used to publish the release must follow the scheme: <distro-version>/<release_version>:

ubuntu-22/0.7.0

Tick Pre-Release gauge for alpha releases.

Clone this wiki locally