" In this patch set, written by Piotr Sarna and myself, we add Alternator - a new Scylla feature adding compatibility with the API of Amazon DynamoDB(TM). DynamoDB's API uses JSON-encoded requests and responses which are sent over an HTTP or HTTPS transport. It is described in detail on Amazon's site: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ Our goal is that any application written to use Amazon DynamoDB could be run, unmodified, against Scylla with Alternator enabled. However, at this stage the Alternator implementation is incomplete, and some of DynamoDB's API features are not yet supported. The extent of Alternator's compatibility with DynamoDB is described in the document docs/alternator/alternator.md included in this patch set. The same document also describes Alternator's design (and also points to a longer design document). By default, Scylla continues to listen only to Cassandra API requests and not DynamoDB API requests. To enable DynamoDB-API compatibility, you must set the alternator-port configuration option (via command line or YAML) to the port on which you wish to listen for DynamoDB API requests. For more information, see docs/alternator/alternator.md. The document docs/alternator/getting-started.md also contains some examples of how to get started with Alternator. " * 'alternator' of https://github.com/nyh/scylla: (272 commits) Added comments about DAX, monitoring and more alternator: fix usage of client_state alternator-test: complete test_expected.py for rest of comparison operators alternator-test: reproduce bug in Expected with EQ of set value alternator: implement the Expected request parameter alternator: add returning PAY_PER_REQUEST billing mode alternator: update docs/alternator.md on GSI/LSI situation Alternator: Add getting started document for alternator move alternator.md to its own directory alternator-test: add xfail test for GSI with 2 regular columns alternator/executor.cc: Latencies should use steady_clock alternator-test: fix LSI tests alternator-test: fix test_describe_endpoints.py for AWS run alternator-test: test_describe_endpoints.py without configuring AWS alternator: run local tests without configuring AWS alternator-test: add LSI tests alternator-test: bump create table time limit to 200s alternator: add basic LSI support alternator: rename reserved column name "attrs" alternator: migrate make_map_element_restriction to string view ...
Official toolchain for ScyllaDB
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.
Quick start
If your workstation supports docker (without requiring sudo), you can build and run Scylla easily without setting up the build dependencies beforehand:
./tools/toolchain/dbuild ./configure.py
./tools/toolchain/dbuild ninja build/release/scylla
./tools/toolchain/dbuild ./build/release/scylla --developer-mode 1
The dbuild script
The script dbuild allows you to run any in that toolchain with
the working directory mounted:
./tools/toolchain/dbuild ./configure.py
./tools/toolchain/dbuild ninja
You can adjust the docker run command by adding more flags before the
command to be executed, separating the flags and the command with --.
This can be useful to attach more volumes (for data or ccache) and to
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 .
and use the resulting image.
Publishing an image
If you're a maintainer, you can tag the image and push it
using docker push. Tags follow the format
scylladb/scylla-toolchain:fedora-29-[branch-3.0-]20181128. After the
image is pushed, update tools/toolchain/image so new
builds can use it automatically.
For master toolchains, the branch designation is omitted. In a branch, if there is a need to update a toolchain, the branch designation is added to the tag to avoid ambiguity.
Troubleshooting
When running sudo inside the container fails like this:
$ tools/toolchain/dbuild /bin/bash
bash-4.4$ sudo dnf install gdb
sudo: unknown uid 1000: who are you?
You can work it around by disabling SELinux on the host before running dbuild:
$ sudo setenforce 0