How to install ScyllaDB Open Source on Rocky Linux 8

Scylla is a high-performance NoSQL database that is compatible with the Apache Cassandra database. It is designed to be highly scalable and able to handle large amounts of data and high levels of concurrency. Scylla is written in C++ and is built on top of the Seastar framework, which allows it to take advantage of modern multi-core processors and run on bare metal, virtual machines, or in the cloud. Some of the key features of Scylla include:

  • High performance: Scylla is designed to handle very high write and read throughput, making it suitable for applications that require fast access to data.
  • Scalability: Scylla is horizontally scalable, meaning it can scale out by adding more nodes to the cluster as needed.
  • Data model: Scylla uses a column-family data model similar to Cassandra, which allows for efficient storage and retrieval of data.
  • Compatibility: Scylla is compatible with the Cassandra query language (CQL), so users can easily migrate their Cassandra applications to Scylla.
  • Replication: Scylla supports multiple levels of replication to ensure data durability and availability.
  • Monitoring and management: Scylla includes a number of tools for monitoring and managing the database, including a web-based management console and a command-line interface.

In this guide we will learn how to install and configure ScyllaDB on a Rocky Linux 8 server.

Related content

Step 1. Update the system

Ensure that the system packages are updated:

sudo dnf update

Step 2. Install the repo file

Since Scylladb packages are not enabled in the default rocky linux repos, we will have to install one provided by the scylladb team.

First ensure that epel release is installed

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Then Add the ScyllaDB RPM repo to your system

sudo curl -o /etc/yum.repos.d/scylla.repo -L http://downloads.scylladb.com/rpm/centos/scylla-5.1.repo

Step 3 – Install ScyllaDB

Once the repo is set up, we can install scylla using out package manager:

sudo dnf install scylla

For a specific patch version, append it to the name. Like:

$ sudo yum install scylla-4.5.3

Step 4 – Configure and run ScyllaDB

Configure the /etc/scylla/scylla.yaml file with the following parameters:

<td>
  <strong>Content</strong>
</td>
<td>
  Name of the cluster, all the nodes in the cluster must have the same name
</td>
<td>
  Seed nodes are used during startup to bootstrap the gossip process and join the cluster
</td>
<td>
  IP address that ScyllaDB uses to connect to other ScyllaDB nodes in the cluster
</td>
<td>
  IP address of interface for client connections (Thrift, CQL)
</td>
Item
cluster_name
seeds
listen_address
rpc_address

More information regarding the scylla.yaml file.

ScyllaDB setup

Run the scylla_setup script to tune the system settings

sudo scylla_setup

This script invokes a set of scripts to configure several operating system settings, like setting RAID0 and an XFS filesystem. It also runs a short (up to a few minutes) benchmark on your storage and generates the /etc/scylla.d/io.conf configuration file. When the file is ready, you can start ScyllaDB (see below). ScyllaDB will not run without XFS or the io.conf file. To bypass this check, set ScyllaDB to developer mode.

If you want to use Scylla in developer mode you need to use the command below (using root privileges)

sudo&nbsp;scylla_dev_mode_setup&nbsp;--developer-mode&nbsp;1

This script will write the developer mode setting into /etc/scylla.d/dev-mode.conf

Step 5. Run ScyllaDB as a service (if not already running)

Use this command to start the server

sudo systemctl start scylla-server

Confirm that it is running:

$ sudo systemctl status scylla-server
● scylla-server.service - Scylla Server
   Loaded: loaded (/usr/lib/systemd/system/scylla-server.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/scylla-server.service.d
           └─capabilities.conf, dependencies.conf
   Active: active (running) since Wed 2022-12-21 17:03:50 UTC; 37s ago
  Process: 196671 ExecStopPost=/opt/scylladb/scripts/scylla_stop (code=exited, status=0/SUCCESS)
  Process: 196726 ExecStartPre=/opt/scylladb/scripts/scylla_prepare (code=exited, status=0/SUCCESS)
 Main PID: 196734 (scylla)
   Status: "serving"
    Tasks: 6 (limit: 46188)
   Memory: 157.0M
   CGroup: /scylla.slice/scylla-server.slice/scylla-server.service
           └─196734 /usr/bin/scylla --log-to-syslog 1 --log-to-stdout 0 --default-log-level info --network-stack posix --developer-mode=1 --lock-memory=1

Dec 21 17:04:06 fiddle-rockysrv8 scylla[196734]:  [shard 0] compaction - [Compact system_schema.columns 7a3c0000-8151-11ed-afe0-33f02f30385f] Compacted 2 sstables to [/var/lib/s>
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] gossip - No gossip backlog; proceeding
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] init - allow replaying hints
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] init - Launching generate_mv_updates for non system tables
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] init - starting the view builder
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] init - starting native transport
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] cql_server_controller - Starting listening for CQL clients on 127.0.0.1:9042 (unencrypted, non-shard-aware)
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] cql_server_controller - Starting listening for CQL clients on 127.0.0.1:19042 (unencrypted, shard-aware)
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] init - serving
Dec 21 17:04:18 fiddle-rockysrv8 scylla[196734]:  [shard 0] init - Scylla version 5.1.1-0.20221208.1cfedc5b59f4 initialization completed.

To enable the server on boot

sudo systemctl status scylla-server

To check the status of the installation, use the nodetool and sqlsh

run nodetool

nodetool status

run cqlsh

$ cqlsh
Connected to  at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.0.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh>

Run cassandra-stress

cassandra-stress write -mode cql3 native 

Conclusion

We have managed to set up Syclla Db in this guide.

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy