Skip to main content
Version: 0.8

Installation

Getting started with Skytable involves choosing a mode of installation, downloading any required files and then starting up the database. You can choose to either use:

  • Native binaries (recommended): This is what is generally recommended for the best performance. You will need to download a bundle and then start the server binary; no expert knowledge required
  • Using a Debian package (recommended): If you're deploying on Ubuntu or any other Debian based Linux distribution, then consider using this method. Configuration files, users and passwords are autogenerated.
  • A Docker image: We generally recommend using a Docker image for experimenting with Skytable on your local system during development and you want to keep your local system clean. If you want to use a Docker image for deployment, you're always free to do so!

    Note: You might experience slightly degraded performance from the storage engine due to Docker engine's abstractions.

Native binaries

To use native binaries you need to download a bundle which is simply a ZIP file with all the necessary binaries that you'll ever need to develop on and deploy Skytable.

  1. First download the latest bundle for your platform. You can find download links on the releases page.

  2. Unzip the ZIP file. You'll find the following binaries in the extracted archive:

    • skyd: This is the database server binary which when started runs as a daemon, serving requests
    • skysh: This is the Skytable shell and it provides a very helpful interactive REPL database client
    • sky-bench: This is the benchmarking tool that you can use to load test Skytable
  3. Start up the server. You need to choose a root password for the root account which will have complete control over the database.

    ./skyd --auth-root-password=<your root password> --auth-plugin=pwd

    Replace with your own secure password!

    Explanation:

    • --auth-root-password: sets the root password
    • --auth-plugin: sets the authentication plugin to pwd which is a simple password based authentication system

The server starts up at localhost:2003 and is ready to run queries.

info

Your operating system might sometimes not let you run binaries directly. On Unix based systems, you'll need to run: chmod +x skyd skysh sky-bench.

And on Windows systems you might need to right-click on the binaries and click on "unblock"

Debian package

Find the correct *.deb file from the releases page. Now simply run:

sudo dpkg -i <file name>.deb

The package will:

  • Generate a root password: Watch the terminal output!
  • Create a systemd unit: So you can start and stop the process using systemd like systemd start skyd
  • Generate a configuration: Your configuration is stored in /var/lib/skytable/config.yaml. Go ahead and modify it if you need to!

Docker image

You must have docker set up!
  • Use this great guide from Docker to install and get started
  • To be able to run docker run and related commands, you may need administrative privileges

Simple setup

  1. Download the bundle: To be able to run queries you need to download the bundle as described above

  2. Start the container:

    docker run -d --name skydb -p 2003:2003 skytable/skytable:latest
tip

The password for the Skytable instance on the Docker container is auto-generated. Run docker logs -f skydb and you'll see a log message with the generated password.

With persistence

  1. Download the bundle: To be able to run queries you need to download the bundle as described above

  2. Create the data directory: To ensure that our database is persistent and all our data doesn't vanish as soon as the container is terminated, we'll map the data directory to an actual directory on our local system.

    Note: Create a folder called skytable in a convenient location. We recommend having a directory in $HOME/docker-containers where you can store the Skytable container's data and any other containers that you might use. It's a great way to keep things organized.

  3. Create your configuration: Download this template file and place it into the directory you created. Update the password with your root password of choice.

  4. Start the container:

    docker run -d --name skydb \
    -v $HOME/docker-containers/skytable:/var/lib/skytable \
    -p 2003:2003 \
    skytable/skytable:latest

    Explanation:

    • This starts a container with name skydb
    • It maps the folder (as discussed earlier) $HOME/docker-containers/skytable from your local file system to /var/skytable (in the container's file system)
    • Maps port 2003 on the host to the containers port 2003 so that you can use the command-line client skysh without having to inspect the container's IP address