Scylla Documentation Logo Documentation
  • Server
    • Scylla Open Source
    • Scylla Enterprise
    • Scylla Alternator
  • Cloud
    • Scylla Cloud
    • Scylla Cloud Docs
  • Tools
    • Scylla Manager
    • Scylla Monitoring Stack
    • Scylla Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
Download
Menu
Scylla Dev Guides Building Scylla

Building Scylla¶

This document describes how to build Scylla’s executables, tests, and packages.

Please note that these instructions use dbuild – a Docker-based development environment – to build Scylla. However, dbuild is optional and you can also build on your host machine by running the same commands without the dbuild prefix.

Table of Contents¶

  • Getting Started

  • Configuring

  • Building

  • Packaging

  • Artifacts

Getting Started¶

To build everything, run:

git clone https://github.com/scylladb/scylla
git submodule update --init --force --recursive
./tools/toolchain/dbuild ./configure.py --mode=<mode>
./tools/toolchain/dbuild ninja

where mode is dev for development builds, release for release builds, and debug for debug builds.

Alternatively, you can also pass the mode directly to the ninja command:

git submodule update --init --force --recursive
./tools/toolchain/dbuild ./configure.py
./tools/toolchain/dbuild ninja <mode>

After the build completes, you can find build artifacts in build/<mode> directory.

You can run unit tests with:

./tools/toolchain/dbuild test

or launch a Scylla server locally with:

./tools/toolchain/dbuild ./build/dev/scylla --workdir tmp --developer-mode 1 --smp 1 --memory 1G

For more help with build targets, run:

./tools/toolchain/dbuild ninja help

That’s it!

Configuring¶

The configure.py script, which is run as the first step of a build, generates a build.ninja build file (similar to a Makefile) for the Ninja build tool that we use for building.

To configure the build system for a specific build mode, run:

./tools/toolchain/dbuild ./configure.py --mode=<mode>

The mode flag determines build flags for the scylla executable:

  • release is the release build that targets fast execution time (slow build, fast execution).

  • dev is the development build that targets fast build times (fast build, reasonable execution)

  • debug is the debug build that targets error discovery (slow build, slow execution).

If you don’t specify a build mode, the build.ninja will contain configuration for all build modes.

Building¶

To build Scylla executables and tests, run:

./tools/toolchain/dbuild ninja build

This will build Scylla for the build mode specified by the configure.py command.

Alternatively, if you did not specify a build mode in the configure.py step, you can build executables and tests for a specific build mode with:

./tools/toolchain/dbuild ninja <mode>-build

Testing¶

To run unit tests, run:

./tools/toolchain/dbuild ninja test

Alternatively, to run unit tests for a specific build mode, run:

./tools/toolchain/dbuild ninja <dev>-test

Packaging¶

The build system generates relocatable packages, which means that the packages contain all the dependencies they need, and you can, therefore, install and run the same binaries on all Linux distributions. The relocatable package tarball is used as a base for building the Linux distribution specific packages, .rpms and .debs.

To build packages, run:

./tools/toolchain/dbuild ninja dist

Alternatively, to build packages for a specific build mode, run:

./tools/toolchain/dbuild ninja <mode>-dist

To verify the packages, run:

ninja dist-check

Please note that you need to run dist-check on the host because it requires Docker to perform the verification.

Artifacts¶

This section lists all the artifacts generated by the build system.

Executables:

  • build/<mode>/scylla

Tests:

  • build/<mode>/test/**

Tarballs:

  • build/<mode>/dist/tar/scylla-unified-package.tar.gz

  • build/<mode>/dist/tar/scylla-package.tar.gz

  • build/<mode>/dist/tar/scylla-python3-package.tar.gz

  • build/<mode>/dist/tar/scylla-jmx-package.tar.gz

  • build/<mode>/dist/tar/scylla-tools-package.tar.gz

.rpms:

  • build/dist/<mode>/redhat/RPMS/x86_64/scylla-*.rpm

  • build/dist/<mode>/redhat/RPMS/x86_64/scylla-conf-*.rpm

  • build/dist/<mode>/redhat/RPMS/x86_64/scylla-debuginfo-*.rpm

  • build/dist/<mode>/redhat/RPMS/x86_64/scylla-kernel-conf-*.rpm

  • build/dist/<mode>/redhat/RPMS/x86_64/scylla-server-*.rpm

  • tools/python3/build/redhat/RPMS/x86_64/scylla-python3-*.rpm

  • tools/jmx/build/redhat/RPMS/noarch/scylla-jmx-*.rpm

  • tools/java/build/redhat/RPMS/noarch/scylla-tools-*.rpm

  • tools/java/build/redhat/RPMS/noarch/scylla-tools-core-*.rpm

.debs:

  • build/dist/dev/debian/scylla-conf_*.deb

  • build/dist/dev/debian/scylla_*.deb

  • build/dist/dev/debian/scylla-server_*.deb

  • build/dist/dev/debian/scylla-kernel-conf_*.deb

  • build/dist/dev/debian/scylla-server-dbg_*.deb

  • tools/python3/build/debian/scylla-python3_*.deb

  • tools/jmx/build/debian/scylla-jmx_*.deb

  • tools/java/build/debian/scylla-tools-core_*.deb

  • tools/java/build/debian/scylla-tools_*.deb

PREVIOUS
Scylla RESTful API V2
NEXT
Debugging with GDB
  • 4.6
    • 4.6
    • 4.5
  • Scylla Developer Documentation
  • Alternator: DynamoDB API in Scylla
    • Getting Started With ScyllaDB Alternator
    • Scylla Alternator for DynamoDB users
  • Design Notes
    • IDL compiler
    • CDC
    • The Compaction Controller
    • Scylla CQL extensions
    • Scylla CQL extensions
    • CQL3 Type Mapping
    • Hinted Handoff Design
    • Performance Isolation in Scylla
    • CQL to Lua type mapping
    • Scylla Metrics
    • Migrating from users to roles
    • Paged queries
    • Protocol extensions to the Cassandra Native Protocol
    • Ports and protocols in Scylla
    • Redis API in Scylla
    • Repair based node operations
    • Reverse reads
    • Row Cache
    • Row level repair
    • Secondary indexes in Scylla
    • File format of the Scylla.db sstable component
    • sstables directory structure
    • System keyspace layout
    • System schema keyspace layout
    • WASM support for user-defined functions
  • Guides
    • Guidelines for developing Scylla
    • Scylla RESTful API V2
    • Building Scylla
    • Debugging with GDB
    • Docker Hub Image
    • Logging in Scylla
    • Testing
    • Tracing
  • Contribute
    • Contributing to Scylla
    • Backport
    • Maintainer’s handbook
    • Review Checklist
  • Service Level Distributed Data
  • Create an issue
  • Edit this page

On this page

  • Building Scylla
    • Table of Contents
    • Getting Started
    • Configuring
    • Building
    • Testing
    • Packaging
    • Artifacts
Logo
Docs Contact Us About Us
Mail List Icon Slack Icon
© 2022, ScyllaDB. All rights reserved.
Last updated on 12 May 2022.
Powered by Sphinx 4.3.2 & ScyllaDB Theme 1.2.1