Skip to content

This repository contains a Docker Compose configuration for running ScyllaDB, a highly scalable NoSQL database for learning and testing.

License

Notifications You must be signed in to change notification settings

garovu/scylladb-compose

Repository files navigation

ScyllaDB Docker Compose

This repository contains a Docker Compose configuration for running a testing ScyllaDB cluster, a highly scalable NoSQL database.

Prerequisites

Before running the ScyllaDB Docker Compose configuration, make sure you have the following prerequisites installed:

If your machine is using a Linux virtual machine to run a Linux kernel for Docker, please check if /proc/sys/fs/aio-max-nr is large enough. Multiple cores requires setting a proper value to the /proc/sys/fs/aio-max-nr. On many non production systems it will be equal to 65K. The formula to calculate proper value is: 11026 * cpu_cores. Read more in this official image.

To change default values, try this:

See more in this issue.

docker run --rm -it --privileged ubuntu bash -c "echo \"fs.aio-max-nr = 1048576\" >> /etc/sysctl.conf && sysctl -p /etc/sysctl.conf"

This parameter will be visible in any container (because all containers share the same Linux kernel):

docker exec -it scylla-node1 cat /proc/sys/fs/aio-max-nr

Tested on MacBook ARM with M1! ✨ (Scylla 5.4)

Issues:

  • Looks like you need to run this on each restart of your computer.
  • Some Scylla containers can fail on start, then just restart them to retry.

Usage

  1. Clone this repository:

    git clone https://github.com/garovu/scylladb-compose.git
  2. Navigate to the cloned repository:

    cd scylladb-compose
  3. Start the ScyllaDB cluster:

    docker-compose up -d

    This will start a three-nodes ScyllaDB cluster in detached mode.

  4. Verify that the ScyllaDB cluster is running:

    docker-compose ps

    You should see the ScyllaDB container listed as "Up".

    docker-compose exec scylla-node1 nodetool status

    Check ScyllaDB cluster status. Example:

    Datacenter: datacenter1
    =======================
    Status=Up/Down
    |/ State=Normal/Leaving/Joining/Moving
    --  Address     Load       Tokens       Owns    Host ID                               Rack
    UN  172.18.0.2  63.98 KB   256          ?       87461c7e-31af-450e-ac5e-d3802cbd3a22  rack1
    UN  172.18.0.3  112.7 KB   256          ?       6b25d433-66f0-4b9b-98de-bd62a360a980  rack1
    UN  172.18.0.4  223.83 KB  256          ?       488b5340-ab99-4efb-958f-6e66a24789a8  rack1
    
    Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
  5. Connect to the ScyllaDB cluster:

    docker-compose exec scylla cqlsh

    This will open a CQL shell where you can interact with the ScyllaDB cluster.

  6. Start ScyllaDB Monotoring cluster:

    docker-compose -f monitoring-conmpose.yaml up
  7. When you're done, stop the ScyllaDB cluster:

    docker-compose down
    docker-compose -f monitoring-conmpose.yaml down

    This will stop and remove the ScyllaDB container.

Configuration

The configuration file (compose.ymland others *-compose.yaml) allows you to customize various aspects of the ScyllaDB cluster, such as the number of nodes, memory limits, and network settings. Refer to the Docker Compose documentation for more information on how to configure the ScyllaDB cluster.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This repository is licensed under the MIT License.

About

This repository contains a Docker Compose configuration for running ScyllaDB, a highly scalable NoSQL database for learning and testing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published