Building Keystone - linux-on-ibm-z/docs GitHub Wiki

Building Keystone

Below versions of Keystone are available in respective distributions at the time of creation of these build instructions:

  • Ubuntu 22.04 has 21.0.1
  • Ubuntu 24.04 has 25.0.0
  • Ubuntu 25.10 has 28.0.0

The instructions provided below specify the steps to build Keystone latest version on Linux on IBM Z for following distributions:

  • RHEL (8.10, 9.4, 9.6, 9.7, 10.0, 10.1)
  • SLES (15 SP7, 16.0)
  • Ubuntu (22.04, 24.04)

General notes:

  • When following the steps below please use a standard permission user unless otherwise specified

Note:

  • Keystone(v28.0.0) was verified at the time of creation of these instructions

1. Build using script

If you want to build and install Keystone using manual steps, go to step 2.

Use the following commands to build Keystone using the build script. Please make sure you have wget installed.

wget https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Keystone/28.0.0/build_keystone.sh

# Run bash build_keystone.sh -h to see all available options
bash build_keystone.sh

2. Install the dependencies

export PACKAGE_NAME="keystone"
export PACKAGE_VERSION="28.0.0"
export SOURCE_ROOT="$(pwd)"
export PATH="$HOME/.local/bin:$PATH"
  • RHEL

    sudo dnf install -y python3.12 python3.12-pip python3.12-devel gcc gcc-c++ make rust cargo openssl-devel libffi-devel
    
  • SLES

    sudo zypper -n in python313 python313-devel python313-pip gcc gcc-c++ make cmake git wget gawk libopenssl-devel libffi-devel rust cargo
    
  • Ubuntu

    sudo apt update && sudo apt-get install -y python3-pip python3-dev wget curl rustc cargo librust-openssl-dev
    sudo apt-get remove -y --ignore-missing python3-bcrypt
    

3. Configure Libexpat (For SLES)

  • Clone, Build and Install

    local SRC_DIR="${SRC_DIR:-$HOME/src}"
    local REPO_DIR="$SRC_DIR/libexpat"
    local BUILD_DIR="$REPO_DIR/expat/build"
    
    mkdir -p "$SRC_DIR" && cd "$SRC_DIR"
    git clone https://github.com/libexpat/libexpat.git "$REPO_DIR"
    rm -rf "$BUILD_DIR" && mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
    cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DEXPAT_BUILD_TESTS=OFF \
    -DEXPAT_BUILD_EXAMPLES=OFF
    
    make -j"$(nproc)"
    sudo make install
    echo "/usr/local/lib64" | sudo tee /etc/ld.so.conf.d/00-local-expat.conf >/dev/null
    sudo /sbin/ldconfig || sudo /usr/sbin/ldconfig
    

4. Install additional python packages

  • RHEL

    python3.12 -m pip install -U pip setuptools wheel
    python3.12 -m pip install keystone==28.0.0 uwsgi python-openstackclient
    
  • SLES

    python3.13 -m pip install -U pip setuptools wheel
    python3.13 -m pip install keystone==28.0.0 uwsgi python-openstackclient
    
  • Ubuntu

    export PIP_BREAK_SYSTEM_PACKAGES=1
    python3 -m pip install -U pip setuptools wheel
    python3 -m pip install bcrypt==4.0.1 keystone==${PACKAGE_VERSION} python-openstackclient uwsgi
    

5. Verify Keystone installation

keystone-manage --version

References: