Skip to content

Building Cruise Control

aborkar-ibm edited this page Dec 21, 2021 · 26 revisions

Building Cruise Control

ATTENTION!!! This package uses Log4j. Please see details here, for the updates on security vulnerabilities.

The instructions provided below specify the steps to build Cruise Control 2.5.70 on Linux on IBM Z for following distributions:

  • RHEL (7.8, 7.9, 8.2, 8.4)
  • SLES (12 SP5, 15 SP2, 15 SP3)
  • Ubuntu (18.04, 20.04, 21.04)

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.

Build and Install Cruise Control

Step 1: Build using script

If you want to build Cruise Control using manual steps, go to STEP 2.

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

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/CruiseControl/2.5.70/build_cruise_control.sh

# Build Cruise Control
bash build_cruise_control.sh

If the build completes successfully, go to STEP 5 for test execution. 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>/
  • RHEL (7.8, 7.9, 8.2, 8.4)

    • With OpenJDK 11:

      sudo yum install -y wget tar git curl gzip java-11-openjdk java-11-openjdk-devel
    • With AdoptOpenJDK 11:

      sudo yum install -y wget tar git curl gzip
      • Download and Install AdoptOpenJDK 11 (with OpenJ9 Large Heap or HotSpot) from here
  • SLES (12 SP5, 15 SP2, 15 SP3)

    • With OpenJDK 11:

      sudo zypper install -y wget tar git curl gzip java-11-openjdk java-11-openjdk-devel
    • With AdoptOpenJDK 11:

      sudo zypper install -y wget tar git curl gzip
      • Download and Install AdoptOpenJDK 11 (with OpenJ9 Large Heap or HotSpot) from here
  • Ubuntu (18.04, 20.04, 21.04)

    • With OpenJDK 11:

      sudo apt-get update
      sudo apt-get install -y wget tar git curl gzip openjdk-11-jdk
    • With AdoptOpenJDK 11:

      sudo apt-get update
      sudo apt-get install -y wget tar git curl gzip
      • Download and Install AdoptOpenJDK 11 (with OpenJ9 Large Heap or HotSpot) from here

Note: If you are building Apache Kafka from source, it is recommended to choose the same JDK variant for building Cruise Control.

Step 3: Set environment variables

export JAVA_HOME=<path to java>
export PATH=$JAVA_HOME/bin:$PATH

Step 4: Download and build Cruise Control

cd $SOURCE_ROOT
git clone https://github.com/linkedin/cruise-control.git
cd cruise-control
git checkout 2.5.70
curl -sSL https://github.com/linkedin/cruise-control/commit/917b78a193546cce59e56e3c83b9893aa125b116 | git apply
./gradlew jar

Step 5: Testing (Optional)

cd $SOURCE_ROOT/cruise-control
./gradlew test

Step 6: Verification

Follow official quickstart guide given here to verify the installation. The Cruise Control server requires connection to one or more Apache Kafka servers, instructions for building Apache Kafka 2.8.0 can be found here

Notes:

  • The default capacity configuration file (config/capacityJBOD.json) assumes that at least two Kafka brokers should be present, so you might need to modify the Kafka server configuration accordingly. Please check the wiki page for more configuration options.

  • You might encounter an error ERROR Got exception in Cruise Control metrics reporter (com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter) java.lang.IllegalStateException: Java Virtual Machine recent CPU usage is not available. when running Cruise Control metrics reporter, this error could be safely ignored and will be eliminated with the patch applied in Step 4.

References:

Clone this wiki locally