Skip to content

Building Spire

linuxonz edited this page Apr 4, 2024 · 3 revisions

Building SPIRE

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

  • RHEL (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)
  • SLES (12 SP5, 15 SP5)
  • Ubuntu (20.04, 22.04, 23.10)

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.
  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Step 1: Build using script

If you want to build SPIRE using manual steps, go to Step 2.

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

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Spire/1.9.1/build_spire.sh
# Build SPIRE
bash build_spire.sh   [Provide -t option for executing build with tests]

In case of error, check logs for more details or go to STEP 2 to follow manual build steps.

Step 2: Install Dependencies

export SOURCE_ROOT=/<source_root>/
export PATCH_URL="https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Spire/1.9.1/patch/spire.patch"
  • RHEL (7.8, 7.9)

    sudo yum install -y curl wget git make gcc openssl-devel openssl 
  • RHEL (8.6, 8.8, 8.9)

    sudo yum install -y curl wget git make gcc openssl-devel 
  • RHEL (9.0, 9.2, 9.3)

    sudo yum install --allowerasing -y curl wget git make gcc openssl-deve 
  • SLES (12 SP5, 15 SP5)

    sudo zypper install -y curl wget git-core make gcc openssl-devel which tar gzip awk
  • Ubuntu (20.04, 22.04, 23.10)

    sudo apt-get update
    sudo apt-get install -y curl wget git make gcc libssl-dev

Step 3: Build and Install SPIRE

cd $SOURCE_ROOT
git clone https://github.com/spiffe/spire.git
cd spire/
git checkout v1.9.1
wget -O spire.patch $PATCH_URL/spire.patch
git apply spire.patch
make

Notes:

  • Above command generates spire-server, spire-agent and oidc-discovery-provider binaries under $SOURCE_ROOT/spire/bin folder.
  • Follow instructions provided here to get SPIRE running.

Step 4: Run Unit Tests (Optional)

cd $SOURCE_ROOT/spire
make test

References:

Clone this wiki locally