README: improbe dbuild instructions

Add a quick start, document more options, and link from the main README.
Message-Id: <20190210154606.21739-1-avi@scylladb.com>
This commit is contained in:
Avi Kivity
2019-02-10 17:46:06 +02:00
committed by Tomasz Grabiec
parent 2724a66a12
commit cb51fcab9d
2 changed files with 38 additions and 5 deletions

View File

@@ -12,8 +12,12 @@ $ # Rejoice!
```
Please see [HACKING.md](HACKING.md) for detailed information on building and developing Scylla.
**Note**: GCC >= 8.1.1 is require to compile Scylla.
**Note**: See [frozen toolchain](tools/toolchain/README.md) for a way to build and run
on an older distribution.
## Running Scylla
* Run Scylla

View File

@@ -4,14 +4,18 @@ While we aim to build out-of-the-box on recent distributions, this isn't
always possible and not everyone runs a recent distribution. For this reason
a version-controlled toolchain is provided as a docker image.
## Obtaining the current toolchain
## Quick start
The toolchain is stored in a file called `tools/toolchain/image`. To access
the toolchain, pull that image:
If your workstation supports docker (without requiring sudo), you can build and
run Scylla easily without setting up the build dependencies beforehand:
docker pull $(<tools/toolchain/image)
./tools/toolchain/dbuild ./configure.py
./tools/toolchain/dbuild ninja build/release/scylla
./tools/toolchain/dbuild ./build/release/scylla --developer-mode 1
A helper script `dbuild` allows you to run command in that toolchain with
## The `dbuild` script
The script `dbuild` allows you to run any in that toolchain with
the working directory mounted:
./tools/toolchain/dbuild ./configure.py
@@ -24,8 +28,33 @@ set environment variables:
./tools/toolchain/dbuild -v /var/cache/ccache:/var/cache/ccache -- ninja
The script also works from other directories, so if you have `scylla-ccm` checked
out alongside scylla, you can write
../scylla/tools/toolchain/dbuild ./ccm ...
You will have access to both scylla and scylla-ccm in the container.
Interactive mode is also supported, using the docker `-i` and `-t` flags:
./tools/toolchain/dbuild -it -- bash
this will drop you into a shell, with all of the toolchain accessible.
## Obtaining the current toolchain
The toolchain is stored in a file called `tools/toolchain/image`. Normally,
`dbuild` will fetch the toolchain automatically. If you want to access
the toolchain explicitly, pull that image:
docker pull $(<tools/toolchain/image)
## Building the toolchain
If you add dependencies (to `install-dependencies.sh` or
`seastar/install-dependencies.sh`) you should update the toolchain.
Run the command
docker build --no-cache -f tools/toolchain/Dockerfile .